Limits and errors
Each API key has a limit of requests a minute and model calls a day, and your keys share one more a day. Over one, the API answers 429 with Retry-After: the seconds to wait.
Every error has the same shape, { "error": { "code", "message" } }. The message names the field that failed, never a value you sent.
Limits per key
| Limit | Default | Over it |
|---|---|---|
| Requests per API key a minute (UTC) | 60 | 429 rate_limited, Retry-After to the next minute |
| Model calls per API key a day (UTC) | 2,000 | 429 daily_limit, Retry-After to midnight UTC |
| Model calls for all your API keys a day (UTC) | 2,000 | 429 daily_limit, Retry-After to midnight UTC |
A model call is one call Letra makes to write or read for your request; one request can make several. A request that started under the day's limit finishes. A refused request is refused before Letra reads its body, so it costs nothing.
A higher limit for your product is a change on Letra's side, not a new key: ask us.
Handle 429 and Retry-After
HTTP/1.1 429 Too Many RequestsRetry-After: 37{ "error": { "code": "rate_limited", "message": "This API key sent too many requests this minute. Wait the seconds in Retry-After and send it again." } }Read
Retry-After: whole seconds, to the next minute forrate_limited, to midnight UTC fordaily_limit.Wait that long, then send the same request again. Don't retry sooner: it is refused again.
For
daily_limit, fall back to your own path until midnight UTC, or ask for a higher limit.
Every error code
| Status | Code | What to do |
|---|---|---|
| 400 | invalid_request | The body doesn't match. The message names the first field that failed. Fix it and send it again. |
| 400 | invalid_json | The body isn't JSON. Send Content-Type: application/json and a JSON body. |
| 400 | image_refused | Letra won't fetch that image address. Send an https address on port 443, or the image inline. |
| 401 | unauthorized | No key, a malformed key, or an unknown or revoked one. Check the Authorization: Bearer header. |
| 403 | plan_required | This voice's plan doesn't include writing in it. No plan answers it today. |
| 403 | pairing_unavailable | Moving a voice into a Letra ID isn't open yet. Keep writing in the voice as it is, and offer the move again later. |
| 403 | voice_stays_in_letra | A Letra ID's voice stays in Letra. Write in it with POST /v1/write or POST /v1/rewrite. |
| 404 | voice_not_found | No voice of yours has that id or ref. Store it with POST /v1/voices first. |
| 409 | voice_claimed | The voice moved into its person's Letra ID. Keep writing in it by the same reference; it can't be read, built or changed through your key. |
| 422 | claim_refused | That voice can't be claimed: it isn't a person's voice, it is another person's, or your account doesn't run on Letra's own model yet. The message says which. |
| 409 | voice_unchanged | Nothing was added to the voice since the last preview. Add to it, then ask again. |
| 409, 422 | nothing_to_read | There is nothing to read yet: the voice holds no samples, or the call sent too little. The message says what to add. |
| 413 | too_large | The body is over 1 MB (4 MB on POST /v1/write, for images, and for an archive upload). Send less in one call. |
| 422 | archive_unreadable | Letra found no posts in the file. The message says what to send instead. |
| 422 | image_unreadable | Letra couldn't reach or read the image. Check the address, or send it inline. |
| 422 | website_refused | Letra won't read that address. The message says what to send instead. |
| 422 | website_unreadable | Letra couldn't read the page. Send a few pieces of writing instead. |
| 429 | rate_limited | The key sent more requests this minute than its limit. Wait the seconds in Retry-After, then send it again. |
| 429 | daily_limit | The key, or all your keys together, made today's model calls (UTC). Wait the seconds in Retry-After, or ask for a higher limit. |
| 429 | preview_limit | The plan's preview runs are used. |
| 429 | write_limit | The Letra ID's Letra writes for this month are used. They start again on the 1st (UTC) on Free, and on the day the plan renews each month on Plus. |
| 500 | internal | Something failed on Letra's side. Send it again. |
| 503 | not_configured | Letra can't answer right now. Retry, or fall back to your own path. |
| 503 | model_not_configured | Letra can't write right now. Retry, or fall back to your own path. Nothing was counted. |
| 503 | model_unavailable | Letra couldn't write this time. Retry, or fall back to your own path. Nothing was counted. |
| 503 | unavailable | Letra can't answer right now. Retry, or fall back to your own path. |
Retry a 503 with a short backoff, or fall back to your own path: Letra writes only with its own model, so a 503 from a write counted nothing. Don't retry a 400, 401, 403, 404 or 413 unchanged: fix what the message names.
On the Letra MCP
The MCP answers in the chat instead of with a status. Over a key's limit, or past the month's Letra writes, the tool says so and when to try again, and nothing runs. Limits per personal key.