https://api.yelinai.comRequired endpoints: 2
POST /v1/videos: create a video generation taskGET /v1/videos/{task_id}: query task status and get the result URL
GET request to the video_url returned by the completed task.
API Flow
Seedance 2.0 video generation is an asynchronous task API. Create a task first, poll the task byid, then download the mp4 after the task returns video_url.
1
Create task
Call POST /v1/videos with the model, prompt, video parameters, and optional reference assets.
2
Poll status
Call GET /v1/videos/{task_id} and check status.
3
Download video
When status=completed, read video_url from the response and download the mp4 file.
Common status progression:
failed with an error field.
Models
| Model | Description | Recommended use |
|---|---|---|
doubao-seedance-2-0-fast-260128 | Seedance 2.0 fast | Fast generation, batch jobs, general video generation |
doubao-seedance-2-0-260128 | Seedance 2.0 standard | Standard-quality generation, video editing, workflows that need more stable output |
Create Task
/v1/videos
Create a Seedance 2.0 video generation task.
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer $API_KEY |
Content-Type | Yes | application/json |
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model ID, for example doubao-seedance-2-0-fast-260128 |
prompt | string | Yes | Video generation prompt. Text-only generation only requires model and prompt |
content | array | No | Multimodal content array for image, video, or audio references |
ratio | string | No | Output aspect ratio, for example 16:9, 9:16, 1:1, 3:4, 4:3, or 21:9 |
duration | integer | No | Output duration. Use the 4-15 second range unless your account has different limits |
watermark | boolean | No | Whether to add a watermark. false is common |
generate_audio | boolean | No | Whether to generate or keep audio |
content Items
Use content to provide multimodal reference assets. Keep the top-level prompt, and for multimodal requests put the same text in the first content item for compatibility with the multimodal structure.
| Field | Type | Applies to | Required | Description |
|---|---|---|---|---|
type | string | all | Yes | text, image_url, video_url, or audio_url |
text | string | text | Yes | Prompt text |
image_url.url | string | image_url | Yes | Image URL |
video_url.url | string | video_url | Yes | Video URL |
audio_url.url | string | audio_url | Yes | Audio URL |
role | string | asset items | Recommended | reference_image, reference_video, or reference_audio |
| Reference | Meaning |
|---|---|
image 1 | The first image_url item in content |
image 2 | The second image_url item in content |
video 1 | The first video_url item in content |
audio 1 | The first audio_url item in content |
Text-to-video Example
Multimodal Reference Example
Create Response
| Field | Type | Description |
|---|---|---|
id | string | Task ID used for status polling |
object | string | Object type, usually video |
model | string | Model used by the task |
status | string | Initial status, commonly submitted or queued |
created_at | integer | Creation timestamp |
billing_detail | object | Optional billing estimate or billing detail |
Query Task
/v1/videos/{task_id}
Query the status of a video generation task.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
task_id | string | Yes | The id returned by the create task response |
Query Response
In progress:| Field | Type | Description |
|---|---|---|
id | string | Task ID |
object | string | Object type |
model | string | Model used by the task |
status | string | submitted, queued, in_progress, completed, failed, etc. |
video_url | string | Video URL returned after completion |
url | string | Some responses may use this field for the video URL |
created_at | integer | Creation timestamp |
updated_at | integer | Update timestamp |
error | object | Error details for failed tasks |
Download Video
After the query response returnscompleted, read video_url and download it directly:
video_url is usually a temporary signed URL. Download it immediately or copy it to your own object storage.
Full Python Example
Common Integration Questions
How many endpoints do I need to integrate? Two endpoints are required:POST /v1/videos to create a task and GET /v1/videos/{task_id} to query it. Download the final video by requesting the returned video_url.
When do I need content?
Text-to-video does not need content. Use the content array when you need image, video, or audio references, then refer to them in the prompt as image 1, video 1, or audio 1.
Do I need both prompt and content[0].text?
For text-to-video, top-level prompt is enough. For multimodal reference requests, keep top-level prompt and content[0].text the same for better compatibility with the multimodal structure.
What should I check if no channel is available?
Check whether the token group, billing mode, and model route are enabled. A correct model name does not guarantee that the current billing group has an available route.