Seedance 2.0 API API Docs

Everything you need to integrate Seedance 2.0 video generation into your app.

Base URL

https://api.defapi.org

Authentication

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/gen

Generate a video using Seedance AI. Returns a task_id for polling.

Request Body

ParameterTypeRequiredDescription
modelstringNoAI model to use. Default: seedance-2.0
contentarrayYesArray of text/image_url items. Max 9 images. Reference images with @image1, @image2…
durationintegerNoVideo duration in seconds. Options: 5, 10, 15. Default: 5
ratiostringNoAspect ratio. Options: 16:9, 9:16, 1:1, 4:3, 3:4, 21:9. Default: 16:9
callback_urlstringNoWebhook 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/query

Query the status and result of a video generation task.

Query Parameters

ParameterTypeRequiredDescription
task_idstringYesTask 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 Statuscode fieldMeaning
2000Success
4001Bad request — invalid parameters
4011Unauthorized — missing or invalid API key
4041Task not found
5001Internal server error