Microsoft.Extensions.AI Integration
Cross-SDK comparison
See the centralized MEAI documentation for feature matrices and comparisons across all tryAGI SDKs.
The Synthesia SDK provides AIFunction tool wrappers compatible with Microsoft.Extensions.AI. These tools can be used with any IChatClient to give AI models access to Synthesia's enterprise AI video generation with speaking avatars and templates.
Installation
1 | |
Available Tools
| Method | Tool Name | Description |
|---|---|---|
AsCreateVideoTool() |
CreateVideo |
Creates a video with a speaking avatar from a text script. Returns video ID for status polling. |
AsCreateVideoFromTemplateTool() |
CreateVideoFromTemplate |
Creates a video from a Synthesia template with customizable variables. Returns video ID. |
AsListTemplatesTool() |
ListTemplates |
Lists available video templates with their IDs and variables. |
AsGetVideoTool() |
GetVideo |
Retrieves video status and download URL by ID. |
AsListVideosTool() |
ListVideos |
Lists videos in the workspace with statuses and download URLs. |
AsDeleteVideoTool() |
DeleteVideo |
Deletes a video by its ID. |
Create Video Tool
Use AsCreateVideoTool() to create an AIFunction that generates videos from text scripts:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | |
Create Video from Template Tool
Use AsCreateVideoFromTemplateTool() to create videos using predefined templates:
1 2 3 4 5 6 | |
List Templates Tool
Use AsListTemplatesTool() to discover available templates:
1 2 3 4 5 6 | |
Get Video Status Tool
Use AsGetVideoTool() to poll for video completion:
1 2 3 4 5 6 | |
Combining All Tools
All tools can be used together to give the AI agent full video generation and management capabilities:
1 2 3 4 5 6 7 8 9 10 11 12 | |
Async Task Pattern
Synthesia video generation is asynchronous. The creation tools (AsCreateVideoTool, AsCreateVideoFromTemplateTool) return a video ID and initial status. The AsGetVideoTool can then be used to poll for completion. Video statuses are:
in_progress-- Video is being generatedcomplete-- Video is ready, download URL is availableapproved-- Video has been approvedrejected-- Video has been rejectederror-- Video generation faileddeleted-- Video has been deleted