Skip to main content

Envelope

Every error response is JSON with an error object:
  • code — stable, machine-readable. Branch on this.
  • message — human-readable; do not parse.
  • issues — present on validation errors; a Zod flatten() with fieldErrors/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-Key so a retried submit never produces a duplicate document.