Getting started
Every generation is asynchronous: you create a task, then poll it (or receive a webhook) until its status is succeeded or failed. The price is held on your balance when the task is created; a failed task is refunded in full.
- Create a key in Dashboard → API keys.
- Pick a model with
GET /v1/models. - Create a task with
POST /v1/tasks. - Poll
GET /v1/tasks/:idevery ~5 s, or pass acallback_url.
# Generate 5 s of 1080p video curl https://rushbox.dev/v1/tasks \ -H "Authorization: Bearer rb_live_…" \ -d '{"model": "kling-3.0", "prompt": "a red sneaker spinning", "resolution": "1080p", "duration": 5}'
Requests and responses are JSON (Content-Type: application/json). Timestamps are ISO 8601 in UTC, amounts are decimal numbers in the account currency. Error messages are in English.
For AI agents
Rushbox is built to be driven by an agent (Claude Code, Claude, Codex, Cursor, ChatGPT…). The agent connects to the MCP server and signs in with OAuth: no key to copy, the user clicks “Allow” once. Agents that read docs can start from /llms.txt (compact) or /llms-full.txt (every tool argument).
| Field | Type | Description |
|---|---|---|
MCP URL | HTTP | https://rushbox.dev/mcp |
OAuth | 2.1 + PKCE | Discovered from the 401 on /mcp; dynamic client registration, scope mcp. See OAuth. An API key in Authorization: Bearer also works. |
claude mcp add --transport http --scope user rushbox https://rushbox.dev/mcp /mcp # in Claude Code: pick rushbox, then Allow
Recommended flow
- Brand first:
list_brands, oranalyze_storewith the store URL. Use real products only. - Plan:
list_presetsfor angles, 2 angles per product in9:16,4:5and1:1; show the estimated cost andget_balance, wait for the user's go. - Produce:
create_ad(orgeneratefor full control) for every job, thenwait_for_taskon each untilsucceededorfailed. - Caption talking videos with
add_captionsandget_captions. - Deliver one table: product, angle, format, links, cost; then the total and the remaining balance.
Failed jobs are refunded automatically. Top up only on the user's explicit request. Client setup for each assistant is on the Integrations page.
Authentication
Every request carries a key in the Authorization: Bearer rb_live_… header. A key belongs to one account; everything it creates is billed to that account. Keep it server-side: never expose it in a browser or a mobile app. You can create several keys and revoke one at any time.
MCP clients that connect in one click (Claude, Cursor, Codex…) get an OAuth access token rb_oat_… instead, used the same way. See OAuth.
curl https://rushbox.dev/v1/tasks/task_8f2k1c… \
-H "Authorization: Bearer rb_live_…"
# Missing, invalid or revoked key → 401
{ "error": { "code": "unauthorized", "message": "Missing or invalid API key (expected header Authorization: Bearer rb_live_...)." } }All endpoints
| Method | Path | Auth | What it does |
|---|---|---|---|
| POST | /v1/ads | API key | Ads for a product: Rushbox reads the brand and writes the prompt |
| POST | /v1/tasks | API key | Create a generation task (video, image, audio) |
| GET | /v1/tasks/:id | API key | Status, price and files of a task |
| GET | /v1/models | no auth | Every model with its prices |
| POST | /v1/captions | API key | Burn animated captions into a video |
| GET | /v1/captions | API key | Your latest 50 captions jobs |
| GET | /v1/captions/:id | API key | Status and files of a captions job |
| POST | /mcp | API key or OAuth | MCP server (JSON-RPC 2.0) |
| GET | /.well-known/oauth-protected-resource | no auth | OAuth resource metadata (RFC 9728) |
| GET | /.well-known/oauth-authorization-server | no auth | OAuth server metadata (RFC 8414) |
| POST | /oauth/register | no auth | Register an OAuth client (RFC 7591) |
| GET | /oauth/authorize | signed-in user | Consent screen, returns a code |
| POST | /oauth/token | no auth | Exchange a code or refresh a token |
| GET | /api/status | no auth | Public delivery status per model |
The API, MCP, OAuth and status all answer on rushbox.dev.
Create ads (brand layer)
/v1/adsAPI keyGive a store and, if you like, a product and a few words: Rushbox reads the brand (logo, colours, tone, catalogue), writes each prompt with its ad method (the product photo as reference, at its real size) and launches one task per angle × format, at most 12. The prompts stay on Rushbox's side. Same tool as create_ad in MCP.
curl -X POST https://rushbox.dev/v1/ads \
-H "Authorization: Bearer rb_live_…" \
-H "Content-Type: application/json" \
-d '{"store": "mystore.com", "idea": "a TikTok ad for the tote bag"}'Every field is optional except the brand (store or brand_id, or none if the account has one brand). What you leave out is filled, and the response lists each setting in settings with its source: given, inferred (from your words), chosen (by Rushbox, per ad) or default.
| Field | When left out |
|---|---|
product / product_id | A product named in idea, else the store's first product with a photo |
preset | From idea (promo, offer → text-visual; UGC, voice → video-ad-with-sound; photo, packshot → product-photo…), else product-video |
formats | From idea (TikTok, Reels → 9:16; feed → 4:5; product page → 1:1; YouTube → 16:9), else the preset's |
angle / angles | Chosen by Rushbox for each ad (text-visual: one of 10 static-ad formats) |
funnel | bof with an offer; otherwise chosen by Rushbox for text and voice ads |
text | Off, except text-visual, an offer or words in quotes |
variant, product_photos | The store's first variant: its own photo, then the product's main photo |
include_logo | On for image ads with text when the store has a logo, else off |
model, resolution, duration, audio | The preset's model and its defaults |
Returns 201 with ads (task id, format, angle, audience, a short summary, price) and the total held; follow each task with GET /v1/tasks/:id or a callback_url. dry_run: true returns the plan and price without creating anything; idempotency_key makes retries safe.
Create a task
/v1/tasksAPI keyHolds the price on your balance and returns the task with status processing (HTTP 201). There are two request formats: the simple format below, for the models listed under curated in GET /v1/models, and the native format for every other model.
Simple format
| Field | Type | Required | Description |
|---|---|---|---|
model | string | yes | A curated model id: kling-3.0, seedance-2.5, gpt-image-2, nano-banana-pro. |
prompt | string | yes | What to generate, 1 to 4,000 characters. |
image_urls | array of URLs | no | Reference images (public http(s) links), 8 at most. |
resolution | string | no | One of the model's resolutions (table below). Not case-sensitive. |
duration | integer | no | Seconds, video models only: one of the model's durations. |
aspect_ratio | string | no | For example 16:9, 9:16, 1:1. |
audio | boolean | no | Generate sound, if the model supports it. |
callback_url | string | no | HTTPS URL that receives the task when it finishes. See Webhooks. |
| Model | Type | Resolutions | Durations | Defaults |
|---|---|---|---|---|
kling-3.0 | Video | 720p, 1080p, 4k | 5 s, 10 s | 720p · 5 s · 16:9 · no audio |
seedance-2.5 | Video | 480p, 720p, 1080p | 5 s, 10 s | 720p · 5 s · 16:9 · with audio |
gpt-image-2 | Image | 1k, 2k, 4k | — | 1k · 1:1 |
nano-banana-pro | Image | 2k, 4k | — | 2k · 1:1 |
POST /v1/tasks
{
"model": "kling-3.0",
"prompt": "a red sneaker spinning on a white background",
"image_urls": ["https://example.com/sneaker.jpg"],
"resolution": "1080p",
"duration": 5,
"aspect_ratio": "9:16"
}
→ 201 Created
{
"id": "task_8f2k1c…",
"model": "kling-3.0",
"status": "processing",
"price": { "amount": 0.51, "currency": "EUR", "final": true },
"refunded": false,
"result_urls": [],
"error": null,
"created_at": "2026-11-23T12:00:00.000Z"
}Validation errors
A request the model cannot run returns 400 invalid_request with a message that names the field and the values it accepts. Several problems are reported together. Examples:
Unknown model: kling-99. See GET /v1/models for the list. prompt is required: describe what to generate. duration must be one of 5, 10 (seconds). resolution must be one of 720p, 1080p, 4k. Too many images: image_urls accepts at most 8. image_urls[1] must be a public http(s) URL. aspect_ratio must look like 16:9, 9:16 or 1:1. callback_url: must use https
Every other model (native format)
/v1/tasksAPI keyModels in the native list of GET /v1/models are called with their id and an input object in the model's own format; each model page lists its fields and options. The input is passed through as is.
| Field | Type | Required | Description |
|---|---|---|---|
model | string | yes | A native model id, for example veo-3-1 or kling-3.0/video. |
input | object | yes | The model's own fields (prompt, options…). |
prompt | string | no | Shortcut: copied into input.prompt when that one is missing. |
callback_url | string | no | Same as the simple format. |
Pricing follows the real cost: a cap is held at creation (price.final is false); when the task succeeds you pay the actual cost of the variant used, and the rest goes back to your balance (price.final becomes true).
POST /v1/tasks
{
"model": "veo-3-1",
"input": { "prompt": "a red sneaker spinning", "model": "veo3_fast", "aspect_ratio": "9:16" }
}
→ 201 Created
{ "id": "task_…", "model": "veo-3-1", "status": "processing",
"price": { "amount": 2.56, "currency": "EUR", "final": false }, … }# A native model without input
This model takes an `input` object in its native format, e.g. {"model": "veo-3-1", "input": {"prompt": "..."}}. See /models/veo-3-1 for its fields.
# A simple-format model sent with input
kling-3.0 takes simple fields (prompt, resolution, duration…), not an `input` object. Remove `input`, or use model "kling-3.0/video" to send its native format.
# A text model
claude-opus-5-5 is a text model; text models are not available on /v1/tasks yet.Get a task
/v1/tasks/:idAPI keyReturns the task. Poll it about every 5 seconds until status is no longer processing. A task from another account answers 404 not_found.
| Field | Type | Description |
|---|---|---|
id | string | Task id, task_… |
model | string | Model id used. |
status | string | processing · succeeded · failed |
price.amount | number | Amount charged, or held while price.final is false. |
price.currency | string | EUR · USD |
price.final | boolean | true once the amount will not change. |
refunded | boolean | true when the task failed and the amount was given back. |
result_urls | array of URLs | Public links to the generated files, on Rushbox. Empty until the task succeeds. File kept, no expiry date. |
error | object or null | { code, message } when failed; code is generation_failed, content_refused, image_unreadable, invalid_input, timed_out or service_unavailable (errors table) |
created_at | string | ISO 8601 |
{
"id": "task_8f2k1c…",
"model": "kling-3.0",
"status": "succeeded",
"price": { "amount": 0.51, "currency": "EUR", "final": true },
"refunded": false,
"result_urls": ["https://media.rushbox.dev/results/task_8f2k1c…/0.mp4"],
"error": null,
"created_at": "2026-11-23T12:00:00.000Z"
}A generation that fails, or stays stuck past the model's time limit, is retried once automatically. Content refused by the model isn't retried (it would be refused again), nor is input the model rejects. If it still fails, the task ends as failed and its amount is refunded.
Webhooks
Skip polling: pass callback_url (https, 2,048 characters max, public host) when you create a task. When it succeeds or fails, Rushbox POSTs the task object — the same JSON as GET /v1/tasks/:id — to that URL. Your signing secret whsec_… is on the API keys page.
{ "model": "kling-3.0", "prompt": "…", "callback_url": "https://example.com/rushbox" }Rushbox-Event:task.succeeded|task.failedRushbox-Delivery: a UUID, identical across retries — use it to deduplicateRushbox-Signature:t=<unix>,v1=<hex>— HMAC-SHA256 of"<t>.<raw body>"with yourwhsec_…secretUser-Agent:Rushbox-Webhooks/1.0
Verify the signature on the raw body and reject timestamps older than 5 minutes.
import crypto from "node:crypto";
function verify(secret, rawBody, header) {
const p = Object.fromEntries(header.split(",").map((kv) => kv.split("=")));
if (Math.abs(Date.now() / 1000 - Number(p.t)) > 300) return false;
const expected = crypto.createHmac("sha256", secret).update(`${p.t}.${rawBody}`).digest("hex");
return p.v1?.length === expected.length && crypto.timingSafeEqual(Buffer.from(p.v1), Buffer.from(expected));
}import hmac, hashlib, time
def verify(secret: str, raw_body: bytes, header: str) -> bool:
p = dict(kv.split("=", 1) for kv in header.split(","))
if abs(time.time() - int(p["t"])) > 300: return False
expected = hmac.new(secret.encode(), f"{p['t']}.".encode() + raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, p.get("v1", ""))Reply with any 2xx within 10 seconds. Otherwise we retry after 1 min, 5 min, 30 min, 2 h and 6 h, then stop. Redirects are not followed. Webhooks are sent for tasks; captions jobs are polled.
Models
/v1/modelsno authThe full catalogue with prices, in both currencies. Two lists: curated (simple format, fixed price per unit and per resolution) and native (every other model, with the price of its cheapest variant). Text models are not listed yet. The same catalogue is browsable on the Models page.
{
"curated": [
{
"id": "kling-3.0", "name": "Kling 3.0", "kind": "video", "mode": "curated",
"unit": "per second",
"resolutions": ["720p", "1080p", "4k"],
"durations": [5, 10],
"prices": { "720p": { "eur": 0.076, "usd": 0.082 }, "1080p": { "eur": 0.102, "usd": 0.11 }, "4k": { … } }
}
],
"native": [
{
"id": "veo-3-1", "name": "Veo 3.1", "vendor": "Google", "kind": "video", "mode": "native",
"unit": "per video", "variants": 24,
"from": { "usd": 0.225, "eur": 0.207 }
}
],
"total": 184
}| Field | Type | Description |
|---|---|---|
kind | string | video · image · audio |
unit | string | per second · per image · per video · per megapixel · per minute · per 1000 characters |
prices | object | Curated only: price per unit for each resolution, in EUR and USD, tax excluded. |
from | object | Native only: price per unit of the cheapest variant, in EUR and USD. You pay the variant you use. |
variants | integer | Native only: number of priced variants (resolutions, options). |
total | integer | curated + native. |
Animated captions
/v1/captionsAPI keyTranscribes a video and burns TikTok/Reels-style captions into it, then also gives SRT and VTT files. Up to 60 minutes and 300 MB. The spoken language is detected automatically. Returns the job with status processing (HTTP 201).
| Field | Type | Required | Description |
|---|---|---|---|
video_url | string | no | Public http(s) link to the video. Give this or task_id, not both. |
task_id | string | no | Id of one of your succeeded video tasks; its video is used. |
style | string | yes | reveal · spotlight · pill · pop · karaoke · clean · boxed · bold |
language | string | no | auto · en · fr · es · de · it · pt · nl (default auto) |
position | string | no | bottom · middle · top (default: the style's) |
max_words_per_line | integer | no | Words per line, 1 to 8 (default: the style's). |
max_lines | integer | no | Lines on screen at once, 1 or 2 (default: the style's). Two lines keep whole phrases together. |
uppercase | boolean | no | Force uppercase text. |
highlight_color | string | no | Colour of the active word, #rrggbb. |
hook | object | no | { text, start?, end? } — one sentence in a white rounded box with black text, centred around the middle of the frame (the TikTok text box). Up to 150 characters, emoji allowed, \n starts a new line. Shown from start (default 0) to end in seconds (default: the whole video). |
notes | array | no | [{ text, start, end }] — small white storytelling lines with a soft shadow at the top of the frame, each during its own time range in seconds. Up to 20 notes of 120 characters, emoji allowed. |
| Style | Description | Defaults |
|---|---|---|
reveal | Our ad style: bold sentence-case words blur in as they are spoken, the key word turns electric blue. | bottom · 4 words × 2 lines · #5b8cff |
spotlight | Same blur-in reveal, with the key word set in a solid blue box, like a selection in a design tool. | bottom · 4 words × 2 lines · #0444ec |
pill | 1–3 bold white words, the word being spoken sits on a small red box that jumps from word to word. | bottom · 3 words × 1 line · #d4402a |
pop | 1–3 words at a time, the active word pops and turns lime. White text, thick black outline. | bottom · 3 words × 1 line · #c8ff2e |
karaoke | Up to two lines on screen, words fill from white to yellow as they are spoken. | bottom · 5 words × 2 lines · #ffe14d |
clean | White sentence-case subtitles with a soft shadow, two lines max. | bottom · 7 words × 2 lines · #ffffff |
boxed | White text on a black rounded box — the native TikTok look. | bottom · 5 words × 2 lines · #ffffff |
bold | UPPERCASE heavy type, thick outline, 1–2 words with a slight bounce. | middle · 2 words × 1 line · #c8ff2e · uppercase |
POST /v1/captions
{
"task_id": "task_8f2k1c…",
"style": "pop",
"position": "bottom",
"max_words_per_line": 3,
"highlight_color": "#c8ff2e"
}With the native TikTok look, a hook for the first 4 seconds and two notes:
POST /v1/captions
{
"video_url": "https://example.com/reaction.mp4",
"style": "pill",
"hook": { "text": "I made my husband a song about our whole story… his reaction 😭❤️", "end": 4 },
"notes": [
{ "text": "He has no idea what’s coming…", "start": 5, "end": 8 },
{ "text": "He knows exactly which night this is 😂", "start": 12, "end": 17 }
]
}Price: 0.01 (in your account currency) per started 30 seconds of video, transcription included. The price of the longest video (1.20) is held at creation — or the known length of your task's video — then lowered to the real price once the video is measured. A failed job is refunded in full.
Get a captions job
/v1/captions/:idAPI keyPoll it until status is succeeded or failed. stage says where the job is.
| Field | Type | Description |
|---|---|---|
id | string | Job id, cap_… |
status | string | processing · succeeded · failed |
stage | string | queued · transcribing · rendering · succeeded · failed |
style, language, options | What was asked, with the style's defaults filled in. | |
source_url, source_task_id | string or null | The video that was captioned. |
result_url | string or null | Captioned MP4. |
srt_url, vtt_url | string or null | Subtitle files. |
duration_s | number or null | Measured video length. |
transcript | array | [{ start, end, text }] — what is said, phrase by phrase, in seconds (same cut as the SRT) |
price | object | { amount, currency, final } |
refunded | boolean | true when the job failed. |
error | object or null | { code, message } |
created_at | string | ISO 8601 |
{
"id": "cap_3b7d…",
"status": "succeeded",
"stage": "succeeded",
"style": "pop",
"language": "auto",
"options": { "position": "bottom", "max_words_per_line": 3, "max_lines": 1, "uppercase": false, "highlight_color": "#c8ff2e" },
"source_url": "https://media.rushbox.dev/results/task_8f2k1c…/0.mp4",
"source_task_id": "task_8f2k1c…",
"result_url": "https://media.rushbox.dev/captions/cap_3b7d…/cap_3b7d….mp4",
"srt_url": "https://media.rushbox.dev/captions/cap_3b7d…/cap_3b7d….srt",
"vtt_url": "https://media.rushbox.dev/captions/cap_3b7d…/cap_3b7d….vtt",
"duration_s": 12.4,
"transcript": [{ "start": 0.12, "end": 1.4, "text": "Meet the new" }],
"price": { "amount": 0.01, "currency": "EUR", "final": true },
"refunded": false,
"error": null,
"created_at": "2026-11-23T12:01:00.000Z"
}| error.code | Meaning |
|---|---|
download_failed | The video could not be downloaded: check the link is public. |
too_large | Larger than 300 MB. |
too_long | Longer than 60 minutes. |
not_a_video | Not a readable video file. |
no_audio | The video has no soundtrack. |
no_speech | No speech was detected. |
balance_too_low | The video is longer than the 3 minutes reserved and the balance can't cover it. |
transcription_failed | Automatic transcription failed. |
render_failed | The captioned video could not be rendered. |
List captions jobs
/v1/captionsAPI keyYour latest 50 jobs, newest first: { "captions": [ … ] }, each item shaped like GET /v1/captions/:id.
MCP
https://rushbox.dev/mcpAPI key or OAuth tokenModel Context Protocol server over streamable HTTP, stateless: each POST carries one JSON-RPC 2.0 message (or a batch) and gets a JSON answer. Methods: initialize, ping, tools/list, tools/call. Notifications get 202; GET answers 405 (no server stream). Protocol versions 2025-06-18, 2025-03-26 and 2024-11-05. Step-by-step client setup is on the Integrations page.
| Tool | Arguments | What it does |
|---|---|---|
list_models | query, kind, limit | Lists the models you can use, with their starting price in your account currency. Same catalogue and same search as the Models page. |
get_model | model* | Returns one model with every setting it takes: the JSON Schema of its `input` (fields, allowed values, limits, defaults, required ones) and its price. Free. Call it before generate for any model other than the four simple-fields shortcuts, then pass `input` accordingly. |
generate | model*, prompt, image_urls, resolution, duration, aspect_ratio, audio, input, callback_url | Starts a generation, like POST /v1/tasks (same fields, same messages). Returns the task id and the amount held. |
get_task | task_id, task_ids | Status, price and files of one of your tasks. |
retry_task | task_id* | Launches a finished task again as a new task: same model, settings, brand prompt and webhook. Use it when a task failed (it was already refunded) or to get another take of a result. Paid like the original (price returned). Then call wait_for_task with the new task_id. |
wait_for_task | task_id, task_ids, timeout_seconds | Waits up to 50 seconds for a task to finish, then returns its status. Call it again while it says processing. |
get_balance | — | Your available balance and its currency. |
add_captions | video_url, task_id, style*, language, position, max_words_per_line, max_lines, uppercase, highlight_color, hook, notes | Burns animated captions into a video, like POST /v1/captions. |
get_captions | captions_id*, wait_seconds | Status and files of a captions job; can wait up to 50 seconds. |
* required
POST /mcp
Authorization: Bearer rb_live_…
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call",
"params": { "name": "generate", "arguments": { "model": "kling-3.0", "prompt": "…", "resolution": "1080p" } } }
→ { "jsonrpc": "2.0", "id": 1, "result": {
"content": [{ "type": "text", "text": "Task created: task_… (kling-3.0). Price: 0.51 EUR. Call wait_for_task with task_id=\"task_…\"." }],
"structuredContent": { "id": "task_…", "status": "processing", … } } }A tool that cannot run returns a normal result with isError: true and the same message as the REST API, prefixed with Invalid request:. Without a valid key or token, /mcp answers 401 with a WWW-Authenticate header pointing to the OAuth metadata, which is how clients start the one-click connection.
OAuth
For MCP clients that connect without copying a key. Standard OAuth 2.1: authorization code with PKCE (S256), public clients (no client secret), scope mcp. Most clients do all of this on their own; you only need it to build your own client.
/.well-known/oauth-protected-resourceno auth/.well-known/oauth-authorization-serverno authDiscovery documents: the MCP resource and its authorization server, the endpoints below, code_challenge_methods_supported: ["S256"], grant_types_supported: ["authorization_code", "refresh_token"].
/oauth/registerno authDynamic client registration. Redirect URIs must be https, loopback http (any port) or an app scheme.
POST /oauth/register
{ "client_name": "My agent", "redirect_uris": ["http://127.0.0.1:8976/callback"] }
→ 201 { "client_id": "rbc_…", "client_name": "My agent", "redirect_uris": [ … ],
"token_endpoint_auth_method": "none", "grant_types": ["authorization_code", "refresh_token"], "response_types": ["code"] }/oauth/authorizesigned-in userOpen in a browser with response_type=code, client_id, redirect_uri, code_challenge, code_challenge_method=S256 and state. The user signs in (if needed), picks what to allow, and is sent back to redirect_uri with code and state. The code is valid 10 minutes.
/oauth/tokenno authForm-encoded or JSON. grant_type=authorization_code with code, client_id, redirect_uri, code_verifier; or grant_type=refresh_token with refresh_token and client_id. A refresh token works once: each refresh returns a new pair. Access tokens last 30 days, refresh tokens 180 days. Errors follow OAuth: { "error", "error_description" }.
{ "access_token": "rb_oat_…", "token_type": "Bearer", "expires_in": 2592000,
"refresh_token": "rb_ort_…", "scope": "mcp" }Connected apps can be disconnected at any time from Dashboard → Connectors.
Status
/api/statusno authPublic delivery figures per model over the last 24 hours and 7 days: state (operational, degraded, down, no_data), delivery rate, share delivered on the first attempt or after a retry, median and p90 time, and one bar per day. No account, prompt or error detail. Cached 60 seconds, CORS open. The same data drives the Status page.
Billing and currencies
Each account is in EUR or USD, set when it's opened. Every price the API returns, and every charge, is in that currency, tax excluded.
- Simple-format models: fixed price, charged when the task is created.
- Native models and captions: a cap is held at creation, then settled to the real price; the difference goes back to your balance.
- A task or captions job that fails is refunded in full, automatically.
- Not enough balance:
402 insufficient_funds, nothing is created. With automatic top-up on, a top-up is tried first.
Balance, top-ups and every movement are in Settings → Billing; over MCP, use get_balance.
Rate limits
POST /v1/tasks and POST /v1/captions together accept 120 requests per minute per account. Above that, the API answers 429 rate_limited with a Retry-After header in seconds. Reads (GET) are not limited; poll every few seconds, not in a tight loop.
HTTP/1.1 429 Too Many Requests
Retry-After: 12
{ "error": { "code": "rate_limited", "message": "Too many requests. Retry in 12 s." } }Errors
Every error has the same shape: { "error": { "code": "…", "message": "…" } }. Rely on code; the message is for people and may be reworded.
| HTTP | Code | Meaning |
|---|---|---|
| 400 | invalid_json | The body is not valid JSON. |
| 400 | invalid_request | Unknown model, missing field, or a value the model doesn't offer. The message says which and what is accepted. |
| 401 | unauthorized | Missing, invalid or revoked key. |
| 402 | insufficient_funds | Balance too low to hold the price. The message gives both amounts. |
| 503 | generation_unavailable | The model can't run on Rushbox right now. Nothing is reserved or charged; retrying won't help until it's back. |
| 404 | not_found | Unknown task or captions job, or one that belongs to another account. |
| 429 | rate_limited | Too many creations in a minute. Wait Retry-After seconds. |
| — | generation_failed | In a failed task: the generation failed, including one automatic retry, and the amount was refunded. |
| — | content_refused | In a failed task: the model refused the request (content policy). Not retried; refunded. |
| — | invalid_input | In a failed task: the model rejected the input (for example an unsupported format). Not retried; refunded. |
| — | image_unreadable | In a failed task: the model couldn't open a reference image. Use a public link or upload the file; refunded. |
| — | timed_out | In a failed task: the model took too long, including one automatic retry; refunded. |
| — | service_unavailable | In a failed task: the generation couldn't start (model temporarily unavailable). Refunded; try again in a few minutes. |
HTTP/1.1 402 Payment Required
{ "error": { "code": "insufficient_funds", "message": "Insufficient balance: €0.20 available, €0.51 required." } }