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>`." }
| Status | code | Meaning |
|---|---|---|
| 401 | invalid_api_key | The key is missing, malformed, unknown or revoked. |
| 404 | not_found | No such path. |
| 409 | idempotency_key_reused | The Idempotency-Key was sent before with a different body. |
| 422 | validation_error | The body or a header did not parse. errors lists each problem with its location. |
| 500 | internal_error | An 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.