Model chooser

Prices checked 16 October 2026 in the live price feed. Per-second prices are base rates; resolution and audio can change the charge for Wan and Kling. Seedance and MiniMax H3 durations come from the model descriptions and relay limits. Seedance video-token resolutions come from the feed descriptions and supported request options.

Model IDBilling unitPrice (USD)DurationResolution
MiniMax-H3-768pSecond$0.06721 to 15 s768p
minimax_h3_768p-15sSecond$0.06721 to 15 s768p
minimax_h3_1080p-10sSecond$0.10751 to 10 s1080p
doubao-seedance-1-0-pro-fast-251015Video tokenfrom $0.5642 per 1M output video tokensConfirm in Model Square480p, 720p, 1080p
doubao-seedance-2-0-260128Video tokenfrom $2.1493 per 1M output video tokensConfirm in Model Square480p, 720p, 1080p, 4K
doubao-seedance-2-0-fast-260128Video tokenfrom $2.9552 per 1M output video tokensConfirm in Model Square480p, 720p
doubao-seedance-2-5-260628Video tokenfrom $5.6418 per 1M output video tokensConfirm in Model Square480p, 720p, 1080p
kling/kling-v3-omni-video-generationSecond$0.0805973 to 15 s; Omni reference video: 3 to 10 s720P, 1080P, 4K
kling/kling-v3-turbo-video-generationSecond$0.1074633 to 15 s720P, 1080P
kling/kling-v3-video-generationSecond$0.0805973 to 15 s720P, 1080P, 4K
seedance-2.0-1080pSecond$0.33294 to 15 s (relay limit)1080p
seedance-2.0-480pSecond$0.06214 to 15 s (relay limit)480p
seedance-2.0-4kSecond$0.67894 to 15 s (relay limit)4k
seedance-2.0-720pSecond$0.13354 to 15 s (relay limit)720p
seedance-2.5-1080pSecond$0.50274 to 15 s (relay limit)1080p
seedance-2.5-480pSecond$0.09034 to 15 s (relay limit)480p
seedance-2.5-720pSecond$0.20314 to 15 s (relay limit)720p
wan3.0-videoSecond$0.0448072 to 30 s, or -1 (model chooses length)480P, 720P, 1080P
wan3.0-video-primeSecond$0.067212 to 30 s, or -1 (model chooses length)480P, 720P, 1080P

Seedance billing and downloads

  • Per second: resolution-specific IDs use the rates above. Send whole seconds from 4 to 15, using seconds or duration, never both. The resolution is fixed by the model ID.
  • Per video token: doubao-seedance-* models use the completed task's video-token count. Rates depend on resolution and input video. Check Model Square for the pricing rule and accepted duration before submitting.

Some Seedance variants have a daily usage limit. Availability can be restricted when that limit is reached.

For Seedance, wait for completed, then download with GET /v1/videos/{id}/content and the Authorization header. Wan and Kling instead return a signed metadata.url that downloads without an API key. Send your API key only to the TokenRoc API.

curl / Seedance download
curl --fail -o video.mp4 https://api.tokenroc.com/v1/videos/$TASK_ID/content \
  -H "Authorization: Bearer $TOKENROC_API_KEY"

Video endpoints

MethodEndpointUse
POST/v1/videosSubmit a task.
GET/v1/videos/{id}Check its status.
GET/v1/videos/{id}/contentDownload a completed Seedance video with your API key.

Before you begin

  • An account and a API key. Register in the console, then create a API key on the API Keys page. Keep it on your server, never in browser or mobile code.
  • Balance. The Wan and Kling examples are charged per generated second. Some other video models are charged per generated video or per output video token, as listed in Model Square. Top up on the Wallet page if needed.
  • A model ID. This guide uses wan3.0-video, the lowest per-second rate. Confirm it in Model Square.
  • Patience. A task usually takes minutes, and sometimes much longer. Plan to check back rather than hold one connection open.
  1. SubmitPOST /v1/videos
  2. Save the IDid: task_...
  3. CheckGET /v1/videos/{id}
  4. Downloadmetadata.url

