Seedance 2.0 API API Docs
Everything you need to integrate Seedance 2.0 video generation into your app.
Base URL
https://api.defapi.orgAuthentication
All API requests require an API key passed in the Authorization header.
Authorization: Bearer <your-api-key>Example: Bearer dk-1234567890abcdef
POST
/api/video/seedance/genGenerate a video using Seedance AI. Returns a task_id for polling.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | No | AI model to use. Default: seedance-2.0 |
| content | array | Yes | Array of text/image_url items. Max 9 images. Reference images with @image1, @image2… |
| duration | integer | No | Video duration in seconds. Options: 5, 10, 15. Default: 5 |
| ratio | string | No | Aspect ratio. Options: 16:9, 9:16, 1:1, 4:3, 3:4, 21:9. Default: 16:9 |
| callback_url | string | No | Webhook URL to receive task completion notification via POST |
Examples
Text-to-video
POST https://api.defapi.org/api/video/seedance/gen
Authorization: Bearer dk-1234567890abcdef
Content-Type: application/json
{
"model": "seedance-2.0",
"content": [
{ "type": "text", "text": "A beautiful beach scene with waves gently lapping at the shore" }
]
}Image-to-video (reference images with @image1, @image2)
{
"model": "seedance-2.0",
"content": [
{ "type": "text", "text": "The cat in @image1 walks through a garden, then meets the dog in @image2" },
{ "type": "image_url", "image_url": { "url": "https://example.com/cat.png" } },
{ "type": "image_url", "image_url": { "url": "https://example.com/dog.png" } }
],
"duration": 5,
"callback_url": "https://example.com/webhook/video-callback"
}Response
{
"code": 0,
"message": "ok",
"data": {
"task_id": "ta12345678-1234-1234-1234-123456789abc"
}
}GET
/api/task/queryQuery the status and result of a video generation task.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| task_id | string | Yes | Task ID returned from the generation endpoint |
Examples
GET https://api.defapi.org/api/task/query?task_id=ta823dfb-eaac-44fd-aec2-3e2c7ba8e071 Authorization: Bearer dk-1234567890abcdef
Response
{
"code": 0,
"message": "ok",
"data": {
"task_id": "ta823dfb-eaac-44fd-aec2-3e2c7ba8e071",
"status": "success",
"result": { "video": "https://example.com/generated-video.mp4" },
"consumed": "0.500000",
"status_reason": { "message": null },
"created_at": "2025-08-03T10:22:20.010Z"
}
}Error Codes
| HTTP Status | code field | Meaning |
|---|---|---|
| 200 | 0 | Success |
| 400 | 1 | Bad request — invalid parameters |
| 401 | 1 | Unauthorized — missing or invalid API key |
| 404 | 1 | Task not found |
| 500 | 1 | Internal server error |