{"version":1,"codes":{"TIMEOUT":"Request or upstream provider timed out. Retry later. Response includes retry_after_seconds (~20).","CONTENT_FILTERED":"Output blocked by safety/content moderation. Rephrase the prompt.","RATE_LIMITED":"Too many requests. Wait and retry. Response includes retry_after_seconds (~10).","INVALID_INPUT":"Request parameters were rejected. Fix and resubmit.","SERVICE_ERROR":"Generic upstream service failure. Try a different model or contact support.","L402_INVALID_PARAMS":"Pre-payment validation failed. No invoice was created; no sats charged.","L402_UPSTREAM_FAILED":"Upstream provider failed after payment. Refund issued via LNURL-withdraw.","L402_REFUND_ISSUED":"Response payload includes a `refund` object with an LNURL-withdraw link.","L402_DEDUP_HIT":"Identical request was served from the dedup cache. No new payment required.","L402_AUTO_ROUTED":"Request was routed via model:'auto'. The chosen model id is in the X-Route-Model header.","L402_ESTIMATE_ONLY":"This response is a price estimate from /api/estimate-cost. No invoice was created.","L402_CALLBACK_INVALID":"callback_url was rejected. Must be public HTTPS (no loopback / private ranges). Polling still works.","BOOK_QUALITY_CHECK_FAILED":"Source EPUB chapters failed runtime sanity checks (empty, undecoded HTML entities, mojibake, parser overlap, or wrong language). Refund issued. Webhook payload includes `smoke_failures` with per-chapter detail.","OUTPUT_DURATION_INSANE":"Rendered audiobook reports an impossible duration (>24h) — usually mixed audio formats from upstream TTS providers corrupting the AAC metadata. Refund issued. Webhook payload includes `output_duration_seconds`."},"response_envelope":{"error":"string — human-readable message (provider names stripped)","error_code":"string — one of the keys in `codes` above","suggestion":"string — what the agent should do next","example":"string — concrete next-action example","retry_after_seconds":"number — present for TIMEOUT and RATE_LIMITED only; how long to back off before retrying","refund":"object — present when a post-payment failure triggered an LNURL-withdraw refund; contains lnurl_withdraw, refund_amount, refund_secret"},"docs_url":"https://sats4ai.com/docs#error-codes"}