AI Model APIVideosSeedance Format
Create Video Generation Task
POST /v1/video/generations — supports text-to-video, image-to-video, and reference-asset-to-video.
Endpoint
POST https://qfzyapi.qfzy.art/v1/video/generations
Authorization: Bearer {api_key}
Content-Type: application/jsonOpenAI Video compatible alias: POST /v1/videos.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model code, see model list |
content | array | Yes | Content array; may contain text, image, video, and audio references |
metadata | object | No | Generation parameters, see parameters |
The content Array
Each item in content is an object distinguished by type and described by role.
| type | Description | Key Fields |
|---|---|---|
text | Text prompt | text |
image_url | Image reference | image_url.url, role |
video_url | Video reference | video_url.url, role |
audio_url | Audio reference | audio_url.url, role |
Reference Roles (role)
| role | Applies To | Description |
|---|---|---|
first_frame | image_url | First frame image |
last_frame | image_url | Last frame image |
reference_image | image_url | Reference image |
reference_video | video_url | Reference video |
reference_audio | audio_url | Reference audio |
Text-to-Video Example
curl -X POST "https://qfzyapi.qfzy.art/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedance-2-0-260128",
"content": [
{ "type": "text", "text": "Sunset by the sea, waves crashing on the rocks, slow aerial push-in" }
],
"metadata": { "resolution": "1080p", "duration": 5, "ratio": "16:9" }
}'Image-to-Video Example
curl -X POST "https://qfzyapi.qfzy.art/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedance-2-5-260628",
"content": [
{ "type": "text", "text": "Camera slowly orbits the subject" },
{
"type": "image_url",
"role": "first_frame",
"image_url": { "url": "https://example.com/first.png" }
}
],
"metadata": { "resolution": "1080p", "duration": 5, "ratio": "adaptive" }
}'Reference Asset Example
curl -X POST "https://qfzyapi.qfzy.art/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedance-2-5-260628",
"content": [
{ "type": "text", "text": "Generate a city time-lapse in the style of the reference image" },
{
"type": "image_url",
"role": "reference_image",
"image_url": { "url": "https://example.com/ref.png" }
},
{
"type": "audio_url",
"role": "reference_audio",
"audio_url": { "url": "https://example.com/bgm.mp3" }
}
],
"metadata": { "resolution": "1080p", "duration": 8, "ratio": "16:9", "generate_audio": true }
}'Response
{
"id": "task_xxxxxxxx",
"task_id": "task_xxxxxxxx",
"object": "video.generation",
"model": "doubao-seedance-2-0-260128",
"status": "queued",
"created_at": 1735660800
}Once you have the task_id, poll the result via the Query Task Status endpoint.
Common Errors
| Error | Cause | Handling |
|---|---|---|
400 invalid model | Wrong model code | Verify the model code spelling |
400 group mismatch | Group does not match the channel family | Confirm the group the api_key belongs to |
400 invalid content type | Unsupported content item type | Check whether the type is in the supported list |
| 413 Payload Too Large | Request body too large | Use asset library references instead of embedding large files |
How is this guide?