API
Base URL https://api.studiorouter.com. For agents and LLMs: llms.txt, full agent guide, OpenAPI spec, MCP server at https://api.studiorouter.com/mcp.
1. Get a key
Your API key is in the dashboard; every account has one. Send it on every request as Authorization: Bearer sr_live_….
2. Start a generation
curl https://api.studiorouter.com/v1/videos \
-H "Authorization: Bearer $STUDIOROUTER_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "wan-3.0",
"prompt": "A red kite over a quiet beach at sunset",
"duration": 5,
"resolution": "480p"
}'The answer is a job with status: "queued" and an estimated_cost_usd. Credits for the estimate are held while it runs. Sending the same Idempotency-Key again returns the same job instead of starting another.
3. Wait for the result
curl "https://api.studiorouter.com/v1/jobs/job_…?wait=50" \
-H "Authorization: Bearer $STUDIOROUTER_API_KEY"wait holds the request open for up to 50 seconds until the job finishes. Repeat until status is succeeded, failed or blocked. On success output[0].url is the file, hosted by us, and cost_usd is what was charged: the provider's own price. Failed and blocked jobs are not charged.
Video parameters
model | Required. Model id from the table below. |
prompt | Required. What to generate. |
image | First-frame image URL. Switches the request to image-to-video. |
last_image | Last-frame image URL, together with image. |
reference_images, reference_videos, reference_audios | Lists of reference media URLs. |
video | Source video URL. Edits it; set "mode": "extend" to continue it instead. |
duration | Seconds. Default 5. Not used when editing, which keeps the source length. |
resolution | 480p, 720p, 1080p… The default depends on the model. |
aspect_ratio | 16:9 by default for text; with an input image the output follows the image. |
audio | false turns generated audio off where the model allows it. |
seed | Integer, where the model supports it. |
prompt_expansion | off (default), on or quality: let the model rewrite the prompt, on models that offer it. |
negative_prompt | What should not appear. Only providers that take one are used when it is set. |
provider | A provider id, or an ordered list, to pin where the job runs. |
fallback | false (default): run only on the cheapest provider; if it fails, the job fails and nothing is charged. true: if it fails, try the next cheapest (up to 3). |
webhook_url | We POST the finished job to this URL. |
The input mode follows from what you send: nothing extra is text-to-video, image is first-frame, image + last_image is first-and-last frame, any reference_* list is reference mode, and video is an edit.
Images
POST /v1/images takes model, prompt, optional images (input URLs, which makes it an edit), resolution (1k, 2k, 4k), aspect_ratio, quality (GPT Image models), output_format and seed where supported.
Local files
Inputs are public URLs. To use a file from disk, upload it first and use the returned URL:
curl https://api.studiorouter.com/v1/files -H "Authorization: Bearer $STUDIOROUTER_API_KEY" \
-H "Content-Type: image/png" --data-binary @first-frame.pngPrice a request first
POST /v1/estimate takes the same body as a generation and returns the estimated cost for each provider that can serve it, cheapest first. Nothing is created.
Agents (MCP)
Step-by-step setup for Claude Code, Codex and Claude Desktop is on Connect an agent.
claude mcp add --transport http studiorouter https://api.studiorouter.com/mcp \
--header "Authorization: Bearer sr_live_…"Tools: list_models, get_model, estimate_cost, generate, get_job, get_balance. generate and get_job accept wait_seconds (up to 50) so an agent can wait for the result without polling in a loop.
Errors
Errors are JSON with a message that says what went wrong. Failed and blocked jobs are not charged.
Model ids
Prices and providers for each model are on its page under Models, and in GET /v1/models.
| Model | id | Inputs |
|---|---|---|
| Seedance 2.5 | seedance-2.5 | Text to video, Image to video, First + last frame, References, Edit a video, Extend a video |
| Wan 3.0 | wan-3.0 | Text to video, Image to video, First + last frame, References, Edit a video, Extend a video |
| Wan 3.0 Prime | wan-3.0-prime | Text to video, Image to video, First + last frame, References, Edit a video, Extend a video |
| HeyGen Video 1 | heygen-video-1 | Text to video, Image to video, References |
| FLUX 3 Video | flux-3 | Text to video, Image to video, First + last frame, Edit a video, Extend a video |
| Gemini Omni 1.2 Flash | gemini-omni-1.2-flash | Text to video, Image to video, First + last frame, References, Edit a video, Extend a video |
| Kling v4.0 | kling-v4.0 | Text to video, Image to video, First + last frame, References, Edit a video, Extend a video |
| Grok Imagine Video 1.5 | grok-imagine-video-1.5 | Text to video, Image to video, References |
| H3 Max | h3-max | Text to video, Image to video, First + last frame, References |
| GPT Image 2.6 Flare | gpt-image-2.6-flare | Text to image, Edit images |
| GPT Image 2.6 Sunburst | gpt-image-2.6-sunburst | Text to image, Edit images |
| Nano Banana 2.1 | nano-banana-2.1 | Text to image, Edit images |
| Nano Banana 2 | nano-banana-2 | Text to image, Edit images |
| Nano Banana Pro | nano-banana-pro | Text to image, Edit images |
| Seedream 5.5 | seedream-5.5 | Text to image, Edit images |
| H3 Image | h3-image | Text to image, Edit images |