POST /v1/videos/generations
Authorization: Bearer <API_KEY>
Content-Type: application/json
Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Use dreamina-seedance-2-0, dreamina-seedance-2-0-mini, or dreamina-seedance-2-0-fast. The actual available names come from /v1/models. |
content | object[] | Yes | Input array. Supports text, image_url, video_url, and audio_url. |
generate_audio | boolean | No | Whether to generate synced audio. |
resolution | string | No | 480p, 720p, or 1080p. Some fast models may not support 1080p. |
ratio | string | No | Aspect ratio such as 16:9, 9:16, 1:1, 4:3, 3:4, 21:9, or adaptive. |
duration | integer | No | Duration in seconds. Common range is [4, 15], and some models may accept -1. |
watermark | boolean | No | Whether to add a watermark. |
seed | integer | No | Random seed. |
safety_identifier | string | No | Unique end-user identifier used for safety review. |
execution_expires_after | integer | No | Task timeout in seconds. |
service_tier | string | No | Service tier. |
callback_url | string | No | Callback URL for task updates. |
return_last_frame | boolean | No | Whether to return the last frame image. |
Unsupported fields currently return 400:
frames, service_tier=flex, and dreamina-seedance-2-0-fast + resolution=1080p.Do not send price_class_code or other internal fields.Input types
Text
{
"type": "text",
"text": "Generate a 5-second city nightscape video with a slow push-in."
}
Image
{
"type": "image_url",
"image_url": { "url": "https://example.com/product.png" },
"role": "first_frame"
}
Video
{
"type": "video_url",
"video_url": { "url": "https://example.com/reference.mp4" },
"role": "reference_video"
}
Audio
{
"type": "audio_url",
"audio_url": { "url": "https://example.com/bgm.mp3" },
"role": "reference_audio"
}
Examples
Text to video
curl -X POST "https://{your-domain}/v1/videos/generations" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "dreamina-seedance-2-0",
"content": [
{
"type": "text",
"text": "Generate a 5-second city nightscape video with neon reflections on wet streets."
}
],
"duration": 5,
"resolution": "720p",
"ratio": "16:9",
"generate_audio": true,
"watermark": false
}'
Image to video
curl -X POST "https://{your-domain}/v1/videos/generations" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "dreamina-seedance-2-0-mini",
"content": [
{
"type": "text",
"text": "Slowly rotate the product on a clean desk with a subtle camera push."
},
{
"type": "image_url",
"image_url": { "url": "https://example.com/product.png" },
"role": "first_frame"
}
],
"duration": 5,
"resolution": "720p",
"ratio": "1:1",
"watermark": false
}'
Using assets
First call Create asset, then pass the returneduri into the video task.
curl -X POST "https://{your-domain}/v1/videos/generations" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "dreamina-seedance-2-0-fast",
"content": [
{
"type": "text",
"text": "Use the reference image of a person standing on a city street and move the camera forward slowly."
},
{
"type": "image_url",
"image_url": { "url": "asset://asset_6f9a4c2b8d1e3a90" },
"role": "reference_image"
}
],
"duration": 5,
"resolution": "720p",
"ratio": "16:9",
"watermark": false
}'
Success response
HTTP status:202 Accepted
{
"id": "vidtask_3cb6299b32d24f93a82e8a74b3e06161",
"object": "video.generation.task",
"created": 1779782400,
"model": "dreamina-seedance-2-0",
"status": "queued",
"expires_at": 1779955200
}
Error codes
| HTTP status | error.type | Scenario |
|---|---|---|
| 400 | invalid_request_error | Missing model or content, or a parameter is out of range |
| 400 | endpoint_not_configured | Video support is not enabled for the model |
| 400 | model_endpoint_mismatch | The model cannot be called through this endpoint |
| 402 | insufficient_balance | Not enough balance to create the task |
| 403 | model_not_allowed | The API key allowlist does not include the model |
| 404 | task_not_found | The task does not exist or does not belong to the current key |
| 429 | quota_exceeded | API key quota is exhausted |
.png?fit=max&auto=format&n=BFsTNTAO9-CmNcfC&q=85&s=89ae106c3e021b61fea778ce9f5b2e0e)