Envelope
Every error response is JSON with anerror object:
code— stable, machine-readable. Branch on this.message— human-readable; do not parse.issues— present on validation errors; a Zodflatten()withfieldErrors/formErrors.
The API’s validation library was upgraded to Zod v4. The default validator
text inside
message and issues was reworded as part of that upgrade —
code and the issues shape are unchanged. Always branch on code, never
on message text.Codes
Retry semantics
- Never retry 4xx except where noted — the request will fail again unchanged. Fix the input.
- Retry 503 / 5xx with exponential backoff (e.g. 1s → 2s → 4s → 8s → 16s, cap ~30s, ~5 attempts).
- For render submission, pair retries with an
Idempotency-Keyso a retried submit never produces a duplicate document.