Authentication
- Base URL
https://host.docker.internal:8000- Authorization
Authorization: Bearer YOUR_API_KEY- Content-Type
application/json- Model name
seedance-2.0
Integration protocols
Why this protocol
适合需要提交任务并轮询状态的图像、视频、音频生成工作流。
Endpoint
POST/v1/jobs
Authorization: Bearer YOUR_API_KEYContent-Type: application/jsonRequest / Response JSON
// REQUEST
{
"model": "seedance-2.0",
"input": {
"prompt": "Describe the output you want",
"content": [],
"first_frame_url": "https://example.com/demo.png",
"last_frame_url": "https://example.com/demo.png",
"reference_image_urls": [
"https://example.com/demo.png"
],
"reference_video_urls": [
"https://example.com/demo.mp4"
],
"reference_audio_urls": [
"https://example.com/demo.mp3"
],
"resolution": "720p",
"duration": 5,
"aspect_ratio": "16:9",
"ratio": "16:9",
"generate_audio": true,
"return_last_frame": false,
"tools": [],
"seed": -1
}
}// RESPONSE
{
"id": "job_example",
"object": "job",
"status": "processing",
"model": "seedance-2.0",
"created": 1710000000,
"request_id": "req_example"
}Request / Response schema
// INPUT SCHEMA
| Field | Type | Required |
|---|---|---|
| prompt | string | Y |
| content | array | N |
| first_frame_url | image | N |
| last_frame_url | image | N |
| reference_image_urls | array | N |
| reference_video_urls | array | N |
| reference_audio_urls | array | N |
| resolution | enum | N |
| duration | integer | N |
| aspect_ratio | enum | N |
| ratio | enum | N |
| generate_audio | boolean | N |
| return_last_frame | boolean | N |
| tools | array | N |
| seed | integer | N |
// RESPONSE SCHEMA
| Field | Type | Required |
|---|---|---|
| output.video_url | video | N |
| output.last_frame_url | image | N |
| usage.total_tokens | integer | N |
Code examples
cURLrequest.sh
curl -X POST "https://host.docker.internal:8000/v1/jobs" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "seedance-2.0",
"input": {
"prompt": "Describe the output you want",
"content": [],
"first_frame_url": "https://example.com/demo.png",
"last_frame_url": "https://example.com/demo.png",
"reference_image_urls": [
"https://example.com/demo.png"
],
"reference_video_urls": [
"https://example.com/demo.mp4"
],
"reference_audio_urls": [
"https://example.com/demo.mp3"
],
"resolution": "720p",
"duration": 5,
"aspect_ratio": "16:9",
"ratio": "16:9",
"generate_audio": true,
"return_last_frame": false,
"tools": [],
"seed": -1
}
}'
# Upload reference cURL
curl -X POST "https://host.docker.internal:8000/v1/files/upload" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "kind=video" \
-F "purpose=reference" \
-F "file=@demo.mp4"
# Poll status cURL
# Replace job_example with the task_id returned by the submit call
curl -X GET "https://host.docker.internal:8000/v1/jobs/job_example" \
-H "Authorization: Bearer YOUR_API_KEY"