Seedance 2.0 API Documentation
Generate videos with Seedance 2.0. Submit a request, save the task ID, then query for the finished video.
On this page
OverviewAuthenticationRequest examplesRequest parametersText to Video inputImage to Video inputCreate responseQuery the resultResponse parametersWebhooks (optional)Webhook parametersErrors & retriesOverview
Model ID: seedance-2-0. Text to Video · Image to Video. Check the current price and availability before your first request.
/v1/tasksCreate a task/v1/tasks/{id}Get the resultAuthentication
Use Authorization: Bearer YOUR_API_KEY. For task creation, also send Content-Type: application/json and a unique Idempotency-Key. The example below includes all three headers.
Request examples
Choose an operation and language. Replace YOUR_API_KEY and use a unique Idempotency-Key for each new generation; preserve it when retrying the same request.
curl --fail-with-body 'https://gikyapi.com/v1/tasks' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: YOUR_STABLE_REQUEST_ID' \
--data '{
"model": "seedance-2-0",
"operation": "text-to-video",
"input": {
"prompt": "A blue ceramic cup on a white table, soft morning light",
"resolution": "4k",
"duration_seconds": 4
}
}'Request parameters
The request body contains model, operation and input. Model-specific fields belong inside input; their accepted values are listed below.
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | seedance-2-0 |
| operation | string | Yes | text-to-video / image-to-video |
| input | object | Yes | Parameters for your selected operation. |
| callback | object | No | Use an endpoint_id saved in your account’s Webhooks settings. Omit this field when polling. |
Text to Video input
Fields inside input. Optional fields may be omitted; send only the fields listed here.
| Parameter | Type | Required | Description / accepted values |
|---|---|---|---|
| prompt | string | Yes | Describe the scene, style or edit you want to make. Minimum 3 characters. Maximum 20000 characters. |
| resolution | string | Yes | Output resolution. Choose a resolution listed in the model pricing. Accepted: 480p, 720p, 1080p, 4k. |
| aspect_ratio | string | No | Aspect ratio of the generated output. Accepted: 1:1, 4:3, 3:4, 16:9, 9:16, 21:9, adaptive. |
| generate_audio | boolean | No | Whether to include generated audio. |
| duration_seconds | integer | Yes | Length of the generated video, in seconds. Accepted: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15. |
Image to Video input
Fields inside input. Optional fields may be omitted; send only the fields listed here.
| Parameter | Type | Required | Description / accepted values |
|---|---|---|---|
| prompt | string | Yes | Describe the scene, style or edit you want to make. Minimum 3 characters. Maximum 20000 characters. |
| image_urls | array | Yes | Public HTTPS URLs of reference images. Each URL must be accessible without signing in. Maximum 1 items. |
| resolution | string | Yes | Output resolution. Choose a resolution listed in the model pricing. Accepted: 480p, 720p, 1080p, 4k. |
| aspect_ratio | string | No | Aspect ratio of the generated output. Accepted: 1:1, 4:3, 3:4, 16:9, 9:16, 21:9, adaptive. |
| generate_audio | boolean | No | Whether to include generated audio. |
| last_image_urls | array | No | last image urls. Maximum 1 items. |
| duration_seconds | integer | Yes | Length of the generated video, in seconds. Accepted: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15. |
Create response
HTTP 202 means the task was accepted. Save id and use it to query the result. The response below is illustrative; generation has not finished at this stage.
{
"id": "00000000-0000-4000-8000-000000000001",
"status": "queued",
"outputs": [],
"error_code": null,
"created_at": "2026-11-02T00:00:00Z",
"updated_at": "2026-11-02T00:00:00Z"
}Query the result
Replace TASK_ID with the returned id. Use the same API key and poll every five seconds or more. When status is succeeded, read the file URLs from outputs.
/v1/tasks/{id}Retrieve a taskcurl --fail-with-body 'https://gikyapi.com/v1/tasks/TASK_ID' -H 'Authorization: Bearer YOUR_API_KEY'Response parameters
Creation and status queries return the same task structure.
| Field | Type | Description |
|---|---|---|
| id | string | Task ID used in subsequent status queries. |
| status | string | queued / submitting / running / succeeded / failed / needs_review |
| outputs | string[] | Generated file URLs when the task succeeds. Save files to your own storage. |
| error_code | string | null | Failure code when available; null if there is no error. |
| created_at | string | Time the task was created. |
| updated_at | string | Time of the last task update. |
{
"id": "00000000-0000-4000-8000-000000000001",
"status": "succeeded",
"outputs": [
"https://example.com/result.mp4"
],
"error_code": null,
"created_at": "2026-11-02T00:00:00Z",
"updated_at": "2026-11-02T00:00:00Z"
}Webhooks (optional)
Add an endpoint in Dashboard → Webhooks and save the signing secret on your server. Include its ID in the task request. You can also poll task status without configuring a callback.
| Parameter | Type | Required with callback | Description |
|---|---|---|---|
| callback.endpoint_id | string | Yes | ID of a callback endpoint owned by your account. |
{
"callback": {
"endpoint_id": "YOUR_ENDPOINT_ID"
}
}Webhook parameters
Completion events use task.succeeded or task.failed. Verify the signature before processing and deduplicate by event id. A missing callback does not mean the task failed; query its status.
| Field | Type | Description |
|---|---|---|
| id | string | Unique event ID; use it to deduplicate deliveries. |
| type | string | task.succeeded or task.failed |
| task_id | string | The generation task ID. |
| status | string | Task status at the time of the event. |
| outputs | string[] | Generated file URLs for a successful task. |
Errors & retries
If a submission times out, retry with the same Idempotency-Key and identical body. If you already have a task ID, query that task instead of creating another one.
| Status | What to do |
|---|---|
| 400 | Check required fields, accepted values and the priced configuration. |
| 401 | Check your API key, expiry and restrictions. |
| 409 | Check the error code: refresh changed configurations or resolve a reused request key. |
| 429 | Wait at least 60 seconds before retrying. |
| failed | Read error_code and check the consumption record. |
| needs_review | Keep the task ID and stop automatic resubmission. |