> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tashvi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors and limits

> Every Tashvi API error code (401 bad or expired key, 402 insufficient_balance and key_spend_cap_reached, 403 scope and email checks, 503 key check unavailable, and tool errors like too_many_calls and took_too_long), plus the real limits: 8 calls at once, one CAD build at a time, and per-tool time limits.

Tashvi answers a problem in one of three places. Branch on `code`, wherever it arrives.

* **HTTP errors** are about the key, the account or the request itself. The body is JSON with `error` (a sentence) and `code`.
* **Tool errors** come back as a normal `200` JSON-RPC result with `isError: true`. `structuredContent` has `error`, `code`, and sometimes `detail`. `error` is written for a person, so you can show it as it is.
* **JSON-RPC errors** are about the message: a method or a tool that doesn't exist, or arguments that aren't an object.

## HTTP errors

| Status | `code` | What it means | What to do |
| - | - | - | - |
| `401` | `unauthorized` | No key, or the key is wrong, expired or revoked | Check `TASHVI_API_KEY`. Make a new key at [console.tashvi.ai/keys](https://console.tashvi.ai/keys) |
| `402` | `insufficient_balance` | Your balance can't cover this call. Nothing was charged. The body has `balance_usd` and `top_up_url` | Ask the person to top up at `top_up_url`. Don't retry until they have |
| `402` | `key_spend_cap_reached` | This key has reached its monthly cap. The body has `cap_usd`, `spent_usd` and `resets_at` | Wait until `resets_at`, or ask the person to raise the cap in the console |
| `403` | `scope_not_allowed` | The key's scopes don't cover this request | Make a key with the scope you need. See [Scopes](https://docs.tashvi.ai/api/authentication.md#scopes) |
| `403` | `email_unverified` | The account's email address isn't verified yet | Verify it, then try again |
| `403` | `api_key_not_allowed` | A key may never do this: billing, keys, account changes, and the other actions in [What a key can never do](https://docs.tashvi.ai/api/authentication.md#what-a-key-can-never-do) | A person has to do it, signed in |
| `403` | `api_key_scope` | The key was sent to one of Tashvi's internal routes instead of the MCP endpoint | Call `https://mcp.tashvi.ai/mcp` |
| `403` | `account_suspended` | The account is suspended | Contact [hello@tashvi.ai](mailto:hello@tashvi.ai) |
| `403` | `origin_not_allowed` | The request came from a web page | Call the API from a server or an app, never from a browser |
| `404` | | The API isn't open for this account yet | Contact [hello@tashvi.ai](mailto:hello@tashvi.ai) |
| `503` | `api_key_store_unavailable` | Tashvi couldn't check the key just now | Retry after a few seconds, with backoff. Your key is fine |
| `400` | | The body isn't JSON, or it's a JSON-RPC batch | Send one JSON-RPC message per request |
| `405` | | A `GET` to the endpoint | Send `POST` |
| `413` | | The request is over 40 MB | Send less |

A `401` also carries a `WWW-Authenticate: Bearer realm="tashvi"` header, which is what starts sign-in in apps that support it.

## Tool errors

These come back inside the result, with `isError: true`.

| `code` | What it means | What to do |
| - | - | - |
| `too_many_calls` | 8 calls are already running for this account | Wait for one to finish, then try again |
| `took_too_long` | The call ran past its time limit. The work may still have been made, and charged | Check with `tashvi_library` before trying again. For a design, try one option instead of four |
| `invalid_arguments` | An argument is missing or wrong. `error` says which | Fix the arguments |
| `design_not_found` | That `designId` isn't one of this account's designs | Look it up with `tashvi_library` (`what: "designs"`) |
| `design_has_no_picture` | The design is a film, or has no picture | Pick another design |
| `designs_unavailable` | The design store couldn't answer | Retry shortly |
| `film_not_found` | That `videoRequestId` isn't this account's | Check the id |
| `video_failed` | The film couldn't be made. Nothing was charged | Try again, perhaps with a different camera brief |
| `draft_not_found`, `build_not_found` | That `buildId` isn't this account's | Check the id |
| `edit_running` | A CAD build is already running for this account. `detail.buildId` names it | Wait for it with `tashvi_3d` and that `buildId` |
| `build_busy` | That build is still working on an earlier request | Call again with only its `buildId` to wait |
| `build_not_ready` | That build has no saved model yet, so nothing can be changed | Wait for it first |
| `rate_limited` | Too many calls of one kind in a short time, such as 3D drafts. `detail` may give `retryAfterSeconds` | Wait, then try again |
| `upgrade_required`, `PAID_SUBSCRIPTION_REQUIRED`, `assistant_paid_plan_required` | The account's plan doesn't include this. The result has a `billingUrl` | Tell the person and give them the link. See [plan requirements](https://docs.tashvi.ai/api/pricing.md#plan-requirements) |

A CAD build that runs out of balance partway doesn't fail: it pauses with its best version saved.

## JSON-RPC errors

| `error.code` | Meaning |
| - | - |
| `-32700` | The body isn't valid JSON |
| `-32600` | Not a JSON-RPC 2.0 request, or a batch |
| `-32601` | No such method |
| `-32602` | Bad params, including `Unknown tool`: a tool that doesn't exist or that the key's scopes don't list |
| `-32603` | Internal error |

## Limits

| Limit | Value |
| - | - |
| Calls running at once | Up to 8 per account. More answer `too_many_calls` |
| CAD builds | One at a time per account |
| 3D drafts | About 12 a minute and 300 a day |
| Active API keys | 10 per account |
| Request size | 40 MB |
| A key revoked in the console | Stops within about 10 seconds |

Each tool has a time limit for one call. It's set to end before an AI app gives up waiting (Claude gives up at about 240 seconds), so a result is never lost.

| Tool | Time limit |
| - | - |
| `tashvi_design`, `tashvi_video`, `tashvi_3d` | 225 seconds. Films and 3D jobs hand back an id when they need longer |
| `tashvi_one_change` | 220 seconds |
| `tashvi_ask` | 150 seconds |
| `tashvi_one_ask` | 70 seconds |
| `tashvi_library` | 60 seconds |

Set your client's tool timeout to at least 240 seconds, so it doesn't cut off a call Tashvi is still answering.

A few features also have short-window limits of their own: 3D drafts, searching Explore, and Tashvi One's assistant. A call over one of them answers `rate_limited`. Beyond those, your balance and your key's cap are what limit spending.

## Retrying

* **Safe to retry:** `503`, `too_many_calls`, `designs_unavailable`, `rate_limited` (after the wait), and any call that only waits (`videoRequestId` or `buildId` alone).
* **Check first:** `took_too_long`, a dropped connection, or any paid call whose answer you didn't get. The work may have been made and charged. Look with `tashvi_library`, or for Tashvi One with `tashvi_one_ask`, before you call again.
* **Don't retry:** `402`, `401`, `403`. They need a person.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.