Errors

Errors are RFC 9457 application/problem+json bodies with a stable code. Act on the code, not on the status text. Each endpoint in the reference lists the codes it can return; a 422 request_invalid is a request that doesn't match the schema, with each failing field and its reason in errors.

HTTP/1.1 402 Payment Required
Content-Type: application/problem+json

{"type": "about:blank", "title": "Payment Required", "status": 402, "code": "insufficient_credits"}

A refused call charges nothing. To retry a start safely after a network error, send it again with the same Idempotency-Key.