LinguaChats.aiDocumentation

Errors

Errors follow the OpenAI error format, so SDK error handling works unchanged.

Error format

json
{
  "error": {
    "message": "You have run out of credits. Contact support to top up your account.",
    "type": "insufficient_quota",
    "code": "insufficient_quota"
  }
}

Error codes

StatusCodeMeaning
400invalid_request_errorThe request body is malformed — missing messages, invalid parameter values, or invalid JSON.
401invalid_api_keyThe API key is missing, malformed, revoked, or unknown.
403account_not_approvedYour account is not active yet. API access is enabled once your account is activated.
404model_not_foundThe requested model slug doesn't exist or isn't available yet.
429insufficient_quotaYour credit balance is exhausted. Request a top-up from your dashboard.
429rate_limit_exceededToo many requests on this API key (60 requests/minute). Check the x-ratelimit-* response headers and retry after a short wait.
429key_spend_cap_reachedThis key hit its monthly spend cap. Raise or remove the cap under Dashboard → API Keys.
502upstream_errorThe underlying model provider returned an error. Retry the request.