Set your API key once in the terminal you will use:

terminal · bash / zsh
export TOKENROC_API_KEY="your-api-key"

Step 1: Submit a task

Send the model, a prompt, a resolution, and a length in seconds:

terminal · POST /v1/videos
curl https://api.tokenroc.com/v1/videos \
  -H "Authorization: Bearer $TOKENROC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "wan3.0-video",
    "prompt": "A paper boat drifting across a shallow pool, soft daylight",
    "size": "480P",
    "duration": 2
  }'
FieldRequiredAccepted values
modelYesOne of the video model IDs under Choose a model.
promptYesA description of the clip.
sizeNoResolution: 480P, 720P, or 1080P for Wan; 720P, 1080P, or supported 4k for Kling. Defaults to 1080P. See the resolution price table for the selected tier.
durationNoWhole seconds. Defaults to 5. Wan accepts 2 to 30, Kling accepts 3 to 15.

Step 2: Save the task ID

TokenRoc replies straight away. The response describes the task, not the video:

response · 200 OKapplication/json
{
  "id": "task_...",
  "task_id": "task_...",
  "object": "video",
  "model": "wan3.0-video",
  "status": "queued",
  "progress": 0,
  "created_at": 1790000000
}

Store id somewhere durable, such as your database, before you do anything else. It is the only way to find this video again. task_id holds the same value for older clients.

Submit once. Every submission is a new task with its own charge. If you lose track of a task, check the ID you saved instead of sending the prompt again.

Step 3: Check the task

Ask for the task by its ID:

terminal · GET /v1/videos/{id}
export TASK_ID="paste-the-id-from-step-2"

curl https://api.tokenroc.com/v1/videos/$TASK_ID \
  -H "Authorization: Bearer $TOKENROC_API_KEY"

While the video is being made, the response looks like this:

response · in progressapplication/json
{
  "id": "task_...",
  "object": "video",
  "model": "wan3.0-video",
  "status": "in_progress",
  "progress": 30,
  "created_at": 1790000000,
  "completed_at": 1790000015,
  "metadata": { "url": "" }
}
statusMeaningWhat to do
unknownA temporary state while the task status is being checked.Keep polling every 15 seconds. Stop waiting after 30 minutes and save the task ID to check later.
queuedAccepted and waiting to start.Check again later.
in_progressBeing generated.Check again later.
completedFinished. Wan and Kling return metadata.url; Seedance uses the authenticated /content endpoint.Download the file now.
failedGeneration did not succeed. error.code and error.message give the reason.Read the reason, adjust the request, and submit a new task.
  • Check every 15 seconds or less often. TokenRoc refreshes each task about every 15 seconds, so checking faster returns the same answer.
  • Decide on status only. progress moves in coarse steps, not a countdown. completed_at records the last update to the task and is set before the video is ready.
  • You can only read tasks created with your own account's API keys.

Step 4: Download the video

For Wan and Kling, when status is completed, metadata.url contains the link. Seedance uses the authenticated download. The signed link below is shortened:

response · completedapplication/json
{
  "id": "task_...",
  "object": "video",
  "model": "wan3.0-video",
  "status": "completed",
  "progress": 100,
  "created_at": 1790000000,
  "completed_at": 1790000300,
  "metadata": { "url": "https://<provider-storage>/<video-file>.mp4?<signature>" }
}
terminal · download
curl -L -o boat.mp4 "PASTE_THE_URL_FROM_metadata.url"
The link expires. It points to temporary storage, and TokenRoc does not keep a copy of the video. For Wan models the service deletes the file 24 hours after it is generated. Download every result as soon as it completes, store it yourself, and treat the link as private: anyone holding it can download the file.

A complete script

This Python script submits the task, checks it every 15 seconds, and saves the MP4 when it is ready. It uses only the standard library. To keep checking a task you already submitted, pass its ID: python make_video.py task_...

