Video ModelsSeedance
Seedance 2.0 Text to Video
Get API Keyseedance-2.0-text-to-video
Seedance 2.0 Text to Video API Documentation
Generate video content using the
seedance-2.0-text-to-videomodel
Overview
This document describes how to use the seedance-2.0-text-to-video model for text-to-video generation.
The integration flow consists of two steps:
- Create a generation task
- Query task status and results
Authentication
All API requests require a Bearer Token in the request header:
Authorization: Bearer YOUR_API_KEYGet API Key:
- Open the API Keys page
- Click
Create API Key - Add the key to the request header:
Authorization: Bearer YOUR_API_KEY
1. Create Generation Task
API Information
- URL:
POST https://aigptimage.com/api/v1/jobs/createTask - Content-Type:
application/json
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Public model ID. Must be exactly seedance-2.0-text-to-video |
input | object | Yes | Input parameters object |
Model Parameter
The model parameter specifies which public video model to use.
| Property | Value | Description |
|---|---|---|
| Format | seedance-2.0-text-to-video | Exact public model identifier |
| Type | string | Must be passed as a string |
| Required | Yes | Mandatory for all create task requests |
Note: The
modelvalue must match exactly and use the public model ID shown on this page.
input Object Parameters
prompt
- Type:
string - Required: Yes
- Description: Text prompt describing the video to generate
- Max Length: 20000 characters
aspect_ratio
- Type:
string - Required: No
- Description: Convenience field accepted by the public API and internally mapped to
ratio - Common Options:
16:9,9:16,1:1
ratio
- Type:
string - Required: No
- Description: Output video ratio. If both
ratioandaspect_ratioare provided,ratiotakes priority - Common Options:
16:9,9:16,1:1
resolution
- Type:
string - Required: No
- Description: Output resolution used for generation and billing
- Options:
480p,720p,1080p
duration
- Type:
number - Required: No
- Description: Video duration in seconds
generate_audio
- Type:
boolean - Required: No
- Description: Whether to generate audio for the output video
- Default Value:
false
web_search
- Type:
boolean - Required: No
- Description: Whether to enable web search assistance before generation
- Default Value:
false
nsfw_checker
- Type:
boolean - Required: No
- Description: Controls platform-side content filtering for the generated result
- Default Value:
false - Behavior: If set to
false, platform-side content filtering is disabled and the model result is returned directly
Credit Consumption
The current public credit rule for seedance-2.0-text-to-video is:
| Resolution | Credits per second |
|---|---|
480p | 20 |
720p | 40 |
1080p | 80 |
Request Example
{
"model": "seedance-2.0-text-to-video",
"input": {
"prompt": "A slow dolly shot through a futuristic botanical lab with soft volumetric light",
"ratio": "16:9",
"resolution": "720p",
"duration": 5,
"generate_audio": false,
"nsfw_checker": false
}
}Response Example
{
"code": 200,
"msg": "success",
"data": {
"taskId": "task_xxxxxxxxxxxxx"
}
}Response Parameters
| Parameter | Type | Description |
|---|---|---|
code | integer | Response status code. 200 means success |
msg | string | Response message |
data.taskId | string | Task ID used to query task status |
2. Query Task Status
API Information
- URL:
GET https://aigptimage.com/api/v1/jobs/recordInfo - Parameter:
taskId(URL query parameter)
Request Example
GET https://aigptimage.com/api/v1/jobs/recordInfo?taskId=task_xxxxxxxxxxxxxResponse Example
{
"code": 200,
"msg": "success",
"data": {
"taskId": "task_xxxxxxxxxxxxx",
"model": "seedance-2.0-text-to-video",
"state": "waiting",
"param": "{\"model\":\"seedance-2.0-text-to-video\",\"input\":{\"prompt\":\"A slow dolly shot through a futuristic botanical lab with soft volumetric light\",\"ratio\":\"16:9\",\"resolution\":\"720p\",\"duration\":5,\"generate_audio\":false}}",
"resultJson": null,
"failCode": null,
"failMsg": null,
"costTime": null,
"completeTime": null,
"createTime": 1757584164490
}
}Response Parameters
| Parameter | Type | Description |
|---|---|---|
code | integer | Response status code. 200 means success |
msg | string | Response message |
data.taskId | string | Task ID |
data.model | string | Public model ID |
data.state | string | Task status: waiting, success, fail |
data.param | string | Original create task request parameters as JSON string |
data.resultJson | string | null | Result JSON string. For video tasks it contains resultUrls when successful |
data.failCode | string | null | Failure code when the task fails |
data.failMsg | string | null | Failure message when the task fails |
data.costTime | integer | null | Task duration in milliseconds after completion |
data.completeTime | integer | null | Completion timestamp in milliseconds |
data.createTime | integer | Creation timestamp in milliseconds |
Success Result Structure
For video generation tasks, resultJson usually has this structure:
{
"resultUrls": ["https://your-cdn.example.com/result-1.mp4"]
}Usage Flow
- Call
POST /api/v1/jobs/createTask - Extract
taskIdfrom the response - Poll
GET /api/v1/jobs/recordInfo?taskId=... - Wait until
statebecomessuccessorfail - Read output video URLs from
resultJsonwhen the task succeeds
Notes
- API calls use the same credit balance and billing rules as the web app
resolution,duration, and audio settings affect credit consumptionratiotakes precedence overaspect_ratiowhen both are provided
Error Codes
| Status Code | Description |
|---|---|
200 | Request successful |
400 | Invalid request parameters |
401 | Authentication failed or API key is invalid |
402 | Insufficient credits |
404 | Task or resource not found |
409 | Active task limit exceeded or request conflict |
422 | Parameter validation failed |
429 | Request rate limit exceeded |
500 | Internal server error |