01Quick start
Asynchronous jobs: submit to get an id, poll until completed, then fetch the video.
Use the right endpoint. These models use POST /v1/videos, not /v1/chat/completions — the chat endpoint returns 404.
- Base URL
https://www.salpx.com/v1- Auth
Authorization: Bearer <SalpX Token>- Submit
POST /v1/videos- Query
GET /v1/videos/{id}- Models
- 8 models, see section 02
- Line (optional)
line:kd/hm, the preferred line; defaults to kd- Auto switch (optional)
auto_switch: defaults totrue;falsekeeps the job on the preferred line with no switching (see section 02)- Required
model,prompt,duration(integer seconds, 4 – 15)- Client timeout
- Allow a total polling timeout of ≥ 900 seconds
The model name sets the resolution; you don't need to send it. Any resolution in the request is replaced with the model's tier.
02Models & pricing
Per-second billing: unit price × output seconds = total. Prices in CNY per second.
| Model | Edition | Resolution | kd | hm |
|---|---|---|---|---|
seedance-2.0-480p | Standard | 480P | ¥0.3220 / s | ¥0.3680 / s |
seedance-2.0-720p | Standard | 720P | ¥0.6930 / s | ¥0.7920 / s |
seedance-2.0-1080p | Standard | 1080P | ¥1.7360 / s | ¥1.9840 / s |
seedance-2.0-4k | Standard | 4K | ¥3.5350 / s | ¥4.0400 / s |
seedance-2.0-fast-480p | Fast | 480P | ¥0.1665 / s | ¥0.2146 / s |
seedance-2.0-fast-720p | Fast | 720P | ¥0.3600 / s | ¥0.4640 / s |
seedance-2.0-mini-480p | Mini | 480P | ¥0.0805 / s | ¥0.1035 / s |
seedance-2.0-mini-720p | Mini | 720P | ¥0.1750 / s | ¥0.2250 / s |
Preferred line line: add "line": "kd" or "line": "hm" at the top level of the request; it defaults to kd. Both lines take the same parameters and return the same format.
Auto switch auto_switch (on by default): if the preferred line fails to accept or to generate the job, it is redone on the other line and billed at the price of the line that delivered the video (the difference is refunded or charged). With "auto_switch": false the job stays on the preferred line; a failure returns an error with a full refund, and the charge is always the preferred line's price.
The model in responses and usage logs is the model you requested; the logs note the actual line. Reference images, videos and audio cost nothing extra; with or without sound costs the same.
03Billing
Charged in advance when the job is accepted; refunded in full if it fails or times out.
| Case | Formula |
|---|---|
| Every request (text / first-last frame / any reference assets) | actual line price × output seconds |
Example: seedance-2.0-720p on line kd, 5 seconds → ¥0.6930 × 5 = ¥3.465. If kd fails and the job switches to hm → settled at ¥0.7920 × 5 = ¥3.96, and the difference is charged automatically.
04Asset rules
role | Max | Notes |
|---|---|---|
first_frame | 1 | First frame (first frame alone = image-to-video) |
last_frame | 1 | Last frame, used with a first frame |
reference_image | 9 | Reference image (subject / style / composition); refer to them in order in the prompt as "image 1", "image 2"… |
reference_video | 3 | Reference video (camera / motion), ≤ 15 seconds in total; "video 1"… |
reference_audio | 3 | Reference audio (rhythm / ambience); "audio 1"… |
Combinations: first_frame / last_frame cannot be mixed with reference_*; the three reference_* roles combine freely. Reference audio needs at least one reference image or reference video; audio alone is not supported.
Image requirements (reference images / first and last frames)
Every image must meet the table below; one bad image fails the whole job (refunded automatically).
| Item | Requirement |
|---|---|
| Width and height | both 300 – 6000 px |
| Aspect ratio (width ÷ height) | 0.4 – 2.5 |
| Format | JPG / PNG / WEBP recommended |
| Size | under 30 MB each |
Media must be public URLs that can be downloaded directly. Private cloud links, pages behind a login or hotlink protection make the job fail. audio_url must point to a real audio file (wav / mp3, etc.).
05Submit a job
5.1 Request format
Put the text in the top-level prompt and the media in metadata.content, each item with a role (see section 04).
| Parameter | Where | Notes |
|---|---|---|
duration | top level | Required, output seconds, integer 4 – 15 |
ratio | top level | Optional: 16:9, 4:3, 1:1, 3:4, 9:16, 21:9, adaptive |
line | top level | Optional, preferred line kd / hm |
auto_switch | top level | Optional, switch lines on failure, defaults to true |
metadata.content | metadata | Array of media assets |
metadata.generate_audio | metadata | Generate sound, true / false, same price |
Do not send ratio with a first frame or first-last frame job. The aspect ratio follows the first-frame image, and a ratio makes the upstream reject the job (it fails and is refunded).
Images must go in metadata.content with a role. Images in a top-level images field are always treated as reference images, never as first / last frames.
5.2 Text-to-video
curl -X POST https://www.salpx.com/v1/videos \ -H "Authorization: Bearer $SALPX_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "seedance-2.0-720p", "line": "kd", "prompt": "An orange cat stretches on the windowsill in the sunlight, slow push-in", "duration": 5, "ratio": "16:9" }'
5.3 First frame / first-last frame
curl -X POST https://www.salpx.com/v1/videos \ -H "Authorization: Bearer $SALPX_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "seedance-2.0-fast-720p", "prompt": "Transition naturally from the first image to the second", "duration": 5, "metadata": { "content": [ {"type":"image_url","image_url":{"url":"https://your-cdn.com/first.png"},"role":"first_frame"}, {"type":"image_url","image_url":{"url":"https://your-cdn.com/last.png"},"role":"last_frame"} ] } }'
For first-frame image-to-video, drop the last_frame item.
5.4 Reference image + reference audio, with sound
curl -X POST https://www.salpx.com/v1/videos \ -H "Authorization: Bearer $SALPX_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "seedance-2.0-mini-720p", "line": "hm", "prompt": "The character matches image 1 and moves to the rhythm of audio 1", "duration": 8, "ratio": "9:16", "metadata": { "content": [ {"type":"image_url","image_url":{"url":"https://your-cdn.com/char.png"},"role":"reference_image"}, {"type":"audio_url","audio_url":{"url":"https://your-cdn.com/bgm.mp3"},"role":"reference_audio"} ], "generate_audio": true } }'
5.5 Reference video
curl -X POST https://www.salpx.com/v1/videos \ -H "Authorization: Bearer $SALPX_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "seedance-2.0-1080p", "prompt": "The character matches image 1, the camera follows video 1", "duration": 10, "ratio": "16:9", "metadata": { "content": [ {"type":"image_url","image_url":{"url":"https://your-cdn.com/char.png"},"role":"reference_image"}, {"type":"video_url","video_url":{"url":"https://your-cdn.com/motion.mp4"},"role":"reference_video"} ] } }'
5.6 Successful response
You get a SalpX job ID (starting with task_); use it for every later query.
{
"id": "task_ZGOsx7cpxq61VFTwML8hOd6sLFMGL8KN",
"task_id": "task_ZGOsx7cpxq61VFTwML8hOd6sLFMGL8KN",
"object": "video",
"model": "seedance-2.0-mini-480p",
"status": "queued",
"progress": 0,
"created_at": 1795517268
}
06Poll & download
Poll GET /v1/videos/{id}, every 15 seconds is a good interval.
curl https://www.salpx.com/v1/videos/task_ZGOsx7cpxq61VFTwML8hOd6sLFMGL8KN \ -H "Authorization: Bearer $SALPX_KEY"
status | Meaning |
|---|---|
queued | Queued |
in_progress | Generating |
completed | Done; the video URL is in metadata.url |
failed | Failed; the reason is in error; refunded automatically |
The video URL is in metadata.url, not at the top level. Read it as resp["metadata"]["url"]. progress is only a rough mapping of the status; use status to decide when the job is finished.
{
"id": "task_ZGOsx7cpxq61VFTwML8hOd6sLFMGL8KN",
"object": "video",
"model": "seedance-2.0-mini-480p",
"status": "completed",
"progress": 100,
"created_at": 1795517268,
"completed_at": 1795517352,
"metadata": {
"url": "https://xxxx.volces.com/xxxx.mp4?X-Tos-Expires=86400..."
}
}
Video URLs expire after 24 hours; download and store them promptly.
07Errors
| HTTP | Typical message | Fix |
|---|---|---|
| 404 | bad response status code 404 | You used /v1/chat/completions; use POST /v1/videos |
| 400 | duration out of range | Integer 4 – 15 seconds |
| 400 | audio input must be accompanied by at least one reference image or video | Send reference audio together with a reference image / video |
| 400 | at most 9 reference images / 3 reference videos / 3 reference audios | Send fewer assets |
| — | Job failed: ratio is not valid … follows the first-frame image | Remove ratio from first frame / first-last frame jobs |
| — | Job failed: failed to download the reference material | Media URLs must be publicly downloadable |
| — | Job failed: reference image size / aspect ratio | Crop to the image requirements in section 04 and retry |
| 403 | token quota is not enough | Not enough balance; top up or use another token |
| 503 | No available channel / this line is temporarily unavailable | Misspelled model, token group not enabled, or the line is temporarily down (turn on auto_switch or retry later) |
Automatic refunds. Rejected submissions, upstream failures, timeouts and failed jobs are refunded in full.