All models, capabilities, and prices

Error codes

What every status code means and what to do about it.

Error shape

All errors return JSON of the form:

json
{
  "type": "error",
  "error": {
    "type": "billing_error",
    "code": "insufficient_quota",
    "message": "Solde insuffisant : rechargez votre clé sur https://api-ai.app/pricing — Insufficient balance: top up your key at https://api-ai.app/pricing"
  }
}

Status codes

Reference data
Codeerror.typeWhat it meansWhat to do
401authentication_errorThe API key was copied with wrapping quotes or smart quotes.Remove all quotes and pass the raw mdf-… value. See Authentication for the correct header format.
402billing_errorInsufficient balance — the key has no remaining credit.Do not retry. Top up the existing API-AI key, then send the request again.
403permission_deniedThe request was refused for this key.Contact support at admin@minedom-france.fr.
404not_found_errorUnknown route or endpoint path.Check the endpoint path.
429rate_limit_errorToo many requests: the rate allowed for this key has been exceeded.Wait for the time given by the Retry-After header, then retry with your requests spaced out.
500api_errorReserved. The gateway does not currently emit 500 — internal errors surface as 502 / 503 / 504.If you ever see one, retry with backoff (500ms / 1s / 2s) and report it.
502upstream_errorUpstream returned 5xx, often around tool_choice corner cases.Our shim already retries 2× — if you see this client-side, retry once.
503overloaded_errorUpstream capacity is temporarily saturated (“no available accounts”).Retry with backoff; this is a temporary upstream capacity signal.
504timeout_errorUpstream did not produce headers within 120s.Switch to streaming for long non-stream calls — see /docs/guides/streaming.

Retry strategy

  • 5xx. Exponential backoff: 500ms · 1s · 2s. Stop after three attempts.
  • 402 — Insufficient balance. Retrying will not help; top up the existing API-AI key first.
  • 504 on a long non-stream request. Enable stream: true so the first event arrives before the header timeout.
Last updated: October 2, 2026Found a bug? admin@minedom-france.fr