Errors

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

400 Bad Request
{
  "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.

HTTPCodeMeaning
400invalid_requestA parameter is missing, unknown or out of range. The message names it.
400invalid_imageThe file is not a JPEG, PNG or WebP image, is over 40 megapixels, or an upload_id is not valid.
400image_too_largeThe image is larger than 12 MB.
400image_unreachableimage_url could not be downloaded: not https, a private address, too many redirects, a timeout or a non-200 answer.
401invalid_api_keyNo key, an unknown key or a revoked key.
402insufficient_creditsNot enough API credits for this request. Studio credits do not count.
403api_not_enabledLive keys need an API pack. Test keys work without one.
403account_suspendedThe account is suspended.
403key_suspendedThis key is suspended.
404not_foundUnknown endpoint, or no such job for this account and key mode.
409idempotency_conflictThe Idempotency-Key was already used for a different request: another endpoint, body or file.
409idempotency_in_progressA request with the same Idempotency-Key is still running. Retry after Retry-After seconds to get its job.
413image_too_largeThe body exceeds 40 MiB, a new image exceeds 12 MiB, or new image data exceeds 36 MiB in total.
429rate_limitedToo many requests this minute for this key. Wait for Retry-After seconds.
429concurrency_limitedToo many images rendering at once for this account. Wait for Retry-After seconds.
429overloadedGarmo is under heavy load. Wait for Retry-After seconds.
500internal_errorSomething went wrong on our side.
503unavailableThe 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.