Errors & refusals/Error codes
Error Codes & Troubleshooting
Tell auth, balance, rate-limit, upstream-unavailable, and timeout errors apart by HTTP status, and what to do about each.
On this pageexpand_more
401
invalid api key
The key is missing, mistyped, deleted, or Authorization / x-api-key headers conflict.
402
insufficient balance
The account balance is too low. Top up before sending more requests.
429
rate limited
Traffic is too frequent. Retry later or reduce concurrency.
502
upstream unavailable
The upstream model service is temporarily unavailable. Switch models or retry later.
504
upstream timeout
The upstream response timed out. Shorten context, reduce max_tokens, or retry.
529
upstream overloaded
The upstream model is temporarily overloaded and Wokey already retried on other routes (code upstream_unavailable). It is unrelated to your balance. Retry shortly or switch models.