Call Seedance 2.0 Mini, standard, and Fast through Token Market's native asynchronous task API. Create a task first, then use its task ID to query the result.
https://api.tokensmarket.aiPOST /api/v3/contents/generations/tasksThe endpoint remains fixed. Use the parameter documentation on this page to replace the model ID and request data.
${base_url}/api/v3/contents/generations/tasks${base_url}/api/v3/contents/generations/tasks/{task_id}All media generation requests are authenticated through the Token Market gateway. JSON requests use application/json; multipart requests are automatically generated by the client Content-Type boundary.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Authorization | string | Yes | — | Append the current workspace API Key after Bearer. Options / constraints: Bearer <API_KEY>. |
Content-Type | string | Yes | application/json | Send the request body as JSON. |
Seedance uses a native asynchronous task interface; text, pictures, video and audio reference materials are unified in the content array. Please refer to the capabilities and limitations displayed on the selected version details page.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | Yes | — | The exact Seedance model ID to call. Options / constraints: Use seedance-2-0-mini, seedance-2-0, or seedance-2-0-fast when the model is currently available in Model Market. |
content[] | array | Yes | — | Submit text prompts and reference materials in order. Options / constraints: Submit up to 9 images, 3 videos, and 3 audio files. Audio must be accompanied by an image or video. Video and audio inputs are available only for Seedance 2 |
content[].type | string | No | — | Content item type, such as text, image_url, video_url, or audio_url. |
content[].text | string | No | — | Text prompt. |
content[].image_url.url | string | No | — | Accessible URL for the reference image. |
content[].video_url.url | string | No | — | Accessible URL for the reference video. |
content[].audio_url.url | string | No | — | Accessible URL for the reference audio. |
content[].draft_task.id | string | No | — | Draft task ID. |
content[].role | string | No | — | Role of the reference asset in the task. |
callback_url | string | No | — | Callback URL for task status updates. |
return_last_frame | boolean | No | — | Whether to return the last frame. |
service_tier | string | No | — | Service tier. |
execution_expires_after | integer | No | — | Task execution expiration duration. |
generate_audio | boolean | No | — | Whether to generate audio. |
omni_reference_task_type | string | No | — | Omni-reference task type. |
output_format | string | No | — | Desired video output format. |
draft | boolean | No | — | Whether to create the task in draft mode. |
tools[] | array | No | — | Tool configuration for the task. |
safety_identifier | string | No | — | Safety identifier. |
priority | string | No | — | Task priority. |
ratio | string | No | — | Desired aspect ratio. |
frames | integer | No | — | Desired number of frames. |
seed | integer | No | — | Random seed. |
camera_fixed | boolean | No | — | Whether to fix the camera. |
watermark | boolean | No | — | Whether to add a watermark. |
duration | integer | No | — | The target video duration in seconds. |
resolution | string | No | — | Output resolution when supported by the current model. |
extra_body.provider | object | No | — | Limit or sort candidate provider channels. Options / constraints: Exposed routing configuration in JSON requests. |
After creating an interface to return the task ID, use the native task query path to poll until the confirmed final state is entered.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | No | — | The video generation task ID, used as task_id in the query path. |
status | string | No | — | Task final state. Options / constraints: succeeded, failed, expired, or cancelled. The docs do not list unconfirmed in-progress states. |
content.video_url | string | No | — | The temporary address of the generated video in the content object after the task is successful. Options / constraints: Download and copy the asset to your own storage within the validity period shown in the response. |
model | string | No | — | ID of the model used for the task. |
created_at | integer | No | — | Time when the task was created. |
updated_at | integer | No | — | Time when the task was updated. |
content.last_frame_url | string | No | — | Temporary URL for the last-frame image. |
seed | integer | No | — | Random seed used for the task. |
resolution | string | No | — | Resolution of the generated video. |
ratio | string | No | — | Aspect ratio of the generated video. |
duration | number | No | — | Duration of the generated video. |
frames | integer | No | — | Number of frames in the generated video. |
framespersecond | number | No | — | Frame rate of the generated video. |
generate_audio | boolean | No | — | Whether to generate audio. |
tools[].type | string | No | — | Type of tool used for the task. |
safety_identifier | string | No | — | Safety identifier for the task. |
priority | string | No | — | Task priority. |
draft | boolean | No | — | Whether the task is a draft. |
draft_task_id | string | No | — | ID of the associated draft task. |
service_tier | string | No | — | Service tier for the task. |
execution_expires_after | integer | No | — | Task execution expiration duration. |
usage.completion_tokens | integer | No | — | Completion token usage. |
usage.total_tokens | integer | No | — | Total token usage. |
usage.tool_usage.web_search | object | No | — | Usage information for the web search tool. |
error.code / error.message | string | No | — | Error code and error message when the task fails. |
The following fields are HTTP response headers, not JSON or SSE response body fields.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
X-Client-Request-Id | string | No | — | Echoed when supplied by the caller; not generated automatically when omitted. |
X-Upstream-Request-Id | string | No | — | Usually used for gateway request tracing; it is not the provider's original request ID. |
seedance-2-0-mini is useful for validating the integration, seedance-2-0 targets standard generation needs, and seedance-2-0-fast suits workloads that prioritize turnaround time. Base the final choice on live Model Market pricing, capabilities, and your own tests.
The create endpoint returns a task ID. Poll the task endpoint until the task reaches a terminal state. Use backoff intervals to set a maximum wait time and retry only retryable errors a limited number of times. If the task fails, record error and request_id.
Place text prompts and image, video, or audio references in the content array. Reference assets must use accessible, real URLs. Submit up to 9 images, 3 videos, and 3 audio files. Audio must be accompanied by an image or video; video and audio inputs are supported only on Seedance 2 models.
The examples use placeholders. Replace them with a currently available model ID from the model details page, and keep your API Key in a server-side environment variable.
curl -X POST "https://api.tokensmarket.ai/api/v3/contents/generations/tasks" \
-H "Authorization: Bearer $TOKEN_MARKET_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-2-0",
"content": [
{
"type": "text",
"text": "Use the subject from [Image 1] and the camera rhythm from [Video 1] to create a coherent beverage ad."
},
{
"type": "image_url",
"image_url": {"url": "https://ark-doc.tos-ap-southeast-1.bytepluses.com/doc_image/r2v_tea_pic1.jpg"},
"role": "reference_image"
},
{
"type": "video_url",
"video_url": {"url": "https://ark-doc.tos-ap-southeast-1.bytepluses.com/doc_video/r2v_tea_video1.mp4"},
"role": "reference_video"
}
],
"extra_body": {"provider": {"sort": ["latency"]}}
}'
curl -X GET "https://api.tokensmarket.ai/api/v3/contents/generations/tasks/$TASK_ID" \
-H "Authorization: Bearer $TOKEN_MARKET_API_KEY" \
-H "Content-Type: application/json"