HTTP Status Codes
| Code | Meaning | Action |
|---|---|---|
| 200 | Success | Process response |
| 401 | Invalid api key | Check your Authorization header |
| 429 | Rate limit exceeded | Retry with backoff |
| 500 | Internal server error |
Error Response Format
All errors follow the following format. For example, using an unsupported parameter likeprompt instead of query:
Handling Errors
- Python
- TypeScript
python
Retry Strategy
Both the Python and TypeScript SDKs automatically retry transient failures with a short exponential backoff. By default, the SDK retries 2 times on:- network/connection errors
- 408 Request Timeout
- 429 Rate Limit
- 5xx server errors
max_retries in Python, maxRetries in TypeScript), or per-request.
- Python
- TypeScript
python

