LookAI

Errors

Errors return an HTTP status and a JSON body. A request that fails is never billed.

{
  "error": {
    "code": "card_required",
    "message": "This month's 10000 free words are used up. Add a card in the dashboard to keep going; usage is billed at the end of the month."
  }
}

Validation errors (422) use Laravel's format instead: {"message": "…", "errors": {"field": ["…"]}}.

StatusCodeWhat to do
401invalid_api_keyThe key is missing, wrong or revoked.
402card_requiredThis month's free words are used up. Add a card in the dashboard.
402payment_failedYour last invoice could not be charged. Replace the card in the dashboard.
402monthly_limit_reachedThis request would pass your monthly word limit. Ask us to raise it.
422invalid_textFewer than 30 words, or a file that cannot be read.
422text_too_longMore than 15,000 words. Split the text.
429rate_limitedMore than 60 requests a minute on one key. Wait for the seconds in Retry-After.
502analysis_failedThe analysis failed on our side. Retry.
504timeoutThe analysis took too long. Retry after a few seconds.