# Mandala Computer > Full cloud computers your agents can see, control, and operate. Create a machine, watch its screen, > click and type on it, run commands inside it, and snapshot it. ## SDKs Three clients wrap this API, each reading the key from `MANDALA_API_KEY`, and a hosted MCP server offers it to agents without one. - Python: `pip install mandala-computer` — https://github.com/mandalacomputer/python-sdk - TypeScript: `npm install mandala-computer` — https://github.com/mandalacomputer/typescript-sdk - MCP server, most endpoints as tools (not key minting and revocation): `npx -y mandala-computer-mcp` — https://github.com/mandalacomputer/mcp In Claude Code, install it as a plugin instead: `/plugin marketplace add mandalacomputer/mcp` then `/plugin install mandala-computer@mandala`. That brings a skill along with the server — when to reach for a computer, what suspension frees (on a plan, running capacity without reducing the monthly subscription charge), and which refusals are worth a retry. AI-credit usage is charged separately. - Hosted MCP server, nothing to install: point a client that supports remote MCP at `https://app.mandala.computer/mcp` (in Claude Code, `claude mcp add --scope user --transport http mandala https://app.mandala.computer/mcp`). It signs in through the browser (OAuth); revoke it under Settings → Credentials → Connected apps. A client that cannot open a browser, and lets you set its own `Authorization` header, can send a Mandala API key instead, as `Authorization: Bearer com_…`; it then acts exactly as that key does. ## Authentication The REST resource operations documented here carry an API key as a bearer token; OPTIONS is public path metadata. Keys are created in Settings, through explicit browser approval (device login), or with `POST /api-keys` by a key its holder allowed to manage keys (Settings → Credentials → API keys → the key’s menu → Allow managing keys) and whose holder is a member or owner, and are shown once. Human device login uses separate authentication bootstrap endpoints outside this bearer resource API: see https://app.mandala.computer/docs/device-login for the JSON protocol. ``` curl -H "Authorization: Bearer com_..." https://app.mandala.computer/api/v1/computers ``` A key acts as one account. A key issued against a workspace is confined to it and sees only the computers in that workspace, which is what makes a leaked CI key a bounded problem. A key may also expire, and may be limited to specific computers: a computer outside the limit answers `404`, and a route the limit rules out answers `403`. The access tokens the hosted MCP server at `https://app.mandala.computer/mcp` signs in with are not API keys: sent here directly, one is refused with `401` (`reason: "invalid"`). Use an API key. HTTP conventions: every public GET route also accepts HEAD with no response body. HEAD retains the GET role and scope checks. Ordinary finite reads compute GET metadata; file and legacy exec-PID HEAD use native metadata checks, never resume a guest or consume output. Build-event HEAD opens no stream or held stream slot. Artifact/output HEAD verifies retained metadata and file safety without reading chunks. Body-derived headers or failures detectable only by reading content may be unavailable. Range is ignored on HEAD. OPTIONS is public, bodyless path metadata. It returns only that public path’s Allow methods, including HEAD for GET; unknown, unsafe and daemon-only paths remain 404. An authenticated unsupported method on a known public path returns 405 with the same path-specific Allow, after authority and rate checks. For /computers: GET, HEAD, POST, OPTIONS. Listings: there is no single paging scheme, and most listings have none: they answer everything in one response and take no page parameters. GET /agent/threads and GET /agent/runs take limit and before and answer has_more; while has_more is true, pass the last item’s id as before for the next page. GET /operations and GET /computers/{id}/activities take an opaque cursor and answer next_cursor; GET /credits takes an integer before and answers next_before. Send next_cursor or next_before back until it is null. The activities changes_cursor is not a page cursor and is never null: it is a feed position, read on from with changes=1. GET /computers/{id}/signals is a feed rather than a listing: send the cursor it answered as since. GET /webhooks/{id}/deliveries takes limit and before too but answers a plain array with no has_more: a page shorter than limit is the last. GET /computers/{id}/files/list is capped rather than paged, and marks a cut-short directory truncated: true. Application responses carry a server-generated X-Request-ID. Finite HTTP error objects and application SSE error frames also carry request_id; OpenAI errors retain their nested error object and streaming [DONE] terminator. Caller X-Request-ID is not accepted as the correlation identity. Successful binary/SSE content is unchanged. HEAD errors carry correlation only in the header. Non-JSON, malformed, aborted, oversized (over 1 MiB), or stalled (over 2 seconds of error-body reading) upstream errors use a small correlated envelope with the original status. Infrastructure failures outside the application may have a different shape. The desktop, terminal and browser WebSocket handshakes are an exception: a refusal from the platform’s edge, before the handshake reaches the computer’s host, carries no X-Request-ID and no request_id. Idempotency-Key is honoured only on the routes that document it (the lifecycle operations). Every other route ignores the header: it is neither validated nor deduplicated, so a retried POST /webhooks, POST /api-keys, POST /secrets, POST /workspaces, POST /ssh-keys or snapshot capture does the work again — a second webhook, API key, secret, workspace or snapshot, or a refusal because the first one already holds that name or SSH key. List before retrying a create whose answer you did not see. A path with a trailing slash is redirected (308) to the same path without it before the API sees the request, so that redirect carries no X-Request-ID; send paths without one. Platform API-key 401 reasons are missing (no Authorization attempt), invalid (malformed or unknown credential), and revoked (retained evidence of revocation, or a key past its `expires_at`, whose `error` says `API key expired`). WWW-Authenticate is Bearer for missing and Bearer error="invalid_token" for invalid/revoked. Revocation evidence contains hashes only, retained for at most 90 days and the newest 100,000 hashes globally; older, pre-upgrade or evicted evidence means invalid. A fresh revoked request cannot recover the former holder’s identity. Known suspension or lost membership remains an authority 403; provider 401 errors do not mean the platform API key is invalid. The computer’s events_url is a WebSocket capability: use the exact returned URL with its embedded controlling desktop credential. Do not replace its origin with the REST base URL. A Bearer API key alone receives uniform JSON 400 guidance naming events_url; it does not authenticate the socket. Base URL: `https://app.mandala.computer/api/v1` OpenAPI: `https://app.mandala.computer/api/docs/openapi.json` API catalog (RFC 9727): `https://app.mandala.computer/.well-known/api-catalog` Getting a credential, for agents: `https://app.mandala.computer/auth.md` Reference: `https://app.mandala.computer/docs` Full reference, one file: `https://app.mandala.computer/llms-full.txt` ## Computers and billing Named sizes, as `size` on a create: `small` (base, 2 vCPU, 2 GB RAM, 20 GB disk), `standard` (base, 2 vCPU, 4 GB RAM, 20 GB disk), `large` (base, 4 vCPU, 8 GB RAM, 40 GB disk), `hermes-standard` (hermes, 2 vCPU, 4 GB RAM, 20 GB disk), `claude-standard` (claude, 2 vCPU, 4 GB RAM, 20 GB disk), `claude-large` (claude, 4 vCPU, 8 GB RAM, 40 GB disk), `omarchy-standard` (omarchy, 2 vCPU, 4 GB RAM, 20 GB disk), `openclaw-standard` (openclaw, 2 vCPU, 4 GB RAM, 20 GB disk). A named size can start in seconds from pre-booted stock when a matching one is free. Without one, or on a create with secrets or a proxy, the computer boots cold. The screen is 1280×800 unless `resolution` says otherwise. `GET /sizes` and `GET /templates` are the authority on what this account can launch. Billing: an account pays for computers with a monthly plan or is on a trial, and one with no means of paying cannot launch (`402`, `code: PLAN_REQUIRED`). On a plan, stopping or suspending a computer frees running capacity without reducing the monthly subscription charge. An account on pay as you go pays from a credit balance instead: compute by the second while a computer runs, at $0.03 per vCPU-hour plus $0.015 per GB-hour of RAM, and disk at $0.10 per GB-month until it is deleted. A day not spent wholly on pay as you go is not charged, and disk is not charged on a day the account was out of credit. When that balance runs out, running computers are suspended, or stopped where a session cannot be saved, and computers on an account out of credit for 30 days may be deleted, after an email warning at least seven days before. After a move to a plan that includes less storage, an account that still stores more than it includes once the notice period has ended keeps everything, but creates, starts and restores no computer until it fits (`402`, `code: STORAGE_OVER_PLAN`). AI-credit usage is charged separately. `GET /account` reports the plan’s ceilings and `GET /credits` the balance and `billing_mode`. ## Endpoints ### Account Effective plan ceilings and advisory remaining quota. Reference: `https://app.mandala.computer/docs/api/account` - `GET /account` — Read account quota (role: viewer) ### Templates What a computer can be built from, and the sizes it can be built at. Reference: `https://app.mandala.computer/docs/api/templates` - `GET /templates` — List templates (role: viewer) - `GET /templates/schema` — Get the template schema (role: viewer) - `POST /templates/validate` — Check a template document (role: member) - `POST /templates` — Publish a template (role: member) - `GET /templates/{namespace}/{name}` — Get a template (role: member) - `DELETE /templates/{namespace}/{name}` — Retire a template (role: member) - `GET /sizes` — List sizes (role: viewer) ### Builds Compiling a template document into an image of your own. Reference: `https://app.mandala.computer/docs/api/builds` - `POST /builds` — Build a template (role: member) - `GET /builds` — List builds (role: viewer) - `GET /builds/{id}` — Get a build (role: viewer) - `POST /builds/{id}/cancel` — Cancel a build (role: member) - `GET /builds/{id}/progress` — Get build progress (role: viewer) - `GET /builds/{id}/events` — Stream build progress (role: viewer) ### Computers Creating machines, and their lifecycle. Reference: `https://app.mandala.computer/docs/api/computers` - `GET /computers` — List computers (role: viewer) - `POST /computers` — Create a computer (role: member) - `GET /computers/{id}` — Get a computer (role: viewer) - `PATCH /computers/{id}` — Update a computer (role: member) - `DELETE /computers/{id}` — Delete a computer (role: member) - `POST /computers/{id}/start` — Start a computer (role: member) - `POST /computers/{id}/stop` — Stop a computer (role: member) - `POST /computers/{id}/suspend` — Suspend a computer (role: member) - `POST /computers/{id}/restart` — Restart a computer (role: member) - `PUT /computers/{id}/workspace` — Move a computer to a workspace (role: member) - `GET /computers/{id}/secrets` — Read the secrets bound to a computer (role: viewer) - `PUT /computers/{id}/secrets` — Change the secrets bound to a computer (role: member) - `POST /computers/{id}/clone` — Clone a computer (role: member) ### Moves When a resize needs a bigger host than the one the computer is on. Reference: `https://app.mandala.computer/docs/api/moves` - `POST /computers/{id}/move` — Move a computer so a resize fits (role: member) - `GET /moves` — List moves (role: viewer) ### Control Driving the desktop: what is on screen, and acting on it. Reference: `https://app.mandala.computer/docs/api/control` - `GET /computers/{id}/screenshot` — Take a screenshot (role: viewer) - `POST /computers/{id}/input` — Send input (role: member) - `POST /computers/{id}/exec` — Run a command (role: member) - `POST /computers/{id}/browser-connections` — Open a browser connection (role: member) - `DELETE /computers/{id}/browser-connections/{connection}` — Revoke a browser connection (role: member) - `POST /computers/{id}/browser-connections/{connection}/renew` — Renew an attached browser session (role: member) - `GET /computers/{id}/exec/{pid}` — Read a background command (role: member) - `DELETE /computers/{id}/exec/{pid}` — Stop a background command (role: member) - `GET /computers/{id}/executions/{executionId}` — Read execution metadata (role: member) - `GET /computers/{id}/executions/{executionId}/output` — Read execution output independently (role: member) - `GET /computers/{id}/windows` — List windows (role: viewer) - `POST /computers/{id}/windows/{window}` — Act on a window (role: member) - `GET /computers/{id}/clipboard` — Read the desktop clipboard (role: member) - `PUT /computers/{id}/clipboard` — Set the desktop clipboard (role: member) ### Retained results Explicit immutable output prefixes, independent of volatile execution handles. Reference: `https://app.mandala.computer/docs/api/retained-results` - `POST /computers/{id}/executions/{executionId}/retained-output` — Capture a retained output prefix (role: member) - `GET /computers/{id}/results/{resultId}` — Read retained result metadata (role: member) - `GET /computers/{id}/results` — List retained results and quota usage (role: member) - `GET /computers/{id}/artifacts` — List retained artifacts and quota usage (role: member) - `POST /computers/{id}/artifacts` — Publish a nominated immutable artifact (role: member) - `GET /computers/{id}/artifacts/{artifactId}` — Read immutable artifact metadata (role: member) - `GET /computers/{id}/artifacts/{artifactId}/download` — Download immutable artifact bytes (role: member) - `DELETE /computers/{id}/artifacts/{artifactId}` — Delete an immutable artifact (role: member) - `GET /computers/{id}/results/{resultId}/output` — Read an independent retained byte range (role: member) - `DELETE /computers/{id}/results/{resultId}` — Delete a retained result (role: member) ### Platform signals Passive, ephemeral daemon observations with bounded replay. Reference: `https://app.mandala.computer/docs/api/platform-signals` - `GET /computers/{id}/signals` — Read passive platform signals (role: member) ### Activities Safe retained summaries of selected API actions. Reference: `https://app.mandala.computer/docs/api/activities` - `GET /computers/{id}/activities` — Read API activity history (role: member) - `GET /computers/{id}/activities/{activity}` — Read one API activity (role: member) - `GET /computers/{id}/activities/{activity}/results` — Read passive activity result links (role: member) ### Agents One call that drives a computer until the task is done, the threads that continue it, and runs in the background. Reference: `https://app.mandala.computer/docs/api/agents` - `POST /computers/{id}/agent` — Run an agent loop (role: member) - `POST /chat/completions` — Drive a computer through an OpenAI-shaped endpoint (role: member) - `GET /agent/threads` — List agent threads (role: member) - `GET /agent/threads/{thread}` — Read an agent thread (role: member) - `DELETE /agent/threads/{thread}` — Delete an agent thread (role: member) - `POST /computers/{id}/agent/runs` — Start an agent run in the background (role: member) - `GET /agent/runs` — List agent runs (role: member) - `GET /agent/runs/{run}` — Read an agent run (role: member) - `POST /agent/runs/{run}/cancel` — Cancel an agent run (role: member) ### Files Moving files in and out of the guest. Reference: `https://app.mandala.computer/docs/api/files` - `PUT /computers/{id}/files` — Upload a file (role: member) - `GET /computers/{id}/files` — Download a file (role: member) - `GET /computers/{id}/files/list` — List a guest directory (role: member) - `PUT /computers/{id}/files/uploads` — Upload a resumable file chunk (role: member) - `GET /computers/{id}/files/uploads` — Read resumable upload status (role: member) - `DELETE /computers/{id}/files/uploads` — Remove resumable upload staging (role: member) ### Snapshots Capturing a computer, and building from a capture. Reference: `https://app.mandala.computer/docs/api/snapshots` - `GET /snapshots` — List snapshots (role: viewer) - `GET /computers/{id}/snapshots` — Get what a computer holds (role: viewer) - `POST /computers/{id}/snapshots` — Take a snapshot (role: member) - `POST /snapshots/{id}/restore` — Restore a snapshot (role: member) - `POST /snapshots/{id}/clone` — Clone a snapshot into a new computer (role: member) - `DELETE /snapshots/{id}` — Delete a snapshot (role: member) ### Schedules Automatic snapshots: when they are taken, and how long they are kept. Reference: `https://app.mandala.computer/docs/api/schedules` - `GET /computers/{id}/schedule` — Get the snapshot schedule (role: viewer) - `PUT /computers/{id}/schedule` — Set the snapshot schedule (role: member) - `DELETE /computers/{id}/schedule` — Remove the snapshot schedule (role: member) - `GET /retention` — Read snapshot retention (role: viewer) ### Usage What the account has used, and how much of it has settled for billing. Reference: `https://app.mandala.computer/docs/api/usage` - `GET /usage` — Read usage (role: viewer) - `GET /credits` — Read AI credits (role: viewer) ### Webhooks Being told when something happens, instead of asking. Deliveries are signed with the Standard Webhooks headers (webhook-id, webhook-timestamp, webhook-signature); acknowledge with a 2xx within 10 seconds. Reference: `https://app.mandala.computer/docs/api/webhooks` - `GET /webhooks` — List webhooks (role: viewer) - `POST /webhooks` — Create a webhook (role: member) - `GET /webhooks/{id}` — Read a webhook (role: viewer) - `PATCH /webhooks/{id}` — Update a webhook (role: member) - `DELETE /webhooks/{id}` — Delete a webhook (role: member) - `POST /webhooks/{id}/rotate` — Rotate a webhook secret (role: member) - `POST /webhooks/{id}/test` — Send a test delivery (role: member) - `GET /webhooks/{id}/deliveries` — List deliveries (role: viewer) ### SSH Your SSH keys, and which computers accept them. Reference: `https://app.mandala.computer/docs/api/ssh` - `GET /ssh-keys` — List your SSH keys (role: viewer) - `POST /ssh-keys` — Add an SSH key (role: member) - `POST /ssh-keys/challenge` — Get a challenge to prove an SSH key is yours (role: member) - `DELETE /ssh-keys/{id}` — Remove an SSH key (role: member) - `GET /computers/{id}/ssh` — Read a computer’s SSH setting (role: viewer) - `PUT /computers/{id}/ssh` — Switch SSH on or off (role: member) ### Public URLs A port inside a computer, served on its own HTTPS address. A deployment can switch the feature off, for every account or for all but some: making or changing one is then a 404 with code PUBLIC_URLS_DISABLED, while listing (enabled: false) and deleting still work. Reference: `https://app.mandala.computer/docs/api/public-urls` - `GET /computers/{id}/public-urls` — List a computer’s public URLs (role: viewer) - `POST /computers/{id}/public-urls` — Make a public URL for a port on the computer (role: member) - `PATCH /computers/{id}/public-urls/{urlId}` — Point a public URL at another port (role: member) - `DELETE /computers/{id}/public-urls/{urlId}` — Remove a public URL (role: member) ### Secrets Credentials the account stores once and binds to computers. Values go in and never come out. Reference: `https://app.mandala.computer/docs/api/secrets` - `GET /computers/{id}/credential-gateway` — List credential gateway bindings (role: member) - `POST /computers/{id}/credential-gateway` — Bind a credential to an upstream API (role: owner) - `DELETE /computers/{id}/credential-gateway/{binding}` — Revoke a credential gateway binding (role: owner) - `GET /secrets` — List secrets (role: member) - `POST /secrets` — Create a secret (role: owner) - `GET /secrets/{id}` — Read a secret (role: member) - `PUT /secrets/{id}` — Replace a secret’s value (role: owner) - `DELETE /secrets/{id}` — Delete a secret (role: owner) ### API keys Who a key is, and minting and revoking keys from a key the dashboard allowed to. Reference: `https://app.mandala.computer/docs/api/api-keys` - `GET /whoami` — Who am I (role: viewer) - `GET /api-keys` — List API keys (role: viewer) - `POST /api-keys` — Create an API key (role: member) - `DELETE /api-keys/{id}` — Revoke an API key (role: member) ### Operations One id to wait on for any lifecycle call, whether it finished before answering or runs on after. Reference: `https://app.mandala.computer/docs/api/operations` - `GET /operations` — List operations (role: viewer) - `GET /operations/{id}` — Get an operation (role: viewer) ### Workspaces The partitions of the account a key can be confined to, and the people who reach them. Reference: `https://app.mandala.computer/docs/api/workspaces` - `GET /workspaces` — List workspaces (role: viewer) - `POST /workspaces` — Create a workspace (role: owner) - `GET /workspaces/{id}` — Get a workspace (role: viewer) - `PATCH /workspaces/{id}` — Rename a workspace (role: owner) - `DELETE /workspaces/{id}` — Delete a workspace (role: owner) - `GET /workspaces/{id}/members` — List a workspace’s members (role: viewer) ## Errors A finite failure is JSON: `error` (a sentence for a person, or the documented OpenAI object, never to be matched on), `request_id`, and where the platform has them `reason` (one word to switch on) and `code` (a route-specific detail). `Error` under Types defines them. HEAD has no body. - `400` — The request was malformed — a bad resolution string, a missing `command`, a `{pid}` or `{window}` that is not one. It is also what a well-formed request gets when the thing it names cannot be acted on and never will be — a restore onto a computer that is gone, for instance. Either way it is final: the message says what is wrong, and sending it again unchanged answers the same. That is the whole difference from a `503`, which means ask again shortly. - `401` — Platform authentication required or refused: reason is missing, invalid, or revoked, with WWW-Authenticate: Bearer (invalid_token for invalid/revoked). - `402` — Your plan refused this: a quota, or a payment that has not gone through. On pay as you go it can be `code: INSUFFICIENT_BALANCE`, with `projected_micros` (the spendable balance) and `required_micros` (what starting this needs: a quarter of an hour of what it costs, and never less than $0.25): the balance is too low to start it. Add credits on the Billing page — sending it again unchanged answers the same until then. `code: PLAN_REQUIRED` means the account has no plan, or its trial has ended: choose a plan. On a trial, `code: TRIAL_LIMIT` means the trial does not allow this (a clone, a snapshot, another template or size, a proxy, a longer idle window), and `code: TRIAL_CREATES_USED` means its launches are spent; neither clears by sending it again. `code: STORAGE_OVER_PLAN` means the account moved to a plan that includes less storage, the notice period after that change has ended, and it still stores more than the plan includes (computer disks and template builds, or snapshots): it creates, clones, starts, restarts, restores and resumes no computer until what it stores fits. Nothing is deleted for it; delete computers or snapshots it no longer needs, or choose a larger plan. Sending it again answers the same until then. On an agent run it can instead be `Insufficient AI credits` with `top_up_url` (a run funded by the account’s AI credits), or the model provider’s own billing refusal of your `X-Model-Key`, relayed. - `403` — The credential is recognized but its holder lacks the required role or membership, or the holder/account is suspended, or the holder has not verified their email address. An ordinary denial for too low a role may carry no `reason`. The email one carries none either, and its message begins `Verify your email before`: it answers a create, a clone of a computer or a snapshot, a new API key and a new SSH key, and is cleared by verifying the address in the dashboard. A key also gets a `403`, with no `reason`, for a call its own terms rule out: an account-level route on a key confined to a workspace, a route outside a key limited to specific computers, or a grant that would outlive an expiring key. The message says which, and a key without that restriction is the fix. `reason: "revoked"` marks authority that is gone: a suspended account or a lost membership (refused as the request arrives, or if it happens while the request is in flight), or a role that was lowered while the request was in flight. The message identifies the refusal; replacing a valid key alone does not restore authority, and sending the same call again does not help. `code: "MACOS_LICENCE_REQUIRED"` means the computer runs macOS and the account has not accepted Apple’s macOS licence: it answers a start, a restart and a snapshot restore of a macOS computer, and a call that would resume a suspended one. An owner of the account accepts the licence on the Billing page; sending it again does not help until then. - `404` — No such resource in your scope — a computer, snapshot, secret, webhook, SSH key, API key, workspace, operation and so on — or no such endpoint; a confirmed missing guest file is no such file in the guest. - `405` — This public path exists but does not accept that method. Allow lists only its public methods, with HEAD for GET and metadata OPTIONS. - `409` — Refused for the state something is in — resizing a computer that is running, running a command on one that is stopped, taking a snapshot while another capture of it is running. WHETHER RETRYING HELPS IS IN THE BODY, NOT THE STATUS, and this is the one thing to take from this entry. Some of these describe a state that is passing: a guest agent still inside its boot window, a guest agent busy with another call, a move already running on the account. Those clear on their own and the same request works a moment later. The rest describe a DECISION about the request you sent — the size does not fit, the computer is the wrong one for this, the saved session cannot travel — and no amount of retrying turns one of those into a yes. A client that treats 409 as uniformly transient loops forever on half of them. Where the platform can say which it is, it sends `reason` beside `error` — one word, meant to be switched on rather than read: `contention` and `starting` clear on their own, `unavailable` means the computer is not running and only starting it helps, `running` means the computer is running and only stopping it helps (a resize), `unsupported` means waiting will not change the answer — this computer cannot do it at all, or it needs another step first, which the message names (a stop, or removing its secret bindings, for example) — `exists` means a create-only upload found its path taken (or, on `POST /templates`, the ref is already spoken for), `name_taken` means a secret of that name is already in that scope, `stale_revision` means a secret changed since the `revision_id` you sent was read (or a computer’s bound list since the `version` you sent), and `stale_capture` means the screenshot capture you named is no longer held: a newer one replaced it, or its host’s daemon restarted or the computer moved. `starting` covers the two minutes after a start or a restart, and after a reboot from inside the guest on a computer last cold-started recently enough to report one (a stop and a start gives an older one that); a guest agent that is still silent after that is a `502`. Match on that and never on the sentence, which is prose and is rewritten. **Absent means no classification was given** — treat it, and any word you do not recognise, as no answer, because not every refusal here has one yet. It is what the guest routes answer: the clipboard on a stopped computer used to be a 409 indistinguishable from a clipboard whose selection was claimed for an instant, and a blanket retry loop spun against the first until its deadline. Every 409 that clears on its own carries `contention` or `starting`: a host busy with another build or with no room for one, an operation already running on the same computer or snapshot (a capture, a copy, a delete, a restore or clone reading it, another agent run), a lock another request holds, a move or a delivery settling. So a 409 with no word, or with any other word, is not one that waiting fixes: read the sentence for the step it names. One exception clears by itself all the same: a trial’s `code: TRIAL_CREATE_PENDING`, with no word, clears when its computer finishes being created. It has no word on purpose. Wait for that computer, because creating again afterwards makes a second one. The ones worth knowing by name, because each has a next step that is not "wait": A resize past what the computer’s host can run carries `move`, an object rather than a message: `{"required":true,"possible":true}` means another host in this region could run it and the computer has to be moved there first — `POST /computers/{id}/move` with the same sizing fields is how you agree to that, and it is a separate call because relocating a computer is not something a resize should do to you quietly. `possible:false` means nowhere in the region can, and the size is the thing to change. The move itself then refuses for the things it re-decides at the moment it runs, and only one of those is worth waiting on: a computer that is running or suspended has to be stopped or resumed-and-stopped by you, a size that fits where it already is wants an ordinary resize instead, and a region with nowhere to put it wants a smaller size. `Another computer on this account is being moved right now` is the one that clears by itself, and it carries `reason: "contention"` — one move runs per account, and `GET /moves` says which. And the terminal socket refuses twice over: `reason: "unavailable"` with `resume_required: true` on a suspended computer, which clears when you start it and not before, and `reason: "unsupported"` on a running computer whose hardware carries no terminal channel — one last started before interactive terminals existed — which needs a stop and a start. Not a restart, which resets the same machine, and not a retry, which never comes good. - `413` — What you sent, or asked for, is past a size limit. A JSON request body is capped at 1 MiB unless the route states its own limit: `POST /computers/{id}/exec` takes up to 4 MiB, and some routes take less; guest file transfers, template documents and the clipboard have limits of their own. The message names the limit that applied. - `416` — Your `Range` named no byte the file has. The `Content-Range` on the refusal carries the file’s actual length, so you can ask again without guessing. - `422` — The `Idempotency-Key` on this request was used within its 24 hours with a different request (`code: "idempotency_key_reused"`). Nothing was done: a key stands for one request, so send this one under a new key. - `429` — You are asking faster than your plan allows. `Retry-After` says how many seconds to wait, and every metered response — anything past authentication and the re-check that your credential’s authority still holds — carries `RateLimit-Remaining`, so you do not have to be refused to find out. A `401`, a `403` from that re-check, an `OPTIONS` answer and an unexpected `500` carry none. The budget is spent in proportion to what a call costs rather than per request. What a call costs, in budget units, by kind (each operation’s exact figure is its `x-rate-cost` in the OpenAPI document): 1 to read one thing; 5 for a listing that spans the fleet, and 5 for a call into a running guest such as a screenshot or an exec; 10 for a power change and 10 to move file bytes; 25 for `GET /usage`, `GET /credits`, creating a public URL, and creating, rotating or testing a webhook; 50 to capture a snapshot; 100 to create, clone or restore a computer, and 100 to start an agent run, whose actions are then charged as they happen. The account-wide budget, as what an idle caller may spend at once and what refills each minute: No plan 1200 at once and 1200 a minute; Trial 3000 at once and 3000 a minute; Solo 4800 at once and 4800 a minute; Studio 12000 at once and 12000 a minute; Swarm 21600 at once and 21600 a minute; Pay as you go 7200 at once and 7200 a minute. A single API key gets half of either. A `401` for a missing or unusable credential costs nothing: it is refused before anything is metered. A few refusals at the door cost one unit: a `403` because the role is too low or the route refuses an API key confined to a workspace, a `403` or `404` from a key’s expiry or computer limit, a `404` for a path that matches nothing, a `405`, and an `Idempotency-Key` answered from its stored result or still in progress. Everything else is charged in full when it is admitted, before it is carried out, so a refusal after that has spent the whole cost: a `400`, `402` or `409` from the route, a `403` its handler sends (on most routes, a suspended account included), and a model provider’s `401` on an agent run. The budget belongs to the account and is shared across everything on it, and any single API key may spend at most half of it. `RateLimit-Limit` is whichever of those two is binding on the request that carried it — usually the per-key half, and the account-wide figure when other keys have already spent more of it than this one has. All three `RateLimit-*` headers describe the same one, so `limit` minus `remaining` is what has been spent against it. A few `429`s are not about this budget, say so in their message, and can carry no `Retry-After`: a model provider’s rate limit relayed on an agent run. The cap on forks of one snapshot waiting for their secrets sends its own bounded expiry-based `Retry-After` with `reason: "contention"` (see `POST /snapshots/{id}/clone`). - `500` — The application could not finish this: an unexpected exception, a build that broke, or a storage fault. Application refusals carry the request correlation ID; unexpected internal details are not returned. - `501` — This feature is not available: no hypervisor in the fleet can build a template, or the platform or the host holding this computer does not offer it. Unlike a `409`, this does not clear on its own — retrying will not help, so treat it as an outage of the feature rather than of the moment. - `502` — The agent inside the guest is not answering, or it rejected or malformed the private command protocol for this feature. The computer is up; the upstream agent interaction failed. This is not malformed caller input and carries no retry classification. - `503` — Something this depends on — a hypervisor, a store, or a host’s capacity — could not answer or take this right now. A read can be retried shortly. A change answered `503` may or may not have happened — a failure after the request was sent is answered the same way, with or without a warning in the message — so read the current state before retrying anything that is not safe to repeat, such as a create or a command. On the collection reads, `allow_partial=1` accepts a knowingly short answer instead. On a trial, `code: TRIAL_FULL` (with `Retry-After`) means every trial slot is taken and `code: TRIAL_UNAVAILABLE` means trials are paused; neither sent anything, but a trial whose hour has started keeps its hour running. On an account whose storage notice period has ended (`code: STORAGE_OVER_PLAN` under `402`), a create, clone, start, restart, restore or resume of a computer is refused with `503` when what the account stores cannot be counted just then: the message begins “This account's storage cannot be counted right now”, with no `code` and no `Retry-After`. Nothing was done; send it again shortly. - `504` — The operation did not finish before its deadline — a window action the guest accepted but did not report on, or an artifact read or delete. It may already have happened, so this is an uncertain outcome rather than permission to repeat it: check before sending it again. ## Guides - [Claude computer use](https://app.mandala.computer/docs/guides/anthropic-computer-use): Drive a Mandala desktop or browser with Claude's toolsets, in Python and TypeScript. - [OpenAI computer use](https://app.mandala.computer/docs/guides/openai-computer-use): Drive a Mandala computer with the computer tool in OpenAI's Responses API. - [Gemini computer use](https://app.mandala.computer/docs/guides/gemini-computer-use): Drive a Mandala computer with Gemini's computer use tool in its desktop environment. - [LangChain agents](https://app.mandala.computer/docs/guides/langchain): Give a LangChain agent a Mandala computer as a set of tools. - [OpenAI Agents SDK sandbox](https://app.mandala.computer/docs/guides/openai-agents-sandbox): Run an OpenAI Agents SDK SandboxAgent's shell and file tools on a Mandala computer, with one computer per run. - [Hermes Agent](https://app.mandala.computer/docs/guides/hermes): Run NousResearch's Hermes Agent on a Mandala computer from the hermes template, with your model key bound as a secret, and drive it by API. - [OpenClaw](https://app.mandala.computer/docs/guides/openclaw): Run OpenClaw on a Mandala computer from the openclaw template, set it up with your model key bound as a secret, and drive it by API. - [Claude Managed Agents worker](https://app.mandala.computer/docs/guides/claude-managed-agents): Run a self-hosted sandbox for Anthropic's Claude Managed Agents on a Mandala computer, from the managed-agents template, with the environment key bound as a secret. - [Run your agent next to a computer](https://app.mandala.computer/docs/guides/hosting-your-agent): Host the agent process on Fly.io, DigitalOcean or Hetzner Cloud, pass it your Mandala API key as a platform secret, and clean up its computers. - [Moving from Orgo or E2B](https://app.mandala.computer/docs/guides/migrate-from-orgo-e2b): Map Orgo and E2B Desktop code to the Mandala SDK, and what behaves differently. - [Troubleshooting](https://app.mandala.computer/docs/guides/troubleshooting): Common failures when creating and driving Mandala computers, what causes them, and the fix. - [Agent skill (SKILL.md)](https://app.mandala.computer/skill.md): Instructions an agent can load to use Mandala computers well.