Errors
Request-level failures return an HTTP status, a stable machine code, a safe message and a request id. An accepted AI rewrite instead carries its pending or terminal state in the operation response.
Shape
docs points at the anchor on this page that describes the code, so a failing response carries its own documentation. requestId is the same value as the X-Request-Id response header.
Codes
Recover before retrying
A lost network response does not prove failure. For AI rewriting, keep the same operationId and recover the operation by GET; never automatically create a fresh intention. A known failed or expired intention is not rerun. Rate limits (
rate_limited) and exhausted words/trials (quota_exceeded) are different conditions.