Skip to main content

Errors

Every refusal has the same JSON body: a stable code to branch on and an English detail for your logs.

{ "code": "invalid_api_key", "detail": "Send a valid API key as `Authorization: Bearer <key>`." }
StatuscodeMeaning
401invalid_api_keyThe key is missing, malformed, unknown or revoked.
404not_foundNo such path.
409idempotency_key_reusedThe Idempotency-Key was sent before with a different body.
422validation_errorThe body or a header did not parse. errors lists each problem with its location.
500internal_errorAn error on our side. Retry later.

A 422 example:

{
"code": "validation_error",
"detail": "The request is not valid: body.name: Field required.",
"errors": [{ "type": "missing", "loc": ["body", "name"], "msg": "Field required", "input": {} }]
}

Rate limits​

A burst of requests from one address is slowed down at our edge. A refused request gets 429 or 503, and its body may not have the shape above. Wait a moment and retry. If the response has a Retry-After header, wait that many seconds.