UniRouteUniRoute

Video generation API

Quote Seedance videos, manage asynchronous tasks, confirm final billing, and download results.

Prepare your key and download the client using the quickstart, then run:

python3 uniroute-media.py --key-file ~/.config/uniroute/api-key \
  --budget-usd 0.1 --kind video --verify-idempotency \
  --state ./video-run.json --output ./video-output

The example model is bytedance/seedance-1.5-pro, with catalog mediaKind: "video". Its 480p:5 option means the 480p, 5-second combination supported by this model. The example quote is 0.05 USD. Videos may be billed per second: a catalog price with unit: "per_second" is not the cost of the entire video. Always request a quote.

POST /v1/media/quote:

{
  "model": "bytedance/seedance-1.5-pro",
  "option": "480p:5"
}

POST /v1/media/tasks, with Idempotency-Key. Replace the amount with the exact string from the current quote:

{
  "media_type": "video",
  "model": "bytedance/seedance-1.5-pro",
  "option": "480p:5",
  "prompt": "A quiet mountain lake at sunrise, gentle camera movement.",
  "max_cost_usd": "0.05"
}

Save the task ID from the HTTP 202 response, then poll the same task. Video generation can take longer; processing, held, or settling does not mean failure and is not a reason to submit another task. Wait for both status: "success" and billing.state: "charged", then download urls[].url without a Bearer token.

After a timeout, use the same client command and state file to resume queries. You can increase --wait-seconds. Other models may encode option differently or require different input_fields. Do not apply this model's parameters to another model. Reference-image inputs must be implemented according to that model's catalog contract.