Troubleshooting and FAQ
API calls fail: a checklist
Work through 401, 402, 403, 404, 429 and in-stream errors from the chat API, and a stream that never seems to arrive.
Troubleshooting1 min readUpdated 23 October 2026
Read the code in the error envelope (or the error event) first: it names the problem. The full list is in Errors. This checklist covers the common ones, in the order they're checked.
Check these in order
- 1
401: the key
MISSING_API_KEYorINVALID_API_KEY. Send yoursk-so-key inX-Api-Key(notAuthorization). Watch for trailing newlines from environment files. Apk-so-key only works on the widget. - 2
400: the agent and message
MISSING_AGENT_IDorMISSING_MESSAGE. SendX-Agent-Id(oragent_id) and a non-emptymessage. - 3
404: the agent
AGENT_NOT_FOUND: the id is wrong, or the agent is on another account. Copy it from the agent's Deploy tab. - 4
403: the agent is paused
AGENT_INACTIVE. Set it to Active on its Settings tab. - 5
402: credits
OUT_OF_CREDITS. Buy credits or turn on auto top-up. - 6
429: the rate limit
RATE_LIMIT_EXCEEDED. The agent's limit (60 a minute for new agents) is shared by every channel. Wait the seconds inX-RateLimit-Reset. - 7
422: the body
VALIDATION_ERROR: for example a message over 32,000 characters. Readdetails. - 8
200 but an error event
The stream started, then failed.
LLM_AUTH_ERROR: fix the agent's provider key.LLM_RATE_LIMITEDorLLM_UNAVAILABLE: your provider; retry later.TIMEOUT: the reply passed 120 seconds.INTERNAL_ERROR: check the agent has a provider key, then email support with therequest_id. - 9
Nothing arrives until the end
Something is buffering. Use
curl -N; turn off response buffering on proxies between you and the API; read the body as a stream, not withres.json()orres.text().
It works with cURL but not from my browser code
Never call the API with a secret key from a browser. Proxy through your server, or use the widget. See Code examples.
Where can I see failed requests?
On the Tracing page: filter by status or error code. Every request, including failures, is traced.
Still stuck?
Email us with what you tried and any request id. A person replies.