/v1/chat/completions and /v1/responses, Anthropic shape on /v1/messages.
OpenAI shape
Anthropic shape
Anthropic streaming error frame
When a stream fails mid-flight, the server emits anevent: error SSE frame:
Status codes
| Status | Cause | Fix |
|---|---|---|
400 | Invalid request body, unsupported model, mixed tools + web_search_options | Check request shape |
401 | Missing or invalid API key | Send Authorization: Bearer $ABLIT_KEY |
402 | Insufficient credits | Top up in the console |
403 | Key lacks permission for this project | Scope check in the console |
422 | Upstream model rejected the payload | Often a malformed multi-turn replay — see known limitations |
429 | Rate limited | Back off, honor Retry-After. See rate limits |
5xx | Upstream failure | Retry with exponential backoff |
Policy-blocked requests
On/policy/* endpoints, a policy decision rides alongside the normal response. When enforcement_action: block fires in enforced mode, the status is 4xx and the body includes the upstream-shape error plus a policy object describing the decision. When the action is rewrite or summarize (decision rewrite / summary), the status stays 200 but the content is modified. See policy endpoints and streaming policy metadata.