SteadyRouterDocs

Docs › APIs

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

Before you start

  1. Create a SteadyRouter account and add funds.
  2. In the console, open API Keys and copy your key. New accounts come with one, Default Key; to make another, click Create API Key.
  3. 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
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:

Response
{
  "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
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):

Response
{
  "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.statusWhat it means
NOT_START, SUBMITTED, QUEUED, IN_PROGRESSStill running. Keep checking.
SUCCESSDone: progress is 100% and result_url links to the video. Download it (step 3).
FAILURENo 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
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:

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).

ModelsResolutionSecondsStarting image
viduq3-pro
viduq3-turbo
540p, 720p, 1080p1 to 16Optional
viduq2540p, 720p, 1080p5Optional
viduq2-pro
viduq2-turbo
540p, 720p, 1080p5Required
doubao-seedance-2-0-260128480p, 720p, 1080p, 4k4 to 15Optional
doubao-seedance-2-5-260628480p, 720p, 1080p4 to 15Optional
doubao-seedance-2-0-fast-260128
doubao-seedance-2-0-mini-260615
480p, 720p4 to 15Optional
wan2.5-i2v-preview480p, 720p, 1080p5, 10Required
wan2.6-i2v720p, 1080p5, 10, 15Required
wan3.0-video480p, 720p, 1080p5Not supported
kling-video (version kling-v3)mode std or pro3 to 15Optional
kling-video-v4mode std (720p) or pro (1080p)3 to 30Optional
veo_3_1
veo_3_1-fast
720p (size 1280x720 or 720x1280)8Not supported
viduq4-preview540p, 720p, 1080p, 2k, 4k3 to 16Required
MiniMax-H3768P, 2K (in metadata)4 to 15Optional

For example, a 4-second, 480p Seedance video:

JSON
{
  "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:

JSON
{
  "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:

JSON
{
  "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 seeWhat to do
400 task_price_unsupportedThe model doesn't take that resolution, length or input. Check the table above.
401 Invalid tokenThe key is wrong, disabled, expired or out of its spending cap. Check it under API Keys.
403 insufficient_user_quotaYour balance can't cover the video. Add funds.
503 model_not_foundThe model name is wrong, or the groups your key uses don't offer it. Check the name on Model Square.
429The upstream is busy. Try again in a little while.
FAILURE in step 2The 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