Bytedance Seedance 2.0
This page is generated from the upstream official OpenAPI documentation. Endpoints, parameters and examples match the official docs; brand and API domain are replaced with ModelFold.
Endpoint
POST /jobs/createTask
Full URL: https://ai.modelfold.online/v1/jobs/createTask
Authentication: every request must include the
Authorization: Bearer <API_KEY>header.
Query Task Status
After submitting a task, use the unified query endpoint to check progress and retrieve results:
- Get Task Details — Learn how to query task status and retrieve generation results
TIP
In production environments, it is recommended to use the callBackUrl parameter to receive automatic notifications upon completion, rather than polling the status API.
Note
- Image-to-Video (First Frame), Image-to-Video (First & Last Frames), and Multimodal Reference-to-Video (including reference images, videos, and audio) are three mutually exclusive scenarios and cannot be used simultaneously.
- Do not combine
first_frame_url/last_frame_urlwith anyreference_*field.- Multimodal Reference-to-Video can indirectly achieve a "First/Last Frame + Multimodal Reference" effect by specifying reference images as the first or last frame via prompts. If you need to strictly guarantee that the first and last frames are identical to the specified images, prioritize using Image-to-Video (First & Last Frames)
Key Features
- Text-to-Video — Generate videos directly from text descriptions without input images
- Image-to-Video — First frame, or first + last frame
- Multimodal Reference — Up to 9 images, 3 videos, 3 audio clips
- Native Audio — Synchronized audio, on by default
TIP
With reference video(s), billing uses a lower per-second price × (total reference-video duration + output duration). With duration = -1, billing follows the duration actually generated. For current prices, see ai.modelfold.online/pricing.
Related Resources
- Market Overview — Explore all available models
- Common API — Check credits and account usage
Request Parameters
Body (application/json)
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | The model name to use for generation. Required field. - Must be bytedance/seedance-2 for this endpoint Default:"bytedance/seedance-2"。 Allowed values:bytedance/seedance-2。 示例:bytedance/seedance-2。 |
callBackUrl | string | No | The URL to receive generation task completion updates. Optional but recommended for production use. - System will POST task status and results to this URL when generation completes - Callback includes generated content URLs and task information - Your callback endpoint should accept POST requests with JSON payload containing results - Alternatively, use the Get Task Details endpoint to poll task status - To ensure callback security, see Webhook Verification Guide for signature verification implementation 示例: https://your-domain.com/api/callback。 |
input | object | Yes | Input parameters for the generation task |
input.prompt | string | No | The text prompt used to generate the video. Required field. (Min length: 3, Max length: 20000 characters) 示例:A serene beach at sunset with waves gently crashing on the shore, palm trees swaying in the breeze, and seagulls flying across the orange sky。 |
input.first_frame_url | string | No | First frame image url or asset://{assetId} (for example: asset://asset-20260404242101-76djj) |
input.last_frame_url | string | No | End frame image url or asset://{assetId} (for example: asset://asset-20260404242101-76djj) |
input.reference_image_urls | array<string> | No | Enter a list of image URLs or asset://{assetId} (for example: asset://asset-20260404242101-76djj). Single image requirements: Format: jpeg, png, webp, bmp, tiff, gif. Aspect ratio (width/height): (0.4, 2.5) Width and height (px): (300, 6000) Size: Single image less than 30 MB. Up to 9 images. |
input.reference_video_urls | array<string> | No | Enter a list of video URLs or asset://{assetId} (for example: asset://asset-20260404242101-76djj) . Single video requirements: Video format: mp4, mov. Resolution: 480p, 720p Duration: Single video duration [2, 15] s, maximum 3 reference videos, total duration of all videos not exceeding 15 seconds. Dimensions: Aspect ratio (width/height): [0.4, 2.5] Width/height (px): [300, 6000] Total pixels: [640×640=409600, 834×1112=927408], i.e., the product of width and height must meet the range requirement of [409600, 927408]. Size: Single video not exceeding 50 MB. Frame rate (FPS): [24, 60] |
input.reference_audio_urls | array<string> | No | Enter a list of audio URLs or asset://{assetId} (for example: asset://asset-20260404242101-76djj) . Single audio requirements: Format: wav, mp3 Duration: Single audio duration [2, 15] s, maximum 3 reference audios, total duration of all audios not exceeding 15 s. Size: Single audio file size not exceeding 15 MB. |
input.return_last_frame | boolean | No | Whether to return the last frame of the video as an image. Default:false。 示例:false。 |
input.generate_audio | boolean | No | Whether to generate audio for the video. - true: Generate with audio - false: Generate without audio Default: true。 示例:false。 |
input.resolution | string | No | Video resolution - 480p for faster generation, 720p for balance, 1080p for High-quality video, 4K Ultra-High Definition, delivering perfect visual details. 4k output is 3840×2160 encoded as H.265 (HEVC); other resolutions are H.264. Make sure your player or pipeline supports HEVC. Default:"720p"。 Allowed values:480p / 720p / 1080p / 4k。 示例:720p。 |
input.aspect_ratio | string | No | Video aspect ratio configuration. Required field. Default:"16:9"。 Allowed values:1:1 / 4:3 / 3:4 / 16:9 / 9:16 / 21:9 / adaptive。 示例:16:9。 |
input.duration | integer | No | Video duration in 4-15 seconds or -1. Default:5。 示例:5。 |
input.web_search | boolean | No | Use online search. Text-to-video only. |
input.nsfw_checker | boolean | No | Defaults to false. When false, no additional content filtering is applied and results are returned directly by the model. |
Request Example
curl -X POST "https://ai.modelfold.online/v1/jobs/createTask" \
-H "Authorization: Bearer $MODELFOLD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "bytedance/seedance-2",
"callBackUrl": "https://your-domain.com/api/callback",
"input": {
"prompt": "A serene beach at sunset with waves gently crashing on the shore, palm trees swaying in the breeze, and seagulls flying across the orange sky",
"reference_image_urls": [
"https://example.com/your-image.png"
],
"reference_video_urls": [
"https://example.com/your-video.mp4"
],
"reference_audio_urls": [
"https://example.com/your-audio.mp3"
],
"return_last_frame": false,
"generate_audio": false,
"resolution": "480p",
"aspect_ratio": "16:9",
"duration": 5,
"web_search": false
}
}'{
"model": "bytedance/seedance-2",
"callBackUrl": "https://your-domain.com/api/callback",
"input": {
"prompt": "A serene beach at sunset with waves gently crashing on the shore, palm trees swaying in the breeze, and seagulls flying across the orange sky",
"reference_image_urls": [
"https://example.com/your-image.png"
],
"reference_video_urls": [
"https://example.com/your-video.mp4"
],
"reference_audio_urls": [
"https://example.com/your-audio.mp3"
],
"return_last_frame": false,
"generate_audio": false,
"resolution": "480p",
"aspect_ratio": "16:9",
"duration": 5,
"web_search": false
}
}Response
200 — Request successful
{
"code": 200,
"msg": "success",
"data": {
"taskId": "task_bytedance_1765186743319"
}
}Callback
videoTaskCompleted
Callback URL: {request.body#/callBackUrl} (the callBackUrl in the request body).
The system sends this callback when the bytedance/seedance-2 task succeeds or fails.
Callback body parameters
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
code | integer | 是 | Unified callback code: 200 for success, 501 for failure. Allowed values:200 / 501。 示例:200。 |
msg | string | 是 | Unified callback message. Allowed values:Playground task completed successfully. / Playground task failed.。 示例:Playground task completed successfully.。 |
data | object | 是 | — |
data.taskId | string | 是 | The unique task identifier. |
data.model | string | 是 | The model used for the task. Allowed values:bytedance/seedance-2。 示例:bytedance/seedance-2。 |
data.state | string | 是 | Terminal task state. Allowed values:success / fail。 示例:success。 |
data.param | string | 是 | JSON string containing the submitted task parameters. |
data.resultJson | string | 否 | JSON string containing resultUrls. When return_last_frame is true, resultJson also contains lastFrameUrl. Present only when state is success. |
data.failCode | string | 否 | Failure code, a numeric string such as "400" or "500". Present only when state is fail. |
data.failMsg | string | 否 | Failure reason. Present only when state is fail. |
data.costTime | integer | 否 | Processing time in seconds. Present on both success and failure callbacks. |
data.completeTime | integer | 否 | Task completion timestamp. |
data.createTime | integer | 否 | Task creation timestamp. |
data.updateTime | integer | 否 | Use completeTime as the completion time; updateTime may equal createTime. |
data.creditsConsumed | number | 否 | Credits consumed by the task; 0 for failed tasks. |
Task completed successfully
{
"code": 200,
"msg": "Playground task completed successfully.",
"data": {
"taskId": "task_example_video_webhook_001",
"model": "bytedance/seedance-2",
"state": "success",
"param": "{\"input\":\"{\\\"prompt\\\":\\\"A serene beach at sunset with waves gently crashing on the shore, palm trees swaying in the breeze, and seagulls flyi...\\\",\\\"first_frame_url\\\":\\\"https://example.com/input-image.jpg\\\",\\\"last_frame_url\\\":\\\"https://example.com/input-image.jpg\\\",\\\"reference_image_urls\\\":[\\\"https://example.com/input-image.jpg\\\"],\\\"reference_video_urls\\\":[\\\"https://example.com/input-video.mp4\\\"],\\\"reference_audio_urls\\\":[\\\"https://example.com/input-audio.mp3\\\"],\\\"return_last_frame\\\":false,\\\"generate_audio\\\":false,\\\"resolution\\\":\\\"720p\\\",\\\"aspect_ratio\\\":\\\"16:9\\\",\\\"duration\\\":15,\\\"web_search\\\":false}\",\"callBackUrl\":\"https://example.com/callback\",\"model\":\"bytedance/seedance-2\"}",
"resultJson": "{\"resultUrls\":[\"https://example.com/generated-video.mp4\"],\"lastFrameUrl\":[\"https://example.com/last-frame.jpg\"]}",
"costTime": 12,
"completeTime": 1234567890,
"createTime": 1234560000,
"updateTime": 1234567890,
"creditsConsumed": 1.23
}
}Task failed
{
"code": 501,
"msg": "Playground task failed.",
"data": {
"taskId": "task_example_video_webhook_001",
"model": "bytedance/seedance-2",
"state": "fail",
"param": "{\"input\":\"{\\\"prompt\\\":\\\"A serene beach at sunset with waves gently crashing on the shore, palm trees swaying in the breeze, and seagulls flyi...\\\",\\\"first_frame_url\\\":\\\"https://example.com/input-image.jpg\\\",\\\"last_frame_url\\\":\\\"https://example.com/input-image.jpg\\\",\\\"reference_image_urls\\\":[\\\"https://example.com/input-image.jpg\\\"],\\\"reference_video_urls\\\":[\\\"https://example.com/input-video.mp4\\\"],\\\"reference_audio_urls\\\":[\\\"https://example.com/input-audio.mp3\\\"],\\\"return_last_frame\\\":false,\\\"generate_audio\\\":false,\\\"resolution\\\":\\\"720p\\\",\\\"aspect_ratio\\\":\\\"16:9\\\",\\\"duration\\\":15,\\\"web_search\\\":false}\",\"callBackUrl\":\"https://example.com/callback\",\"model\":\"bytedance/seedance-2\"}",
"failCode": "400",
"failMsg": "<error detail>",
"costTime": 12,
"creditsConsumed": 0
}
}