Gateway API
Errors
All API errors follow a consistent JSON format:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
{
"error": {
"type": "error_type",
"code": "http_status_code",
"message": "Human-readable error message"
}
}
| HTTP Code | Error Type | Description |
|---|---|---|
| 400 | invalid_request_error | Request body or parameters are malformed |
| 401 | authentication_error | API key is missing, invalid, or expired |
| 402 | insufficient_balance | Account balance is insufficient |
| 403 | permission_error | Account lacks access rights to the resource |
| 404 | not_found_error | Model or resource does not exist |
| 405 | invalid_request_error | Wrong HTTP method |
| 429 | rate_limit_error | Too many requests, please retry later |
| 500+ | api_error | An error occurred while processing your request |
| 529 | overloaded_error | Service is temporarily overloaded, please retry later |
{
"error": {
"type": "authentication_error",
"code": "401",
"message": "Incorrect API key provided. Please visit https://portix.ai/keys to find your API key."
}
}
{
"error": {
"type": "rate_limit_error",
"code": "429",
"message": "Rate limit exceeded. Your current limit is 120 requests per minute (approximately 2.00 requests per second). Please visit https://portix.ai/wallet to upgrade your plan for higher limits.",
"rate_limit": {
"rpm": 120,
"qps": 2.00
}
}
}
{
"error": {
"type": "insufficient_balance",
"code": "402",
"message": "Insufficient balance. Please recharge your account at https://portix.ai/wallet."
}
}
{
"error": {
"type": "api_error",
"code": "500",
"message": "Internal server error occurred. Our team has been notified and is working on it."
}
}
{
"error": {
"type": "invalid_request_error",
"code": "400",
"message": "gpt-5 is not a valid model ID. Did you mean one of these: gpt-4o, gpt-4-turbo; You can view all the models in our documentation: https://docs.portix.ai"
}
}
{
"error": {
"type": "invalid_request_error",
"code": "400",
"message": "The 'model' field is required but was not provided in the request"
}
}