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 unified gateway and use a JSON request body.
| 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 the native asynchronous task API. Put text, image, and video reference assets in the content array, and follow the capabilities and limits shown on the selected model 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 prompt, reference image, and reference video content in order. Options / constraints: Use image_url or video_url with the corresponding role, and submit only input modalities supported by the selected version. |
generate_audio | boolean | No | true | Whether to generate audio. |
ratio | string | No | 16:9 | The target frame aspect ratio. Options / constraints: Supported values depend on the selected model details page. |
duration | integer | No | 8 | The target video duration in seconds. Options / constraints: The available range depends on the selected model and current provider channel. |
watermark | boolean | No | false | Whether to add a watermark. |
After the create endpoint returns a task ID, poll the native task query path until the task succeeds or fails.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | No | — | The video generation task ID, used as task_id in the query path. |
status | string | No | — | The current task status, as returned by the gateway. |
content[].video_url.url | string | No | — | The temporary generated video URL returned after the task succeeds. Options / constraints: Download and copy the asset to your own storage within the validity period shown in the response. |
error | object | No | — | Error information returned when the task fails. |
request_id | string | No | — | A request identifier for log lookup and troubleshooting. |
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.
Save the task ID returned by the create endpoint and query GET /api/v3/contents/generations/tasks/{task_id} with backoff. Set a maximum wait time and use bounded retries only for retryable errors. Record error and request_id when a task fails.
Reference images and videos in content must use reachable real URLs and be organized with image_url or video_url plus the reference_image or reference_video role. Input limits still depend on the selected version.
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"
}
],
"generate_audio": true,
"ratio": "16:9",
"duration": 8,
"watermark": false
}'
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"