Skip to content
Errors
The Kayse AI API uses standard HTTP response codes to indicate the success or failure of an API request.
Error Codes
| Error Code | Meaning |
|---|---|
400 | Bad Request — Your request is invalid |
401 | Unauthorized — Your API key is incorrect |
404 | Not Found — The specified item could not be found |
405 | Method Not Allowed — You tried to access the API with an invalid method |
429 | Too Many Requests — You're making too many requests |
500 | Internal Server Error — We had a problem with our server. Try again later |
503 | Service Unavailable — We're temporarily offline for maintenance. Please try again later |
Error Response Format
Error responses include a JSON body with details about the error:
json
{
"error": "not found",
"message": "The requested resource could not be found"
}Handling Errors
When you receive an error response:
- Check the status code to understand the type of error
- Review the error message for specific details
- Retry with exponential backoff for 429 and 5xx errors
- Fix your request for 4xx errors before retrying