Generate videos
Video models run as tasks: you submit a request and get a task ID straight away, check the task until it finishes, then download the video. Every video model on SteadyRouter uses the same endpoints, POST /v1/video/generations to submit and GET /v1/video/generations/{task_id} to check, with your key in Authorization: Bearer.
Pricing
- Video is charged per video. The price depends on the model, the resolution and the length you ask for. Each model's current prices are on Model Square.
- A video costs far more than a chat request. The US$0.05 of credit that new accounts currently start with usually isn't enough for one video. Add funds before you start: see Top-ups and refunds.
- The price is taken from your balance when the task is accepted. If the task fails, it is refunded in full.
- Seedance models (
doubao-seedance-*) are charged an estimate when you submit, then settled when the video is ready, based on the tokens the video actually used: you get the difference back, or pay the difference. - Always set the resolution. If you leave it out, many models use 1080p, which usually costs more.
Before you start
- Create a SteadyRouter account and add funds.
- In the console, open API Keys and copy your key. New accounts come with one, Default Key; to make another, click Create API Key.
- The examples below read the key from an environment variable:
Shell
export STEADYROUTER_API_KEY="sk-..."
Step 1: Submit the task
This example makes a 5-second, 540p video from a text prompt with viduq3-turbo:
curl https://api.steadyrouter.com/v1/video/generations \
-H "Authorization: Bearer $STEADYROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "viduq3-turbo",
"prompt": "a red apple slowly rotating on a white table, soft light",
"size": "540p",
"duration": 5
}'
The reply comes back right away. Keep the task_id:
{
"id": "task_4fQ9pX2mLc7RtB1vN8sK3wZ6yH0dJ5aE",
"task_id": "task_4fQ9pX2mLc7RtB1vN8sK3wZ6yH0dJ5aE",
"object": "video",
"model": "viduq3-turbo",
"status": "queued",
"progress": 0,
"created_at": 1793000000
}
Step 2: Check the task
curl https://api.steadyrouter.com/v1/video/generations/task_4fQ9pX2mLc7RtB1vN8sK3wZ6yH0dJ5aE \
-H "Authorization: Bearer $STEADYROUTER_API_KEY"
Check every 10 to 15 seconds. A video usually takes from one to a few minutes. While it runs, the reply looks like this (some fields left out):
{
"code": "success",
"message": "",
"data": {
"task_id": "task_4fQ9pX2mLc7RtB1vN8sK3wZ6yH0dJ5aE",
"status": "IN_PROGRESS",
"progress": "30%",
"fail_reason": "",
"submit_time": 1793000000,
"start_time": 1793000022,
"finish_time": 0
}
}
data.status | What it means |
|---|---|
NOT_START, SUBMITTED, QUEUED, IN_PROGRESS | Still running. Keep checking. |
SUCCESS | Done: progress is 100% and result_url links to the video. Download it (step 3). |
FAILURE | No video was made. fail_reason says why, and the charge is refunded. |
You can check a task with any key from the same account.
Step 3: Download the video
curl -o video.mp4 \
https://api.steadyrouter.com/v1/videos/task_4fQ9pX2mLc7RtB1vN8sK3wZ6yH0dJ5aE/content \
-H "Authorization: Bearer $STEADYROUTER_API_KEY"
This works the same way for every video model; result_url from step 2 also points to the video. Videos are kept for a limited time only, so save yours soon after the task finishes.
Parameters by model
Every model takes model and prompt. The other fields depend on the model family:
- Vidu and Wan:
"size"sets the resolution and"duration"the length in seconds, as in step 1. - Seedance: put both inside
"metadata", as"resolution"and"duration"(example below). - Kling:
"mode"is"std"or"pro", and"duration"the length in seconds."size"sets the shape:"1280x720"(16:9),"720x1280"(9:16) or"1024x1024"(1:1, the default). Forkling-video, also set the version:"metadata": {"model_name": "kling-v3"}(the only version offered; example below). - Veo:
"size"is required,"1280x720"or"720x1280";"seconds", if you set it, is"8". Every Veo video is about 8 seconds long, and each Veo model charges one price per video, whatever the size. - MiniMax (Hailuo):
"duration"is required, in whole seconds, and the resolution goes inside"metadata"as"resolution", written"768P"or"2K"exactly like that."ratio"(for example"16:9") can go in"metadata"too. A starting image goes in"images", or a first and last frame in"metadata"as"first_frame"and"last_frame"; each image adds a small charge (example below). Video and audio inputs aren't supported. - A starting image goes in
"images": ["https://..."], or in"image": "https://..."for Wan and Kling.
The gateway refuses values outside this table (see the errors below). Write resolutions in lower case, as shown, except 768P and 2K for MiniMax-H3.
Kling (kling-video, kling-video-v4), Veo (veo_3_1, veo_3_1-fast) and MiniMax (MiniMax-H3) are currently offered in groups from a single supplier, so they don't have the Failover tag on Model Square: if that supplier fails, there is no other group to move the request to (see Models and groups).
| Models | Resolution | Seconds | Starting image |
|---|---|---|---|
viduq3-providuq3-turbo | 540p, 720p, 1080p | 1 to 16 | Optional |
viduq2 | 540p, 720p, 1080p | 5 | Optional |
viduq2-providuq2-turbo | 540p, 720p, 1080p | 5 | Required |
doubao-seedance-2-0-260128 | 480p, 720p, 1080p, 4k | 4 to 15 | Optional |
doubao-seedance-2-5-260628 | 480p, 720p, 1080p | 4 to 15 | Optional |
doubao-seedance-2-0-fast-260128doubao-seedance-2-0-mini-260615 | 480p, 720p | 4 to 15 | Optional |
wan2.5-i2v-preview | 480p, 720p, 1080p | 5, 10 | Required |
wan2.6-i2v | 720p, 1080p | 5, 10, 15 | Required |
wan3.0-video | 480p, 720p, 1080p | 5 | Not supported |
kling-video (version kling-v3) | mode std or pro | 3 to 15 | Optional |
kling-video-v4 | mode std (720p) or pro (1080p) | 3 to 30 | Optional |
veo_3_1veo_3_1-fast | 720p (size 1280x720 or 720x1280) | 8 | Not supported |
viduq4-preview | 540p, 720p, 1080p, 2k, 4k | 3 to 16 | Required |
MiniMax-H3 | 768P, 2K (in metadata) | 4 to 15 | Optional |
For example, a 4-second, 480p Seedance video:
{
"model": "doubao-seedance-2-0-mini-260615",
"prompt": "a red apple slowly rotating on a white table, soft light",
"metadata": {"resolution": "480p", "duration": 4}
}
And a 5-second Kling v3 video in standard mode:
{
"model": "kling-video",
"prompt": "a red apple slowly rotating on a white table, soft light",
"mode": "std",
"duration": 5,
"size": "1280x720",
"metadata": {"model_name": "kling-v3"}
}
And a 6-second MiniMax-H3 video at 768P from a starting image:
{
"model": "MiniMax-H3",
"prompt": "a red apple slowly rotating on a white table, soft light",
"duration": 6,
"images": ["https://example.com/apple.png"],
"metadata": {"resolution": "768P"}
}
If something goes wrong
| What you see | What to do |
|---|---|
400 task_price_unsupported | The model doesn't take that resolution, length or input. Check the table above. |
401 Invalid token | The key is wrong, disabled, expired or out of its spending cap. Check it under API Keys. |
403 insufficient_user_quota | Your balance can't cover the video. Add funds. |
503 model_not_found | The model name is wrong, or the groups your key uses don't offer it. Check the name on Model Square. |
| 429 | The upstream is busy. Try again in a little while. |
FAILURE in step 2 | The upstream didn't make the video, for example because it rejected the prompt or the image. The charge is refunded; change the request and submit again. |
When you email support@steadyrouter.com about a video, include its task_id.
More: API docs · Model Square