/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
GET /v1/credits can return 503 credit_balance_unavailable. Honor
Retry-After before retrying.
Policy errors
An enforcing policy match returns403 policy_violation. Retrying the same
input with the same policy configuration will produce the same result.
503 policy_evaluation_unavailable:
- Chat Completions emits an OpenAI error data frame and omits
[DONE]. - Responses emits
response.failedand omitsresponse.completed. - Messages emits
event: errorand omitsmessage_stop.
Policy billing
- Requests blocked before model generation are not billed.
- Generated responses withheld by a confirmed response-policy match are billed.
- Responses withheld because a Block policy could not be evaluated are not billed.
- Responses delivered after a Monitor policy evaluation failure are billed normally.