> Garmo API docs as Markdown. This page: https://garmo.studio/api/docs/errors/ · All docs in one file: https://garmo.studio/api/docs/llms-full.txt

# Errors

An error answers with an HTTP status and a body like this; code is stable, message is for people and may change:

```
{
  "error": {
    "code": "invalid_request",
    "message": "color_hex must be a color like \"#c8553d\".",
    "request_id": "req_XNnjm6TTkLMMNnVq"
  }
}
```

Every answer also has an X-Request-Id header. Quote it to support@garmo.studio.

- HTTP | Code | Meaning
- 400 | invalid_request | A parameter is missing, unknown or out of range. The message names it.
- 400 | invalid_image | The file is not a JPEG, PNG or WebP image, is over 40 megapixels, or an upload_id is not valid.
- 400 | image_too_large | The image is larger than 12 MB.
- 400 | image_unreachable | image_url could not be downloaded: not https, a private address, too many redirects, a timeout or a non-200 answer.
- 401 | invalid_api_key | No key, an unknown key or a revoked key.
- 402 | insufficient_credits | Not enough API credits for this request. Studio credits do not count.
- 403 | api_not_enabled | Live keys need an API pack. Test keys work without one.
- 403 | account_suspended | The account is suspended.
- 403 | key_suspended | This key is suspended.
- 404 | not_found | Unknown endpoint, or no such job for this account and key mode.
- 409 | idempotency_conflict | The Idempotency-Key was already used for a different request: another endpoint, body or file.
- 409 | idempotency_in_progress | A request with the same Idempotency-Key is still running. Retry after Retry-After seconds to get its job.
- 413 | image_too_large | The body exceeds 40 MiB, a new image exceeds 12 MiB, or new image data exceeds 36 MiB in total.
- 429 | rate_limited | Too many requests this minute for this key. Wait for Retry-After seconds.
- 429 | concurrency_limited | Too many images rendering at once for this account. Wait for Retry-After seconds.
- 429 | overloaded | Garmo is under heavy load. Wait for Retry-After seconds.
- 500 | internal_error | Something went wrong on our side.
- 503 | unavailable | The API or image generation is paused for a moment. Nothing was charged.

## What to retry

- 429 and 503: wait for the Retry-After header, then retry with the same Idempotency-Key.

- 500: retry once with the same Idempotency-Key; if it repeats, contact support with the request id.

- 4xx other than 429: fix the request; retrying the same one gives the same answer.
