Create Avatar Video (v2)
FreshPOSTPOST https://api.creatify.ai/api/lipsyncs/Create a multi-scene AI avatar video. V2 supports different avatars, voices, scripts, and backgrounds per scene, enabling complex video compositions.
Credit Cost
5 credits per 30 seconds of video
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
scenes | array | Yes | Array of scene objects |
scenes[].avatar | string | Yes | Avatar ID for this scene |
scenes[].voice_id | string | Yes | Voice ID for this scene |
scenes[].text | string | Yes | Script text for the avatar to speak |
scenes[].background | string | No | Background image or video URL |
aspect_ratio | string | No | Video aspect ratio (e.g., 16:9, 9:16, 1:1). Defaults to 16:9 |
Headers
| Header | Type | Required | Description |
|---|---|---|---|
X-API-ID | string | Yes | Your Creatify API ID |
X-API-KEY | string | Yes | Your Creatify API key |
Content-Type | string | Yes | application/json |
Example Request
bash
curl -X POST 'https://api.creatify.ai/api/lipsyncs/' \
-H 'X-API-ID: your-api-id' \
-H 'X-API-KEY: your-api-key' \
-H 'Content-Type: application/json' \
-d '{
"scenes": [
{
"avatar": "avatar-001",
"voice_id": "voice-en-001",
"text": "Welcome to our product demo.",
"background": "https://example.com/bg-intro.jpg"
},
{
"avatar": "avatar-002",
"voice_id": "voice-en-002",
"text": "Let me walk you through the key features.",
"background": "https://example.com/bg-features.jpg"
},
{
"avatar": "avatar-001",
"voice_id": "voice-en-001",
"text": "Get started today with a free trial.",
"background": "https://example.com/bg-cta.jpg"
}
],
"aspect_ratio": "16:9"
}'Response
json
{
"id": "v2-abc123",
"status": "pending",
"scenes": [
{
"avatar": "avatar-001",
"voice_id": "voice-en-001",
"text": "Welcome to our product demo.",
"background": "https://example.com/bg-intro.jpg"
},
{
"avatar": "avatar-002",
"voice_id": "voice-en-002",
"text": "Let me walk you through the key features.",
"background": "https://example.com/bg-features.jpg"
},
{
"avatar": "avatar-001",
"voice_id": "voice-en-001",
"text": "Get started today with a free trial.",
"background": "https://example.com/bg-cta.jpg"
}
],
"aspect_ratio": "16:9",
"created_at": "2024-01-15T10:30:00Z"
}Status Codes
| Code | Description |
|---|---|
201 | Task created successfully |
400 | Bad request -- invalid parameters or scene data |
401 | Unauthorized -- invalid API credentials |
402 | Insufficient credits |
429 | Rate limit exceeded |
500 | Internal server error |
TIP
Each scene can use a different avatar and voice, allowing you to create conversational or multi-presenter videos.
WARNING
The total credit cost is calculated based on the combined duration of all scenes. Longer scripts per scene result in longer video duration.