Errors
Every error is typed. The body carries { error: { code, message } } and the codes below never change meaning.
Codes
| Code | Meaning | What to do |
|---|---|---|
401 key_invalid | Unknown or revoked key. | Check the key, or make a new one; see Keys. |
402 payment_required | No balance and no x402 payment. Body carries the price. | Top up, or pay over x402 and retry with X-PAYMENT. |
409 nullifier_used | Deposit note already redeemed. | Each note redeems once; see Deposit notes. |
422 unmergeable | The rebuild could not be validated after retries. The shards are returned so you can merge yourself. | Merge the returned shards yourself. |
424 attestation_mismatch | The client refused an enclave whose measurement is not a published build. Update the SDK; do not send the request. | Update the SDK; check with npx wispr attest. |
429 budget_exceeded | The key cap or X-Wispr-Budget is below the cheapest plan for this request. | Raise the cap or the header; see Controls. |
451 refused | A shard was refused by its model and again by the fallback. The body names both. Rephrase or pin a catalogue model. | See Refusals. |
The body
Every error has the same shape, whichever route returned it.
{ error: { code, message } }
A 402 without a key also carries X-Payment-Required with the price; see x402 per request.
Rule
Rule
A refused shard is never silently swapped for a weaker answer. You get a typed error or a real answer.