make_video.py · Python 3
import json
import os
import sys
import time
import urllib.error
import urllib.request

API = "https://api.tokenroc.com/v1"
HEADERS = {
    "Authorization": "Bearer " + os.environ["TOKENROC_API_KEY"],
    "Content-Type": "application/json",
}
WAIT_SECONDS = 30 * 60  # how long this script waits; the task keeps running after it stops


def call(method, path, body=None):
    data = None if body is None else json.dumps(body).encode()
    request = urllib.request.Request(API + path, data=data, headers=HEADERS, method=method)
    try:
        with urllib.request.urlopen(request, timeout=60) as response:
            return json.load(response)
    except urllib.error.HTTPError as err:
        sys.exit(f"HTTP {err.code}: {err.read().decode()}")


if len(sys.argv) > 1:
    task_id = sys.argv[1]
else:
    task = call("POST", "/videos", {
        "model": "wan3.0-video",
        "prompt": "A paper boat drifting across a shallow pool, soft daylight",
        "size": "480P",
        "duration": 2,
    })
    task_id = task["id"]
    print("Submitted", task_id)

deadline = time.monotonic() + WAIT_SECONDS
while True:
    task = call("GET", "/videos/" + task_id)
    status = task["status"]
    print(status, task.get("progress"))
    if status == "completed":
        urllib.request.urlretrieve(task["metadata"]["url"], task_id + ".mp4")
        print("Saved", task_id + ".mp4")
        break
    if status == "failed":
        sys.exit(f"Task failed: {task.get('error')}")
    if time.monotonic() > deadline:
        sys.exit(f"Stopped waiting while the task is {status}. "
                 f"Run this script again with {task_id} to keep checking.")
    time.sleep(15)

Stopped waiting, or failed?

These are different things, and mixing them up costs money.

What happenedWhat it meansWhat to do
Your script or client reached its own time limit.Only your code stopped. The task is still running on TokenRoc, and you are not refunded, because it has not failed.Check the same ID again later. Do not submit the prompt again.
status is failed.The task ended without a video.The amount reserved for it is returned automatically. Fix the cause and submit a new task.
status stays queued or in_progress after 30 minutes.Something may be wrong with the task.Stop checking and contact TokenRoc with the task ID. The Task Logs page in the console shows TokenRoc's own record of it.

A charge in your usage log does not mean the video is ready. The charge is reserved when you submit, so it appears while the task is still in_progress.

What it costs

The five models in this guide are priced per generated second:

formulaper task
cost = billed seconds x configured price for the requested resolution and audio/reference setting
  1. At submission, TokenRoc reserves the cost of the duration you asked for, at the resolution and audio setting you chose. If your balance cannot cover it, the task is not created.
  2. When the task completes, the charge is settled against the length the task reports it actually produced. If that differs from the reservation, the difference is refunded or charged.
  3. If the task fails, the reserved amount is returned.

Worked example. The request in this guide is 2 seconds of wan3.0-video at 480P. At the live rate of $0.044807 per second, that is 2 x $0.044807 = $0.089614. The same 2 seconds at the default 1080P cost 2 x $0.179105 = $0.358210.

Wan models also accept "duration": -1, which lets the model choose the length. TokenRoc then reserves the maximum of 30 seconds and settles to the length actually generated.

Prices checked 16 October 2026. Model Square shows the current rate.

Video pricing depends on the model. Other video models in Model Square, such as the Seedance models, are charged per generated second, per generated video, or per output video token, and use their own request fields. The pricing page explains each method.

Choose a model

All five models use the same submit and check steps. Change model, and keep size and duration within the model's range.

