Troubleshooting
Authentication Errors
| Error message | HTTP status | Cause | Solution |
|---|---|---|---|
invalid api key | 401 | The API Key is invalid, expired, revoked, or disabled | Go to Console → API Keys and confirm the key status is "active". If it has expired, generate a new one |
Routing and Model Errors
| Error message | HTTP status | Cause | Solution |
|---|---|---|---|
no model config found for: {model} | 404 | The requested model ID does not exist | Open the model list and confirm the model ID is spelled correctly |
model field is required | 400 | The request body is missing the model field | Add "model": "model name" to the request JSON |
invalid or empty requested model | 400 | The requested model name is empty or invalid | Open the model list and confirm you are using the correct model ID format |
unknown api path | 404 | The API path is incorrect | Confirm the Base URL is https://api.gate.ai/openai/v1 or https://api.gate.ai/anthropic |
Request Parameter Errors
| Error message | HTTP status | Cause | Solution |
|---|---|---|---|
invalid JSON body | 400 | The request body is not valid JSON | Check that the request body is valid JSON |
failed to read request body | 400 | The request body could not be read | Confirm the body is not corrupted and Content-Type is set to application/json |
failed to rewrite request body | 500 | Failed to rewrite the request body inside the gateway | Retry. If it keeps happening, contact technical support |
images are not supported by this model | 400 | The target model does not support image input | Switch to a multimodal model that supports images, such as gpt-4o |
audio is not supported by this model | 400 | The target model does not support audio input | Switch to a model that supports audio input |
unsupported parameter: max_tokens | 400 | Some models do not support the max_tokens parameter | Use max_completion_tokens instead |
Quota and Rate Limit Errors
| Error message | HTTP status | Cause | Solution |
|---|---|---|---|
api key budget quota exceeded | 429 | The API Key budget has been exhausted | Go to Console → API Keys → Budget settings, increase the budget, or wait for the quota to reset |
guardrail budget limit exceeded | 429 | The guardrail budget limit has been exceeded | Check the budget limit in guardrail settings, then increase the limit or reduce usage frequency |
organization guardrail budget limit exceeded | 429 | The organization-level guardrail budget has been exceeded | Contact an organization admin to adjust the organization-level budget limit |
model not allowed by guardrail policy | 403 | The model is not allowed by the guardrail policy | Go to Console → Guardrails and add the target model to the allowlist |
The free model usage has reached its daily global limit today. | 429 | The global daily limit for the free model has been reached | Wait for the next daily reset, or upgrade to a paid plan for unrestricted models |
The free model usage has reached its daily limit today. | 429 | Your personal daily limit for the free model has been reached | Wait for the next daily reset, or upgrade to a paid plan |
Guest daily spending limit exceeded. Please try again tomorrow or upgrade to a paid plan. | 429 | The guest daily spending limit has been exceeded | Register an account and upgrade to a paid plan, or wait for the next daily reset |
Billing and Balance Errors
| Error message | HTTP status | Cause | Solution |
|---|---|---|---|
Pending payment {amount} USD — Please top up... | 402 | The account balance is insufficient and has an outstanding payment | Top up with Gate Pay |
Insufficient balance and account in debt | 402 | The balance is insufficient and the account is in debt | Top up with Gate Pay |
billing model info not found for model "{model}" | 400 | Billing information for the model does not exist | Confirm the model ID is correct. If it is a new model, contact technical support to configure billing rules |
billing model info is ambiguous for model "{model}" | 400 | Billing information is ambiguous because multiple records match | Contact technical support to check the model billing configuration |
billing configuration error | 500 | Billing rules are misconfigured on the server | Contact technical support to fix the billing configuration |
Upstream Service Errors
| Error message | HTTP status | Cause | Solution |
|---|---|---|---|
bad gateway | 502 | The gateway failed to communicate with the upstream service | Retry. If it keeps happening, check the service status page or contact technical support |
upstream service unavailable | 502 | The upstream AI Provider is unavailable | Retry later, or switch to another available model |
upstream service error | 502 | The upstream AI Provider returned an error | Check whether the request parameters match the target model requirements. If it keeps happening, contact technical support |
request timeout | 504 | The upstream request timed out | Reduce the input length or increase the timeout, then retry |
no provider handler configured for protocol | 502 | No protocol handler is configured in the gateway | Contact technical support to check the gateway configuration |
Server Internal Errors
| Error message | HTTP status | Cause | Solution |
|---|---|---|---|
internal server error | 500 | Internal gateway error | Retry. If it keeps happening, contact technical support with the Request ID |
failed to record request log | 500 | Failed to record the request log | This does not affect the request result and can be ignored. Contact technical support if it happens frequently |
failed to list models | 500 | Failed to query the model list | Retry. If it keeps happening, contact technical support |
Common Quick Checks
Incorrect Base URL
bash
1# ❌ Incorrect2https://api.gate.ai/v1/chat/completions34# ✅ Correct5https://api.gate.ai/openai/v1/chat/completions # OpenAI protocol6https://api.gate.ai/anthropic/v1/messages # Anthropic protocolIncompatible max_tokens Parameter
javascript
1// ❌ Some models do not support this2{ "model": "gpt-4o", "max_tokens": 100 }34// ✅ Use max_completion_tokens5{ "model": "openai/gpt-5.5", "max_completion_tokens": 100 }API Key Format
bash
1# ✅ Correct request headers2Authorization: Bearer sk-xxxxxxxxxxxxxxxxxxxx # OpenAI protocol3X-api-key: sk-xxxxxxxxxxxxxxxxxxxx # Anthropic protocol