API v1
Errors
Errors return a JSON body with an error field describing the issue. The HTTP status code tells you the category.
Error format
Error response
400 Bad Request
{
"error": "Message must be between 1 and 2000 characters"
}The body always contains a single error string. Use the HTTP status code (not the message) for programmatic branching — messages may be reworded over time.
Error codes
| Code | Meaning |
|---|---|
| 400 | Invalid request — message missing, empty, or exceeds 2000 characters. |
| 401 | Invalid, revoked, or expired API key. |
| 403 | API key not authorized for this chatbot, or your IP is not in the key’s allowlist. |
| 429 | Rate limit exceeded, daily message cap reached, or monthly credits depleted. |
| 503 | Service temporarily overloaded. |
Related