Model IDGood forResolutionSecondsUSD per second, 16 Oct 2026
wan3.0-videoText-to-video at the lowest rate.480P, 720P, 1080P2 to 30480P $0.044807; 720P $0.089553; 1080P $0.179105
wan3.0-video-primeThe Prime tier of Wan 3.0, with the same options.480P, 720P, 1080P2 to 30480P $0.06721; 720P $0.134329; 1080P $0.268657
kling/kling-v3-video-generationVideo from a prompt, a first frame, or first and last frames. Optional audio.720P, 1080P, 4K3 to 15Silent: 720P $0.080597; 1080P $0.107463. With audio: 720P $0.120896; 1080P $0.161194. 4K $0.402985, with or without audio.
kling/kling-v3-omni-video-generationVideo guided by reference images or a reference video. Optional audio without a reference video.720P, 1080P, 4K3 to 15; 3 to 10 with a reference videoSilent: 720P $0.080597; 1080P $0.107463. With audio: 720P $0.107463; 1080P $0.134328. With reference video: 720P $0.120896; 1080P $0.161194. 4K $0.402985, with or without audio; 4K reference video is not supported.
kling/kling-v3-turbo-video-generationVideo with an audio track always included.720P, 1080P3 to 15Always with audio: 720P $0.107463; 1080P $0.134328

When resolution is omitted, Wan uses 1080P and Kling uses pro (1080P). Pass size as 480P, 720P, 1080P or supported 4k; Kling also accepts mode (std, pro, 4k). The exact selected unit price is reserved and kept for settlement. See all resolution prices.

Options for Kling models

  • Audio: add "metadata": {"parameters": {"audio": true}}. Wan models reject audio. Turbo always has audio and rejects "audio": false. Omni cannot combine audio with a reference video.
  • Aspect ratio: for a prompt-only Kling video, add "metadata": {"parameters": {"aspect_ratio": "9:16"}}. Accepted values are 16:9 (default), 9:16, and 1:1. When you supply a frame, the frame sets the shape.
  • Frames: pass a public image URL in image to use it as the first frame. The standard model also accepts "images": [first, last] for first and last frames.
  • Omni references: reference images and a reference video are sent as typed entries in metadata.input.media, using "type": "refer" for an image and "type": "feature" for a video.

TokenRoc checks these combinations before a task is created and rejects any it does not support, so an invalid request is never charged.

Errors

Use the Errors page for status codes and retry rules. Do not retry model_not_found; check the ID in Model Square.

Problems found when you submit a task come back with a code and a message:

response · 400application/json
{
  "code": "invalid_request",
  "message": "duration must be between 2 and 30 seconds (got 1)",
  "data": null
}
What you seeMeaningWhat to do
HTTP 401The API key is missing, wrong, or disabled.Check the Authorization: Bearer header and the API key on the API Keys page.
invalid_request or missing_model (400)A field is missing or outside the model's range: prompt, duration, resolution, audio, or media.Fix the field named in the message. Nothing was charged.
insufficient_user_quota (403)Your balance cannot cover the reservation.Top up on the Wallet page, or ask for fewer seconds or a lower resolution.
model_not_found (503)The model ID is wrong or not available to your API key.Do not retry. Copy the ID again from Model Square.
ali_api_error or fail_to_fetch_taskVideo submission or task lookup failed.Follow the status and message using the Errors page. Keep the same ID when checking a task.
task_not_exist (400) when checkingNo task with that ID belongs to your account.Check the ID, and use a API key from the account that submitted the task.
HTTP 429Too many requests, or the model is busy.Wait, then retry with exponential backoff.

Errors raised before a request reaches the video service, such as model_not_found, use an error object instead, like the one in the image guide. The status page shows whether the TokenRoc gateway responds. It does not report the health of each model.

Check usage

  • Task Logs list every video task with its status. Use it to find a task ID you did not save.
  • Usage Logs show the reservation at submission and any refund or extra charge at settlement.
  • The Wallet page shows your balance.

Next steps

  • Rerun the example at 720P or with a longer duration once the 2-second clip works.
  • Create still images with the image generation guide.
  • Read the API quickstart for text models and the endpoint list.

Stuck? Contact TokenRoc with the model ID and task ID. Never send your API key or a signed video link.

See also