Errors
Errors before the stream opens are JSON with an HTTP status. Errors after it has
opened arrive as {"type":"error","message":"..."} inside the stream — by then
the status line is already 200 and cannot be changed.
Statuses
| Status | code | Cause | Do |
|---|---|---|---|
400 | — | Validation. Missing text, unknown register, bad mode | Fix the request |
400 | notes_too_short | fromNotes with too little to work from | Give it more notes |
401 | unauthorized | Bad or revoked API key | Check the key. Do not retry |
402 | quota_exceeded | Included allowance gone, no wallet fallback | Wait for resetAt, or upgrade |
402 | credits_required | Allowance gone and the wallet is short | Buy credits |
402 | expand_pro | mode: "expand" on a non-Pro plan | Upgrade, or use rewrite |
413 | word_cap | Draft is longer than the plan's per-request cap | Split the draft |
413 | — | Body too large — text or previousRewrite over the byte limit | Split the draft |
429 | rate_limit | Too many requests per minute | Back off, respect the headers |
429 | concurrency | Too many rewrites in flight for the plan | Wait for one to finish |
503 | kill_switch | HUMANIZE_DISABLED is set | Nothing. Try later |
503 | spend_cap | Daily spend breaker tripped | Nothing. Try later |
The 402 body
{
"error": "Your included allowance is used and your credit balance is too low.",
"code": "credits_required",
"reason": "credits",
"plan": "free",
"resetAt": "2026-09-01T00:00:00.000Z",
"upgrade": true,
"buyCredits": true,
"requiredCredits": 4,
"creditBalance": 1,
"usage": { "requests": 40, "inputTokens": 198234 }
}
reason is requests, tokens, or credits — which limit you actually hit.
upgrade and buyCredits say which routes out exist for this subject; an API
key owned by an anonymous subject cannot buy credits, so buyCredits is false.
Retrying
429— back off. Concurrency clears in seconds; a rate limit clears at the minute boundary.503— retry with a long delay. Both causes are operator-side and neither clears because you asked again.401,400,402— do not retry the same request. Nothing about it will change on its own.- A mid-stream
errorevent — safe to retry once. Partial output before it is incomplete, not wrong; discard it.
What you will not get
There is no error that means your draft was rejected on content. The endpoint does not moderate, classify, or refuse drafts. If something fails, it is a limit, a credential, or the service.