# ARRScale API ARRScale runs **scale**: send a short UGC hook video and a photo of a person, get the same hook back with that person in it. Same camera, pose, motion and timing. Burned-in captions are removed, the colour is graded to look like real phone footage, and the result comes back at 1080p with the original sound. **Base URL:** `https://arrscale.com` Every generation is asynchronous: submit a request, store its `request_id`, then poll `status_url` or receive a webhook. You pay only for requests that complete. ## Quickstart 1. Sign in to the [console](https://arrscale.com/console), add credit, and create an API key. The secret is shown once. 2. Save it on your server as `ARRSCALE_API_KEY=KEY_ID:KEY_SECRET`. 3. Upload your hook video and the person's photo (or use any public `https://` URLs): ```bash VIDEO=$(curl -s -X POST "https://arrscale.com/v1/files?content_type=video/mp4" \ -H "Authorization: Key $ARRSCALE_API_KEY" --data-binary @hook.mp4 | jq -r .public_url) PHOTO=$(curl -s -X POST "https://arrscale.com/v1/files?content_type=image/jpeg" \ -H "Authorization: Key $ARRSCALE_API_KEY" --data-binary @person.jpg | jq -r .public_url) ``` 4. Submit a scale request: ```bash curl -s -X POST "https://arrscale.com/v1/scale/1.1/video-edit" \ -H "Authorization: Key $ARRSCALE_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d "{\"video_url\":\"$VIDEO\",\"image_url\":\"$PHOTO\",\"resolution\":\"360p\"}" ``` ```json { "status": "queued", "request_id": "0d4c3b1e-7a51-4c52-9f0a-2b0f8e1a6c10", "status_url": "https://arrscale.com/v1/requests/0d4c3b1e-7a51-4c52-9f0a-2b0f8e1a6c10/status", "cancel_url": "https://arrscale.com/v1/requests/0d4c3b1e-7a51-4c52-9f0a-2b0f8e1a6c10/cancel", "expires_after": 604800, "estimate": { "seconds": 5, "usd": 0.6 } } ``` 5. Poll `status_url` until `status` is `completed`, then download `video.url`. A 5-second hook usually takes 1–2 minutes. ## One-prompt setup Paste this into Claude Code, Cursor, Codex or any coding agent inside your project. It reads these docs, installs the client, writes the script and runs one test after you approve the price. ```text Set up the ARRScale API (model: scale) in this project and run one test. 1. Read the API docs: https://arrscale.com/llms-full.txt 2. My API key is in the environment variable ARRSCALE_API_KEY (format KEY_ID:KEY_SECRET). If it is not set, ask me for it and save it to .env (make sure .env is in .gitignore). Never put the key in browser or mobile code. 3. Download the zero-dependency client into this project: https://arrscale.com/sdk/arrscale.mjs for Node, or https://arrscale.com/sdk/arrscale.py for Python. Pick the one that matches this project. 4. Add a script that takes a hook video (3–10 s), a photo of the new person and an output path. It uploads both files, checks the price with the estimate endpoint, submits a scale request at 360p with an Idempotency-Key, polls until it finishes and saves the video. 5. Before running it, tell me the estimated price and wait for my OK. Then run it on the files I give you and show me the result and the final price. ``` The clients also work from the command line: ```bash curl -sO https://arrscale.com/sdk/arrscale.mjs node arrscale.mjs hook.mp4 person.jpg out.mp4 --resolution 360p ``` The command line prints the price and asks before generating. With no terminal to answer in (an AI agent's shell, CI) it stops with exit code 2. Run it again with `--yes` once the price is approved. ## Connect AI tools (MCP) ARRScale is also a remote MCP server at `https://arrscale.com/mcp` (Streamable HTTP). Apps that support MCP sign-in (OAuth) connect with one click on **Allow** and need no key; the others send the same key as the REST API. Its tools: `estimate_price`, `create_upload_url`, `swap_person`, `swap_to_pet`, `generate_video`, `get_request`, `list_requests`, `get_balance`, `cancel_request`. The console's **Connect your tools** page has each setup ready to copy. **MCP is paid in plan credits, not from the dollar balance.** Pick a plan in the console (**Plans**; see [Billing](#billing)). `estimate_price` and `get_balance` answer in credits, and a call without enough credits returns `insufficient_credits` with `required_credits` and `available_credits`. **Claude Code** (works with a local server too, because Claude Code runs on your computer) ```bash claude mcp add --transport http arrscale https://arrscale.com/mcp --scope user && claude mcp login arrscale ``` The second command opens ARRScale in your browser. Sign in, click **Allow**, and Claude Code keeps the token in its own secure storage: no key to copy, nothing in `~/.zshrc`. The app gets its own API key, named after it, on the console's **API keys** page; delete it there to disconnect. Over SSH, add `--no-browser` and open the printed link yourself. Check the setup with `claude mcp list`, which should show `arrscale … ✔ Connected`. With a key instead (an older Claude Code, or a server with no browser at hand): `claude mcp add --transport http arrscale https://arrscale.com/mcp --header 'Authorization: Key ${ARRSCALE_API_KEY}' --scope user`, with `ARRSCALE_API_KEY` set in the environment Claude Code starts from. **Codex** (CLI and IDE extension share `~/.codex/config.toml`) ```toml [mcp_servers.arrscale] url = "https://arrscale.com/mcp" http_headers = { "Authorization" = "Key KEY_ID:KEY_SECRET" } ``` **Cursor**: the console's **Add to Cursor** button opens Cursor's install dialog with this already filled in. By hand, add to `~/.cursor/mcp.json`: ```json { "mcpServers": { "arrscale": { "url": "https://arrscale.com/mcp", "headers": { "Authorization": "Key KEY_ID:KEY_SECRET" } } } } ``` **VS Code (GitHub Copilot)**: the **Add to VS Code** button, or `.vscode/mcp.json`: ```json { "servers": { "arrscale": { "type": "http", "url": "https://arrscale.com/mcp", "headers": { "Authorization": "Key KEY_ID:KEY_SECRET" } } } } ``` **claude.ai and Claude Desktop**: Customize → Connectors → Add custom connector. Name `ARRScale`, URL `https://arrscale.com/mcp`, request header `Authorization: Key KEY_ID:KEY_SECRET`. The URL must be public. **Grok Bot** (desktop app): Connect apps → Add a custom connector. Name `ARRScale`, type **Remote HTTPS**, Server URL `https://arrscale.com/mcp`, HTTP header `Authorization` with the value `Key KEY_ID:KEY_SECRET`, then **Add plugin**. Every Bot on the account can use it. The URL must be public. grok.com's own custom connectors sign in with OAuth only; this server supports that sign-in, but it has not been tried from grok.com yet, so use Grok Bot, Grok Build or the xAI API. **Grok Build** (xAI's coding CLI; it also loads servers already added to Claude Code or Cursor) ```bash echo 'export ARRSCALE_API_KEY=KEY_ID:KEY_SECRET' >> ~/.zshrc && export ARRSCALE_API_KEY=KEY_ID:KEY_SECRET grok mcp add --transport http arrscale https://arrscale.com/mcp --header 'Authorization: Key ${ARRSCALE_API_KEY}' ``` Keep the single quotes: Grok Build reads the key from `ARRSCALE_API_KEY` each time it loads. Check with `grok mcp doctor arrscale`. **xAI API** (Responses API remote MCP tool; xAI's servers call this server, so the URL must be public). In the xAI SDK the field is `extra_headers`. ```bash curl https://api.x.ai/v1/responses \ -H "Authorization: Bearer $XAI_API_KEY" -H "Content-Type: application/json" \ -d '{ "model": "grok-4.7", "input": "What does a 5-second scale swap at 360p cost?", "tools": [{ "type": "mcp", "server_url": "https://arrscale.com/mcp", "server_label": "arrscale", "headers": { "Authorization": "Key KEY_ID:KEY_SECRET" } }] }' ``` For local files, the agent calls `create_upload_url`, uploads with `curl -X PUT --data-binary @file`, and passes the returned `public_url`. A TikTok or Instagram page link is not a video file: download it first (for example with `yt-dlp`), then upload it. Every tool call returns within 45 seconds, because Claude Code, Codex and other MCP clients give up on a call after 60 seconds. The 45 seconds include downloading a `video_url` or `image_url` from another host, which may take at most 25 seconds (`download_timeout` otherwise; upload the file instead). A generation takes 1–2 minutes, so `swap_person` usually returns `in_progress` with a `request_id`; the agent then calls `get_request`, which waits up to 45 s per call, until the status is `completed`, and downloads `video.url`. `list_requests` finds a lost `request_id`, `get_balance` shows the credit held for requests still generating (`held_usd`), `cancel_request` stops a request that has not started (refunded in full), and an `idempotency_key` makes a retried `swap_person` return the first request instead of charging again. Links and commands that contain a key end up in shell and browser history: use a separate key for tools and delete it when you stop using them. ## Example session One hook from start to finish, with every call and response. Times are from a real 4.7-second clip. **1. Upload the hook** (`0.4 s`) ```http POST /v1/files?content_type=video/mp4 Authorization: Key key_8Hq2pV0aZc1e:sk_… Content-Type: video/mp4 ``` ```json { "file_id": "file_Q3w9xYc2", "public_url": "https://arrscale.com/v1/files/file_Q3w9xYc2/2kqk3o.mp4", "content_type": "video/mp4", "bytes": 2183311, "expires_in": 86400 } ``` **2. Upload the person's photo** (`0.1 s`) ```json { "file_id": "file_7Lp0aQe1", "public_url": "https://arrscale.com/v1/files/file_7Lp0aQe1/Xv81bd.jpg", "content_type": "image/jpeg", "bytes": 184220, "expires_in": 86400 } ``` **3. Check the price** (free, but still needs your key) ```http POST /v1/estimate/scale/1.1/video-edit Authorization: Key key_8Hq2pV0aZc1e:sk_… Content-Type: application/json { "seconds": 4.7, "resolution": "360p" } ``` ```json { "usd": "0.60", "seconds": 5, "resolution": "360p" } ``` **4. Submit** (`1.2 s`: the inputs are downloaded and checked, and $0.60 is reserved) ```http POST /v1/scale/1.1/video-edit Idempotency-Key: 6f1c2e0a-93b4-4f1e-a7d2-0c1b8e7f5a31 Content-Type: application/json { "video_url": "https://arrscale.com/v1/files/file_Q3w9xYc2/2kqk3o.mp4", "image_url": "https://arrscale.com/v1/files/file_7Lp0aQe1/Xv81bd.jpg", "resolution": "360p" } ``` ```json { "status": "queued", "request_id": "0d4c3b1e-7a51-4c52-9f0a-2b0f8e1a6c10", "status_url": "https://arrscale.com/v1/requests/0d4c3b1e-7a51-4c52-9f0a-2b0f8e1a6c10/status", "cancel_url": "https://arrscale.com/v1/requests/0d4c3b1e-7a51-4c52-9f0a-2b0f8e1a6c10/cancel", "expires_after": 604800, "estimate": { "seconds": 5, "usd": 0.6 } } ``` **5. Poll** (`GET /v1/requests/0d4c3b1e-…/status`) ```json { "status": "in_progress", "request_id": "0d4c3b1e-7a51-4c52-9f0a-2b0f8e1a6c10", "model": "scale-1.1", "resolution": "360p", "seconds": 5, "usd": 0, "stage": "removing_text", "estimate": { "seconds": 5, "usd": 0.6 } } ``` ```json { "status": "in_progress", "request_id": "0d4c3b1e-7a51-4c52-9f0a-2b0f8e1a6c10", "model": "scale-1.1", "resolution": "360p", "seconds": 5, "usd": 0, "stage": "generating", "estimate": { "seconds": 5, "usd": 0.6 } } ``` **6. Completed** (about `58 s` after submitting) ```json { "status": "completed", "request_id": "0d4c3b1e-7a51-4c52-9f0a-2b0f8e1a6c10", "model": "scale-1.1", "resolution": "360p", "created_at": "2026-11-08T12:00:00.000Z", "seconds": 5, "usd": 0.6, "video": { "url": "https://arrscale.com/v1/outputs/0d4c3b1e-7a51-4c52-9f0a-2b0f8e1a6c10/Yq0t7.mp4", "content_type": "video/mp4" }, "expires_at": "2026-11-15T12:01:02.000Z" } ``` **7. Balance** (`GET /v1/balance`): `{ "usd": "9.40" }`, which is $10.00 minus $0.60. **If something goes wrong** ```json // 402: not enough credit (nothing is queued or charged) { "detail": "Insufficient balance. Add funds in the console.", "code": "insufficient_balance", "required_usd": 0.6, "available_usd": 0.12 } // 422: the clip is longer than 10 seconds { "detail": "The video must be at most 10 seconds. Trim it to the hook first.", "code": "video_too_long" } // 429: too many queued requests (header: Retry-After: 30) { "detail": "Too many queued generations for this account", "code": "account_queue_full", "retryable": true, "limit": 10, "retry_after_seconds": 30 } // Accepted, then refused by the model: refunded, usd is 0 { "status": "failed", "request_id": "0d4c3b1e-7a51-4c52-9f0a-2b0f8e1a6c10", "model": "scale-1.1", "resolution": "360p", "seconds": 5, "usd": 0, "error": { "code": "input_rejected", "message": "The model rejected this video or reference image." } } ``` ## Authentication Send your key ID and secret in the `Authorization` header: ```http Authorization: Key KEY_ID:KEY_SECRET ``` Create keys in the [console](https://arrscale.com/console). Each key has a name and an optional expiration date. The secret is shown once and stored only as a hash, so copy it when you create the key. You can disable or delete a key at any time, and the console shows when each key was last used. - Use separate keys for development and production. - Keep keys on your server. Never call the API from browser or mobile code. - Rotate a key by creating a new one, deploying it, then deleting the old one. | Status | `code` | Meaning | | - | - | - | | `401` | `invalid_credentials` | Missing, malformed or wrong key. | | `403` | `api_key_disabled` | The key was disabled in the console. | | `403` | `api_key_expired` | The key passed its expiration date. The body includes `expires_at`. | ## scale video edit `POST /v1/scale/1.1/video-edit` Swap the person in short clips without speech (B-roll): the person in a silent hook, a reaction or a pose becomes the person in a photo, and everything else stays: framing, pose, hands, movement and timing. It runs on Alibaba Wan 3.0 through ARRScale's harness. For a person who talks to the camera, use [Chatot](#chatot-talking-head). | Field | Type | Required | Default | Description | | - | - | :-: | - | - | | `video_url` | string | Yes | | Public `https://` URL or an upload URL from `POST /v1/files`. MP4 or MOV, 3–10 seconds, up to 80 MB by URL (30 MB as an upload). | | `image_url` | string | Yes | | Photo of the new person. PNG, JPEG or WebP, at least 256 px on each side, up to 15 MB. | | `resolution` | string | No | `360p` | Generation resolution: `360p` or `720p`. The output is always delivered at 1080p. | | `prompt` | string | No | | Extra direction, up to 4,000 characters. Example: `Change her top to a plain grey tank top and the room a little.` | | `remove_text` | boolean | No | `true` | Remove burned-in captions, stickers and emoji. The result is checked; if a caption is still there, the request carries the warning `text_remaining` (it is retried once first, at no extra charge). Text that belongs to the scene, like a sign, may stay. | | `keep_audio` | boolean | No | `false` | Put the original sound back on the result. Off by default: scale is for clips without speech, so the result is silent and you add your own music. | Query parameter: `webhook` (optional), an `https://` URL that receives the result. See [Webhooks](#webhooks). **Price:** whole generated seconds × the per-second price. A 4.7-second clip is generated as 5 seconds. | Resolution | Price per second | 5-second hook | | - | - | - | | `360p` | $0.12 | $0.60 | | `720p` | $0.27 | $1.35 | **Tips for the photo** - Use a clear photo of the person from the head to the shoulders. A tight, upscaled face crop is more often rejected by the model. - The person's skin, hair and features come from the photo. A photo with natural skin (pores, marks, freckles) gives a more real result. - Clothes and background come from the video. Use `prompt` to change them a little. ## Seedance 2.5 `POST /v1/seedance/2.5/pet-swap` **Model:** ByteDance **Seedance 2.5** (video edit). It runs through ARRScale's harness: we draw a six-view reference sheet of the pet with GPT Image 2.5, write the edit prompt, send your clip to Seedance 2.5, then restore the clip's length, size and original sound. Every request to this endpoint runs on Seedance 2.5; there is no cheaper fallback model. Turns the person in a clip into a real pet. The pet is an ordinary animal: no clothes and no costume, and it moves the way that animal would, on the person's timing. When the person talks, its mouth opens on their words. When they lean in, it leans in. When they dance, it hops and spins. The room, camera, framing and light stay as they are, and the result keeps the original sound. We first draw a six-view reference sheet of the pet: from your description, or from a photo of your own pet. The video is then edited with that sheet, so the same animal appears in every frame. **When the clip already stars an animal** (a viral dog clip, a cat meme), send `"subject": "animal"`. Only that animal is replaced with your pet. It takes the original animal's place, pose and movements at the same moments, and everything else stays: the people and hands, the props, anything the animal wears, the captions, the room and the camera. The price is the same. | Field | Type | Required | Default | Description | | - | - | :-: | - | - | | `video_url` | string | Yes | | Public `https://` URL or an upload URL from `POST /v1/files`. MP4 or MOV, 4–20 seconds, up to 80 MB by URL (30 MB as an upload). | | `pet` | string | No | `white French bulldog` | The animal, up to 120 characters. Examples: `golden retriever puppy`, `black pug`, `orange tabby cat`. | | `image_url` | string | No | | A photo of a specific pet to use instead of a description (PNG, JPEG or WebP, at least 256 px on each side). With a photo, `pet` is optional. | | `subject` | string | No | `person` | Who the clip is about: `person` (the person becomes the pet) or `animal` (the animal already in the clip becomes the pet, and the people stay). | | `resolution` | string | No | `480p` | Generation resolution: `480p` or `720p`. The output is delivered at the input's own size (long side up to 1920 px). | | `prompt` | string | No | | Extra direction, up to 4,000 characters. Example: `It barks at the camera when the man shouts.` | | `remove_text` | boolean | No | `false` | Set `true` when the clip has burned-in captions: they are removed before the edit. Slower. | | `keep_audio` | boolean | No | `true` | Put the original sound back on the result. | Query parameter: `webhook` (optional). A request takes 5–9 minutes. **Price:** the clip's length rounded up to whole seconds (5 at least) × the per-second price, plus $0.20 when the request has `image_url` (your own pet photo). An 18.2-second clip is billed as 19 seconds. | Resolution | Price per second | 18-second clip | | - | - | - | | `480p` | $0.15 | $2.70 | | `720p` | $0.33 | $5.94 | Estimate first with `POST /v1/estimate/seedance/2.5/pet-swap` and `{"seconds": 18}` or `{"video_url": …}`; it is free. Add `image_url` to have the pet photo's $0.20 in the estimate. ```bash curl -s -X POST "https://arrscale.com/v1/seedance/2.5/pet-swap" \ -H "Authorization: Key $ARRSCALE_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d "{\"video_url\":\"$VIDEO\",\"pet\":\"white French bulldog\"}" ``` **Tips** - One person in the clip works best. A person passing in front of the camera may come out as part of the animal. - Reflections of the person (windows, mirrors) can stay in the video as a faint shape. - With `"subject": "animal"`, a single shot with one clear animal works best. A fast compilation of many short shots can come back with some animals unchanged: send one shot at a time. - In MCP clients the tool is `swap_to_pet`; `estimate_price` takes `"model": "seedance-2.5"`. ## Ditto `POST /v1/ditto/1.0/swap` · `POST /v1/ditto-fast/1.0/swap` · `POST /v1/ditto-lite/1.0/swap` **Ditto puts any character in place of one person in a clip**: the user themself from one photo, another person, a pet or a mascot. The character does every move of the original, in the same room, with the same camera and timing and the original sound. Hands keep holding what they held. **How it works:** ARRScale's own harness on Alibaba Wan 3.0 Prime, with no GPU step. We read the clip (who the target is by look and clothes, what their hands hold, the room, who else stays), write the full prompt, check the request's content, generate (clips over 15 s go as equal parts), check that the target is gone and the character is there (a part that failed is made once more), then restore the clip's length, size and sound. You never write a prompt. Ditto fast and Ditto lite are the same harness on ByteDance Seedance 2.0 Fast and Mini, for clips of up to 15 s; a part that fails the check is not made again there (the request fails and is refunded). | Model | Base model | Clip length | Best for | | - | - | - | - | | `ditto` | Wan 3.0 Prime, recreating the clip | 4–20 s | Anyone or anything in place of one person; people from a single photo | | `ditto-fast` | Seedance 2.0 Fast, recreating the clip | 4–15 s | Cheaper and quicker | | `ditto-lite` | Seedance 2.0 Mini, recreating the clip | 4–15 s | The cheapest | | Field | Type | Required | Default | Description | | - | - | :-: | - | - | | `video_url` | string | Yes | | Public `https://` URL or an upload URL from `POST /v1/files`. MP4 or MOV. | | `image_urls` | string[] | One of the two | | 1–8 pictures of the character, in order (PNG, JPEG or WebP, at least 300 px on each side). One clear photo of a person's face works; a six-view sheet works best for animals. | | `character` | string | One of the two | | Or a short description instead of pictures, up to 120 characters, e.g. `white French bulldog`. | | `target` | string | With several people | | Who to replace, in plain words by look and place, up to 240 characters, e.g. `the man in the navy suit`. With one person it may be left out; with several and no `target`, the most prominent one near the centre is replaced (warning `target_chosen`). | | `cast` | object[] | No | | Several people at once, each into their own character, in one generation at one swap's price. 2–4 entries of `{target, image_urls (1–4) | character}`, at most 8 pictures in all. Use instead of `target`, `image_urls` and `character`. | | `resolution` | string | No | `480p` | `480p` or `720p`. The output is delivered at the input's own size (long side up to 1920 px). | | `prompt` | string | No | | Extra direction, up to 4,000 characters. | | `remove_text` | boolean | No | `false` | Set `true` when the clip has burned-in captions: they are removed first. Slower. | | `keep_audio` | boolean | No | `true` | Put the original sound back on the result. | Header `Idempotency-Key` (send one with every request) and query parameter `webhook` (optional). A request takes 2–5 minutes. **Price:** the clip's length rounded up to whole seconds (5 at least) × the per-second price. | Model | `480p` per second | `720p` per second | 12-second clip at 480p | | - | - | - | - | | `ditto` | $0.318 | $0.681 | $3.82 | | `ditto-fast` | $0.14 | $0.24 | $1.68 | | `ditto-lite` | $0.10 | $0.16 | $1.20 | Estimate first with `POST /v1/estimate/ditto/1.0/swap` and `{"seconds": 12}` or `{"video_url": …}`; it is free. ```bash curl -s -X POST "https://arrscale.com/v1/ditto/1.0/swap" \ -H "Authorization: Key $ARRSCALE_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d "{\"video_url\":\"$VIDEO\",\"image_urls\":[\"$PHOTO\"],\"target\":\"the man in the navy suit\"}" ``` **Several people, several characters.** One request, one price: ```json { "video_url": "…", "cast": [ { "target": "the older woman with glasses on the left", "image_urls": ["https://…/ragdoll-cat.png"] }, { "target": "the woman in the mauve dress on the right", "character": "white French bulldog" } ] } ``` Each character takes the place of its own person and keeps it; they never swap or merge. Everyone not in the cast stays as they are. **Errors that cost nothing:** `video_too_long` / `video_too_short`, `image_too_small`, `missing_field` (no pictures and no `character`), `invalid_cast`, `invalid_person` (Ditto takes `target`, not numbers), `target_not_found` (nobody matches `target`; the message says who is in the clip), `input_rejected` (the model refused the input), `generation_failed` (the swap did not come out right; refunded). **Tips** - One person or a clear `target`, and the target's face visible for a moment, work best. - A person character keeps the target's outfit, fitted to them; say otherwise in `prompt`. An animal becomes a whole real animal with no clothes. - In MCP clients the tool is `ditto_swap` (model `ditto` by default); `estimate_price` takes the same model id. ### Self-hosted provider settings Every Seedance video (generations, the pet swap, Ditto fast and Ditto lite) runs on BytePlus ModelArk direct with `ARK_API_KEY`; a request BytePlus refuses fails and is refunded rather than moving to another provider. `ARRSCALE_BYTEPLUS_SD25` overrides the Seedance 2.5 endpoint, and `ARRSCALE_SEEDANCE_PROVIDER=sume` restores the earlier routing through `SUME_API_KEY`. scale and Ditto run Wan 3.0 on MuleRouter (`MULEROUTER_API_KEY`), with Sume's Wan (`SUME_API_KEY`) after it; `ARRSCALE_ROUTES=gemini,…` puts Gemini Omni (`GEMINI_API_KEY`) back in front for scale. Analysis uses `GEMINI_API_KEY`. Provider keys stay on the server. ## Chatot (talking head) Chatot is ARRScale's talking-head model. `POST /v1/video/talking-head` remakes a talking-head video with a new person and a new voice. The person talking in the original is replaced by the person in your pictures, who says your script (or, without one, the original's own words) in the voice you picked, with lip-sync. The framing, room, light, gestures and jump-cut style of the original stay; on-screen text is left out. The result has the new voice and no background music: add the music yourself (or with your own agent), following the original video's music. ```json { "video_url": "https://arrscale.com/v1/files/file_…/….mp4", "image_urls": ["https://arrscale.com/v1/files/file_…/….png"], "voice_id": "f2a6…", "script": "So it turns out, a study found that texting is making couples feel less close. …", "prompt": "Say \"Magicka\" as \"magic-ah\".", "resolution": "480p" } ``` - `video_url` (required): the original, 3–90 seconds, one person talking works best. - `image_urls` (required): 1–3 pictures of the new person, a photo or a character sheet (several views of the same person). `image_url` works for one. - `voice_id` (required): a library voice (`GET /v1/voices/explore`) or one of your clones (`vc_…`), see [Voices](#voices). - `script`: the words to say, exactly, up to 1,500 characters. Without it, the original's speech is transcribed and kept. - `prompt`: optional direction, such as how to pronounce a name (`Peeps like "peeps"`) or where to sound excited, soft or urgent. Say where by place ("excited on the app's name", "urgent on the last line"), never by quoting the script: the model says quoted script words again, so a prompt that repeats script words (a quoted phrase of two or more, or five in a row) is refused with `422 prompt_quotes_script`. Ending lines with "!" or "?" in the script also adds rise and fall. - `delivery` (default `lively`): `lively` = expressive, big rises and falls in pitch, energy on the key words; `original` = the manner of the person in the original video. Lively voices (styles energetic, expressive, enthusiastic) help too; soft, calm or asmr voices sound flat. - `resolution`: `480p` (default) or `720p`, the size it is generated at. `finish` (default true) makes it 1080p. - `finish`: `false` returns the raw take (no jump cuts, look matching, upscale or echo). - `sheet`: with a single photo, a six-view sheet of the person is drawn from it first, so every take keeps the same face (default `true`). How it is made: with a single photo, a six-view sheet of the person is drawn from it first. Each take then starts from a drawn first frame of this person in that part of the original. Wan 3.0 gets 5–8 seconds of the original (silent, from where the take's words fall) for the motion and framing, your pictures and the sheet for the look, an 8-second sample of the voice for the timbre, and the script word for word. A take holds at most 15 seconds of speech (longer takes drop words), so the script is split at sentence ends into up to 6 takes (about 290 words), shared out evenly and joined with a cut. The finish then cuts the pauses with a new framing for each piece, adds only the camera shake, grain and one-sided light the take lacks next to the original (both are measured), brings saturation and contrast to the original's, upscales to 1080p without sharpening (it makes generated skin look plastic), adds a little room echo at −16 LUFS (and a quiet room tone when the take is near-silent between words), and encodes at about 7 Mbps like a phone upload. Afterwards each take is listened to: a take that dropped words is made once more and the better one kept; words still missing come back as a warning `words_missing: …`. It takes 10–15 minutes. Pricing: $0.08 per billed second at 480p, $0.15 at 720p, plus $0.20 per video and $0.10 per take (the six-view sheet and each take's drawn first frame). Each take bills its reference (5–8 seconds of the original) plus its own length. A 75-word script on a 30-second original is one take of 24 seconds with a 6-second reference: 30 billed seconds, $2.70. Console and MCP: 0.75 or 1.5 credits per billed second plus 2 credits per video and 1 per take. `POST /v1/estimate/video/talking-head` with `{video_url | seconds, script?, resolution?}` returns `{usd, seconds, takes, reference_seconds, words_from}`. MCP: `talking_head`, estimated with `estimate_price` model `talking-head` and the same `script`. Errors before anything is held: `404 voice_not_found`, `422 script_too_long`, `422 video_too_long`, `503 voices_unavailable`. During the run: `no_speech` (no script and nothing said in the original; refunded). ### Plan first, then your own footage Your own agent knows your product best, so it writes the script and picks the footage; ARRScale reads the original and does the rest. The flow: 1. `POST /v1/video/talking-head/plan` with `{video_url}` (free, about 30 seconds) returns `sentences` (the original's words with times), `slots` (every app icon, screenshot or clip it lays over the speaker: `start`, `end`, `layout` icon/small/big/full, `box` [x, y, width, height] as fractions, `shows`, `said`), `clear` stretches and a `script_guide` (words per take, the most words a script can have). 2. Write one line per original sentence for your product, about as many words. For each slot, pick your own footage or picture that shows what your line says. 3. Upload the footage and call `POST /v1/video/talking-head` with the script and the finishing you want: ```json { "video_url": "…", "image_urls": ["…"], "voice_id": "…", "script": "…", "inserts": [ { "media_url": "https://arrscale.com/v1/files/…/….png", "words": "find this little game", "layout": "icon" }, { "media_url": "https://arrscale.com/v1/files/…/….mp4", "words": "make one room together", "layout": "small", "crop_top": 0.063 }, { "media_url": "https://arrscale.com/v1/files/…/….mp4", "words": "decorate your home together", "layout": "big", "start_at": 5.5 } ], "captions": true, "end_card_url": "https://arrscale.com/v1/files/…/….png", "end_card_seconds": 1 } ``` - `inserts`: up to 12. Each shows on its `words` (they must be in the script) and stays until the next insert of its kind (icon or screen) when that comes within 2.5 seconds, otherwise until just after its words. `layout`: `icon` (an app icon above the captions), `small` (a phone screen top left), `big` (a large phone screen in the middle), `full` (the whole frame), or your own `box`. Videos play at normal speed from `start_at` and hold their last frame if shorter; `crop_top`/`crop_bottom` cut a status bar or a home bar. Inserts are silent, straight, with rounded corners and no shadow. - `captions`: every spoken word, in short phrases, the word being said highlighted. - `end_card_url`: a picture over the last `end_card_seconds` (0.5–5, default 1). A 9:16 picture covers the frame (use a transparent PNG to keep the speaker visible); anything else is shown as a card. - `trim_extra` (default true): words said that are not in the script (a repeated phrase, a stray word at the start of a take) are cut at their word boundaries. Cut words come back as a warning `words_cut: …`. - An insert whose words are not in the script is skipped with a warning `insert_not_placed: …`. To change the footage, captions or end card afterwards, `POST /v1/video/talking-head/refinish` with `{request_id}` and the whole finishing you want (anything left out is off). It is free, takes about a minute, and does not make the video again: a completed talking head keeps its base, and its status says `refinish`. `POST /v1/video/talking-head/finish` finishes any video you send as `video_url` the same way. MCP: `plan_talking_head`, `talking_head`, `refinish_talking_head`. ## Seedance from a prompt Every Seedance model makes a new video from a prompt (text-to-video), or from a prompt and a first frame (image-to-video). These are ByteDance's models under their own names, run through ARRScale. The request goes to the model as it is, and the video comes back as the model made it. | Model | Endpoint | Length | Per second, by resolution | | - | - | - | - | | Seedance 2.5 | `POST /v1/seedance/2.5/generate` | 5–30 s | `480p` $0.123 · `720p` $0.277 · `1080p` $0.682 | | Seedance 2.0 | `POST /v1/seedance/2.0/generate` | 5–15 s | `480p` $0.084 · `720p` $0.181 · `1080p` $0.449 · `4K` $0.933 | | Seedance 2.0 Fast | `POST /v1/seedance/2.0-fast/generate` | 5–15 s | `480p` $0.067 · `720p` $0.145 | | Seedance 2.0 Mini | `POST /v1/seedance/2.0-mini/generate` | 5–15 s | `480p` $0.042 · `720p` $0.09 | The price is the seconds you ask for × the rate, rounded up to the cent. Seedance 2.5 costs less here than when it edits a clip (above), because there is no source clip for the model to read. | Field | Type | Required | Notes | | - | - | - | - | | `prompt` | string | yes | What the video shows: the subject, what happens, the camera, the place and the light. Up to 4,000 characters. | | `image_url` | string | no | The first frame: a `public_url` from `/v1/files`, or a direct https link. At least 300 px on each side. | | `duration` | integer | no | Whole seconds. Default `5`, the shortest. | | `resolution` | string | no | Default `720p`. | | `aspect_ratio` | string | no | `9:16`, `16:9`, `1:1`, `3:4`, `4:3` or `21:9`. Default `9:16`; with `image_url`, the frame's own shape. | | `generate_audio` | boolean | no | Default `true`: the model makes the sound too. `false` for a silent video. | ```bash curl -s -X POST "https://arrscale.com/v1/seedance/2.0-mini/generate" \ -H "Authorization: Key $ARRSCALE_API_KEY" -H "Content-Type: application/json" -H "Idempotency-Key: $(uuidgen)" \ -d '{"prompt": "A corgi runs along a beach at sunset, the camera low and following it", "duration": 5, "resolution": "480p"}' # {"status":"queued","request_id":"…","status_url":"…","estimate":{"seconds":5,"usd":0.21}} ``` The receipt, statuses, polling, webhooks, idempotency and refunds are the same as for the swaps; a status carries `"task": "generate"`. Estimate first with `POST /v1/estimate/seedance/2.0-mini/generate` and `{"duration": 5, "resolution": "480p"}` (each model has its own estimate path; it is free). To change a clip that exists, use scale or `/v1/seedance/2.5/pet-swap`: these endpoints take no source video. In MCP clients the tool is `generate_video` with `model` (`seedance-2.5`, `seedance-2.0`, `seedance-2.0-fast` or `seedance-2.0-mini`); `estimate_price` takes `"generate": true` with the model, `seconds` and `resolution`. ## Uploading files `POST /v1/files?content_type=TYPE` Send the file as the raw request body. Accepted types: `video/mp4`, `video/quicktime`, `image/png`, `image/jpeg`, `image/webp`, and for voice recordings `audio/mpeg`, `audio/wav`, `audio/mp4`. Up to 30 MB (a 10 s clip is usually under 20 MB). A bigger file gets `413 file_too_large`: pass it as a direct `https://` `video_url` instead, which may be up to 80 MB. ```json { "file_id": "file_Q3w9xYc2", "public_url": "https://arrscale.com/v1/files/file_Q3w9xYc2/2kqk3o-sG0mX.mp4", "content_type": "video/mp4", "bytes": 2183311, "expires_in": 86400 } ``` Pass `public_url` as `video_url` or `image_url`. Uploads are deleted after 24 hours and can only be used by the account that uploaded them. **One-time upload URL** (like a presigned URL; the upload itself needs no key, so an agent can upload with plain curl): ```bash curl -s -X POST "https://arrscale.com/v1/files/upload-url" -H "Authorization: Key $ARRSCALE_API_KEY" \ -H "Content-Type: application/json" -d '{"content_type": "video/mp4"}' # {"upload_url":"https://arrscale.com/v1/uploads/gZ-CMoc…","method":"PUT","content_type":"video/mp4","expires_in":900} curl -s -X PUT --data-binary @hook.mp4 -H "Content-Type: video/mp4" "https://arrscale.com/v1/uploads/gZ-CMoc…" # {"file_id":"file_…","public_url":"https://arrscale.com/v1/files/file_…/….mp4","content_type":"video/mp4","bytes":3205267,"expires_in":86400} ``` The upload URL works once, within 15 minutes (`upload_expired` after that). The MCP tool `create_upload_url` returns the same kind of URL. `video_url` and `image_url` can also be direct `https://` links to the file on another host. A web page (a TikTok or Instagram post link) is refused with `invalid_media`: download the file first and upload it. ## Voices The voice a talking head speaks in. Two kinds: - **Library voices** (`source: "library"`): voices we have listened to and approved. Each has a short `preview_url` to listen to. - **Your voices** (`source: "mine"`): cloned from a recording you upload, private to your account. Only clone a voice that is yours or that its owner allowed you to use, and say so with `consent: true`. `GET /v1/voices?gender=female&age=young&style=energetic&query=warm` All filters are optional: `gender` (`female`, `male`, `neutral`), `age` (`young`, `middle-aged`, `old`), `style` (one tag, such as `energetic`, `calm`, `conversational`, `narration`), `query` (a word in the name). Your own voices come first. ```json { "voices": [ { "voice_id": "vc_9cXq2mVb1kTn", "name": "My voice", "source": "mine", "gender": null, "age": null, "styles": [], "languages": [], "preview_url": "https://arrscale.com/v1/files/file_…/….mp3" }, { "voice_id": "f2a6…", "name": "Warm Narrator", "source": "library", "gender": "female", "age": "middle-aged", "styles": ["narration", "calm"], "languages": ["en"], "preview_url": "https://…" } ] } ``` `POST /v1/voices` ```json { "name": "My voice", "audio_url": "https://arrscale.com/v1/files/file_…/….mp3", "consent": true } ``` Upload the recording first (`POST /v1/files?content_type=audio/mpeg`, or `audio/wav`, `audio/mp4`). It must be 10–180 seconds of one person speaking, without music, 20 MB at most. The answer (`201`) is the new voice, ready at once, with a preview of it. Without `consent: true` the request is refused (`422 consent_required`). An account keeps up to 10 voices. `DELETE /v1/voices/{voice_id}` removes one of your voices and its preview. `GET /v1/voices/explore?query=&tags=female,energetic&language=en&sort=trending&page=1` searches Fish Audio's whole voice library live, community voices included (`licensed=true` keeps only licensed voices, `official=true` keeps Fish Audio's own). `POST /v1/voices/saved` `{voice_id}` keeps a library voice in your list (`DELETE /v1/voices/saved/{voice_id}` takes it out). MCP: `list_voices` (with a `browse_url` to the console's Voices page), `save_voice`, `remove_voice`, `create_voice`. Errors: `422 invalid_audio` (too short, too long or unusable), `422 too_many_voices`, `404 voice_not_found`, `503 voices_unavailable`. ## Requests and lifecycle | Status | Terminal | Meaning | | - | :-: | - | | `queued` | No | Waiting to start. Can still be canceled. `queue.position` (1 is next) and `queue.estimated_wait_seconds` show where it stands; the wait is a guide, not a promise. | | `in_progress` | No | Generating. `stage` shows `preparing`, `removing_text`, `generating` or `finishing`. | | `completed` | Yes | `video.url` is ready. | | `failed` | Yes | Generation failed. `error.code` and `error.message` say why. Not charged. | | `nsfw` | Yes | Blocked by content moderation. Not charged. | | `canceled` | Yes | Canceled before it started. Not charged. | `GET /v1/requests/{request_id}/status` ```json { "status": "completed", "request_id": "0d4c3b1e-7a51-4c52-9f0a-2b0f8e1a6c10", "model": "scale-1.1", "resolution": "360p", "created_at": "2026-11-08T12:00:00.000Z", "seconds": 5, "usd": 0.6, "video": { "url": "https://arrscale.com/v1/outputs/0d4c3b1e-7a51-4c52-9f0a-2b0f8e1a6c10/Yq0t7.mp4", "content_type": "video/mp4" }, "expires_at": "2026-11-15T12:01:02.000Z" } ``` `POST /v1/requests/{request_id}/cancel` cancels a `queued` request and returns `202` with an empty body. A request that has started returns `400` (`not_cancelable`). `DELETE /v1/requests/{request_id}` deletes a finished request's files now. A running request returns `409`. Files are kept for 7 days after a request finishes (`expires_at`). Download results to your own storage. ## Polling 1. Start with a 2-second interval. 2. Increase it gradually up to 10 seconds. 3. Stop on `completed`, `failed`, `nsfw` or `canceled`. 4. Retry status calls after network errors and `5xx` responses. Do not resubmit the generation. ```js let delay = 2000, s; do { await new Promise(r => setTimeout(r, delay)); s = await (await fetch(statusUrl, { headers: { Authorization: `Key ${process.env.ARRSCALE_API_KEY}` } })).json(); delay = Math.min(delay * 1.5, 10000); } while (!['completed', 'failed', 'nsfw', 'canceled'].includes(s.status)); ``` ## Webhooks Add `?webhook=` with a URL-encoded `https://` endpoint when you submit. ARRScale sends a `POST` when the request reaches `completed`, `failed` or `nsfw`. ```json { "request_id": "0d4c3b1e-7a51-4c52-9f0a-2b0f8e1a6c10", "status": "completed", "error": null, "expires_at": "2026-11-15T12:01:02.000Z", "payload": { "video": { "url": "https://arrscale.com/v1/outputs/0d4c3b1e-.../Yq0t7.mp4", "content_type": "video/mp4" } } } ``` Deliveries are signed with [Standard Webhooks](https://www.standardwebhooks.com/). Your signing secret (`whsec_…`) is in the console. Verify the `webhook-signature` header before trusting a delivery: ```js import { createHmac, timingSafeEqual } from 'node:crypto'; function verify(secret, headers, rawBody) { const key = Buffer.from(secret.replace(/^whsec_/, ''), 'base64'); const signed = `${headers['webhook-id']}.${headers['webhook-timestamp']}.${rawBody}`; const expected = createHmac('sha256', key).update(signed).digest('base64'); if (Math.abs(Date.now() / 1000 - Number(headers['webhook-timestamp'])) > 300) return false; return headers['webhook-signature'].split(' ').some(s => { const got = Buffer.from(s.replace(/^v1,/, '')), want = Buffer.from(expected); return got.length === want.length && timingSafeEqual(got, want); }); } ``` Respond with `2xx` within 10 seconds. Network errors and `5xx` responses are retried after 10 s, 1 min and 5 min; `4xx` responses are not. Deduplicate by `webhook-id`. ## Idempotency Send `Idempotency-Key` (1–255 visible ASCII characters; a UUID is recommended) with every submission. If the response is lost, repeat the same request with the same key: you get the original `request_id` and are not charged again. Reusing a key with different parameters returns `422` (`idempotency_mismatch`). ## Errors Errors return JSON with `detail` (a readable message) and `code` (stable; use this in your code). | Status | `code` | Meaning | Retry? | | - | - | - | :-: | | `400` | `not_cancelable` | The request already started. | No | | `401` | `invalid_credentials` | Missing or wrong key. | No | | `402` | `insufficient_balance` | REST API: not enough prepaid credit. Includes `required_usd` and `available_usd`. | After adding funds | | `402` | `insufficient_credits` | Console and MCP: not enough plan credits (or no plan). Includes `required_credits`, `available_credits` and `plan`. | After choosing a plan | | `403` | `api_key_disabled`, `api_key_expired` | The key cannot be used. | No | | `404` | `not_found` | Unknown request, or it belongs to another account. | No | | `409` | `still_running` | Deleting a request that has not finished. | After it finishes | | `422` | `video_too_short`, `video_too_long`, `invalid_url`, `invalid_media`, `image_too_small`, `unknown_field`, `idempotency_mismatch`, … | Fix the request. | After fixing | | `422` | `unreachable_url`, `download_timeout`, `file_too_large` | A `video_url` or `image_url` on another host could not be downloaded in time or in size. | After uploading the file instead | | `429` | `account_queue_full` | Too many queued requests. Wait `Retry-After` seconds. | Yes | | `429` | `queue_full` | ARRScale is at capacity: too many requests are waiting across all accounts. Nothing was queued or charged. Wait `Retry-After` seconds. | Yes | | `429` | `rate_limited` | Too many API calls this minute for the key or the account (`scope`, `limit`). Wait `Retry-After` seconds. | Yes | | `429` | `daily_limit_reached` | The account's generations in the last 24 hours reached its limit (`limit`). Nothing was charged. | After `Retry-After` | | `500` | `internal_error` | Unexpected error. | Yes, with backoff | | `503` | `text_removal_unavailable` | Caption removal cannot run right now. Nothing was queued or charged. | Yes, or send `remove_text: false` | A request that is accepted can still end as `failed`. The most common `error.code` is `input_rejected`: the model refused the video or the photo. Try a wider photo of the person (head and shoulders), or a different clip. `text_removal_failed` means the captions could not be removed from this clip (nothing was generated); `interrupted` means the server restarted while the request was generating. Failed requests are never charged. ## Billing There are two ways to pay, and they don't mix: the REST API spends a prepaid dollar balance, and the console and MCP spend a plan's credits. - **REST API: prepaid credit.** Add any whole amount from $5 to $5,000 in the console (presets $5, $25, $100, $200 and $500; card payment through Stripe). Auto top-up can charge a saved card when the balance falls below an amount you choose. - **Console and MCP: a monthly plan.** A plan gives credits every month. One credit is one second of scale at 360p. | Plan | Price | Credits a month | 5-second hooks at 360p | | - | - | - | - | | Starter | $19 | 150 | 30 | | Plus | $49 | 450 | 90 | | Pro | $129 | 1,200 | 240 | | Model | Resolution | Credits per second | | - | - | - | | scale | `360p` | 1 | | scale | `720p` | 2 | | Seedance 2.5 | `480p` | 1.5 | | Seedance 2.5 | `720p` | 3.5 | Seedance 2.5 bills a clip's length rounded up to whole seconds, 5 at least, and a request with its own pet photo (`image_url`) adds 2 credits. A video from a prompt (`generate_video` in MCP), credits per second: | Model | `480p` | `720p` | `1080p` | `4K` | | - | - | - | - | - | | Seedance 2.5 | 1.5 | 3 | 6.5 | | | Seedance 2.0 | 1 | 2 | 4.5 | 9 | | Seedance 2.0 Fast | 1 | 1.5 | | | | Seedance 2.0 Mini | 0.5 | 1 | | | Plans renew every month until canceled in the console; a canceled plan stays on until the end of the paid month. Credits are for that month and don't roll over. Switching plans starts the new one at once and keeps the credits that are left until its first renewal. - **You pay for completed requests only.** The price (dollars or credits) is reserved when a request is accepted and settled when it finishes. Failed, moderated and canceled requests are given back in full. - **Estimate first:** `POST /v1/estimate/scale/1.1/video-edit` with `seconds` (or `video_url`) and `resolution` returns the price without generating anything. ```bash curl -s -X POST "https://arrscale.com/v1/estimate/scale/1.1/video-edit" \ -H "Authorization: Key $ARRSCALE_API_KEY" -H "Content-Type: application/json" \ -d '{"seconds": 4.7, "resolution": "360p"}' # {"usd":"0.60","seconds":5,"resolution":"360p"} ``` `GET /v1/balance` returns `{"usd": "9.40"}`. ## Limits - 2 requests generate at the same time per account; more wait as `queued`. - Up to 10 queued or running requests per account. Beyond that: `429` with `Retry-After`. - When the queue for all accounts is full, a new request gets `429 queue_full` with `Retry-After`. Nothing is queued or charged. - Up to 50 generations per account in 24 hours (ask us for more). Beyond that: `429 daily_limit_reached`. - API calls (the REST API and MCP together): 60 a minute per key and 120 per account; status and balance checks 600 a minute per key and 1,200 per account. Beyond that: `429 rate_limited` with `Retry-After`. - Video 3–10 seconds for scale, 4–20 seconds for Seedance 2.5; up to 30 MB as an upload, 80 MB by `video_url`. Photo up to 15 MB. - A video from a prompt: 5–30 seconds on Seedance 2.5, 5–15 on Seedance 2.0, 2.0 Fast and 2.0 Mini. ## Content rules - You need the rights to the input video, and the consent of the person in the photo (or the photo must be AI-generated). - No minors, no sexual content, no content that impersonates a real person or misrepresents a real event. - Results are AI-generated. When you post them, turn on the platform's AI label where it is required (TikTok, Instagram). ## Client libraries Zero-dependency clients for server-side use: - Node 18+: [https://arrscale.com/sdk/arrscale.mjs](https://arrscale.com/sdk/arrscale.mjs) - Python 3.8+: [https://arrscale.com/sdk/arrscale.py](https://arrscale.com/sdk/arrscale.py) ```js import { ArrScale } from './arrscale.mjs'; const client = new ArrScale(); // reads ARRSCALE_API_KEY const result = await client.run({ video: 'hook.mp4', image: 'person.jpg', resolution: '360p' }); await client.download(result.video.url, 'out.mp4'); console.log(result.usd); ``` ```python from arrscale import ArrScale client = ArrScale() # reads ARRSCALE_API_KEY result = client.run(video="hook.mp4", image="person.jpg", resolution="360p") client.download(result["video"]["url"], "out.mp4") ```