curl --request POST \
--url 'https://api.elkapi.com/v1/video/generations' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "doubao-seedance-2-0-260128",
"prompt": "A first-person fruit tea ad, picking apples by hand, freshly cut and shaken, close-up product shots, cinematic, highly detailed",
"metadata": {
"duration": 8,
"ratio": "16:9",
"resolution": "720p",
"generate_audio": true,
"watermark": false
}
}'
import requests
url = "https://api.elkapi.com/v1/video/generations"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
payload = {
"model": "doubao-seedance-2-0-260128",
"prompt": "A first-person fruit tea ad, picking apples by hand, freshly cut and shaken, close-up product shots, cinematic, highly detailed",
"metadata": {
"duration": 8,
"ratio": "16:9",
"resolution": "720p",
"generate_audio": True,
"watermark": False
}
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
const response = await fetch("https://api.elkapi.com/v1/video/generations", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "doubao-seedance-2-0-260128",
prompt: "A first-person fruit tea ad, picking apples by hand, freshly cut and shaken, close-up product shots, cinematic, highly detailed",
metadata: {
duration: 8,
ratio: "16:9",
resolution: "720p",
generate_audio: true,
watermark: false
}
})
});
console.log(await response.json());
{
"id": "task_abc123",
"task_id": "task_abc123",
"object": "video",
"model": "doubao-seedance-2-0-260128",
"status": "queued",
"progress": 0,
"created_at": 1760000000
}
{
"error": {
"message": "prompt is required",
"type": "invalid_request_error",
"param": "prompt",
"code": "invalid_request"
}
}
Seedance Format
Create Seedance Video
- Call Doubao Seedance 2.0 video generation through ElkAPI.
- Asynchronous task endpoint. Returns a task ID after submission.
- Put official Seedance parameters in metadata for pass-through forwarding.
POST
/
v1
/
video
/
generations
curl --request POST \
--url 'https://api.elkapi.com/v1/video/generations' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "doubao-seedance-2-0-260128",
"prompt": "A first-person fruit tea ad, picking apples by hand, freshly cut and shaken, close-up product shots, cinematic, highly detailed",
"metadata": {
"duration": 8,
"ratio": "16:9",
"resolution": "720p",
"generate_audio": true,
"watermark": false
}
}'
import requests
url = "https://api.elkapi.com/v1/video/generations"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
payload = {
"model": "doubao-seedance-2-0-260128",
"prompt": "A first-person fruit tea ad, picking apples by hand, freshly cut and shaken, close-up product shots, cinematic, highly detailed",
"metadata": {
"duration": 8,
"ratio": "16:9",
"resolution": "720p",
"generate_audio": True,
"watermark": False
}
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
const response = await fetch("https://api.elkapi.com/v1/video/generations", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "doubao-seedance-2-0-260128",
prompt: "A first-person fruit tea ad, picking apples by hand, freshly cut and shaken, close-up product shots, cinematic, highly detailed",
metadata: {
duration: 8,
ratio: "16:9",
resolution: "720p",
generate_audio: true,
watermark: false
}
})
});
console.log(await response.json());
{
"id": "task_abc123",
"task_id": "task_abc123",
"object": "video",
"model": "doubao-seedance-2-0-260128",
"status": "queued",
"progress": 0,
"created_at": 1760000000
}
{
"error": {
"message": "prompt is required",
"type": "invalid_request_error",
"param": "prompt",
"code": "invalid_request"
}
}
curl --request POST \
--url 'https://api.elkapi.com/v1/video/generations' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "doubao-seedance-2-0-260128",
"prompt": "A first-person fruit tea ad, picking apples by hand, freshly cut and shaken, close-up product shots, cinematic, highly detailed",
"metadata": {
"duration": 8,
"ratio": "16:9",
"resolution": "720p",
"generate_audio": true,
"watermark": false
}
}'
import requests
url = "https://api.elkapi.com/v1/video/generations"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
payload = {
"model": "doubao-seedance-2-0-260128",
"prompt": "A first-person fruit tea ad, picking apples by hand, freshly cut and shaken, close-up product shots, cinematic, highly detailed",
"metadata": {
"duration": 8,
"ratio": "16:9",
"resolution": "720p",
"generate_audio": True,
"watermark": False
}
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
const response = await fetch("https://api.elkapi.com/v1/video/generations", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "doubao-seedance-2-0-260128",
prompt: "A first-person fruit tea ad, picking apples by hand, freshly cut and shaken, close-up product shots, cinematic, highly detailed",
metadata: {
duration: 8,
ratio: "16:9",
resolution: "720p",
generate_audio: true,
watermark: false
}
})
});
console.log(await response.json());
{
"id": "task_abc123",
"task_id": "task_abc123",
"object": "video",
"model": "doubao-seedance-2-0-260128",
"status": "queued",
"progress": 0,
"created_at": 1760000000
}
{
"error": {
"message": "prompt is required",
"type": "invalid_request_error",
"param": "prompt",
"code": "invalid_request"
}
}
Authorizations
string
required
All endpoints require Bearer Token authentication.
Authorization: Bearer YOUR_API_KEY
Body
string
default:"doubao-seedance-2-0-260128"
required
Seedance model ID.Available values:
doubao-seedance-2-0-260128, doubao-seedance-2-0-fast-260128string
required
Text prompt. The current adapter sends this field upstream as the final
content text item.array<string>
Array of image URLs or Base64 strings. If you need to specify
role, use metadata.content instead.string
Video duration in seconds. If set, it overrides
metadata.duration.object
Parameter object passed through to the Seedance upstream. Put official Seedance fields here.
integer
Video duration. Seedance 2.0 is usually
4 to 15 seconds; you can also pass -1 if supported upstream.string
Video aspect ratio.Example:
16:9, 4:3, 1:1, 3:4, 9:16, 21:9, adaptivestring
Resolution.Example:
480p, 720p, 1080pboolean
Whether to generate audio.
boolean
Whether to add a watermark.
integer
Random seed.
array<object>
Multimodal reference content. Supports
image_url, video_url, and audio_url; use the top-level prompt for text content.[
{
"type": "image_url",
"image_url": {
"url": "https://example.com/reference.png"
},
"role": "reference_image"
},
{
"type": "video_url",
"video_url": {
"url": "https://example.com/reference.mp4"
},
"role": "reference_video"
},
{
"type": "audio_url",
"audio_url": {
"url": "https://example.com/reference.mp3"
},
"role": "reference_audio"
}
]
Multimodal Example
curl --request POST \
--url 'https://api.elkapi.com/v1/video/generations' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "doubao-seedance-2-0-260128",
"prompt": "Use the first-person composition of the reference video throughout, use the reference audio as background music, and generate a fruit tea advertisement",
"metadata": {
"duration": 11,
"ratio": "16:9",
"generate_audio": true,
"watermark": false,
"content": [
{
"type": "image_url",
"image_url": {
"url": "https://example.com/first-frame.jpg"
},
"role": "reference_image"
},
{
"type": "video_url",
"video_url": {
"url": "https://example.com/reference.mp4"
},
"role": "reference_video"
},
{
"type": "audio_url",
"audio_url": {
"url": "https://example.com/music.mp3"
},
"role": "reference_audio"
}
]
}
}'
Response
string
Public task ID returned by ElkAPI.
string
Compatibility field. The value is the same as
id.string
Object type, fixed as
video.string
Model used by the request.
string
Task status. Usually
queued after successful submission.integer
Task creation timestamp.