Create Avatar Video (v1)
FreshPOSTPOST https://api.creatify.ai/api/lipsyncs/Create a new AI avatar lipsync video task. The avatar will speak the provided text using the specified voice.
Credit Cost
5 credits per 30 seconds of video
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
text | string | Yes | The script text for the avatar to speak |
creator_id | string | Yes | Avatar ID to use (from your avatar library) |
aspect_ratio | string | No | Video aspect ratio (e.g., 16:9, 9:16, 1:1). Defaults to 16:9 |
voice_id | string | No | Voice ID from /api/voices/. Uses avatar default if not specified |
no_caption | boolean | No | Set to true to disable captions. Defaults to false |
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 '{
"text": "Welcome to our product demo. Today we will show you how easy it is to get started.",
"creator_id": "avatar-001",
"aspect_ratio": "16:9",
"voice_id": "voice-en-001",
"no_caption": false
}'Response
json
{
"id": "abc123",
"status": "pending",
"text": "Welcome to our product demo. Today we will show you how easy it is to get started.",
"creator_id": "avatar-001",
"aspect_ratio": "16:9",
"voice_id": "voice-en-001",
"no_caption": false,
"created_at": "2024-01-15T10:30:00Z"
}Status Codes
| Code | Description |
|---|---|
201 | Task created successfully |
400 | Bad request -- invalid parameters |
401 | Unauthorized -- invalid API credentials |
402 | Insufficient credits |
429 | Rate limit exceeded |
500 | Internal server error |
Workflow
After creating a task:
- Poll
GET /api/lipsyncs/{id}/untilstatusisdone - Use
POST /api/lipsyncs/{id}/preview/to generate a preview (1 credit/30s) - Use
POST /api/lipsyncs/{id}/render/to render the final video (4 credits/30s)
TIP
Use the voice_id parameter to choose a specific voice. List available voices with GET /api/voices/.