401 - Client authentication failed
401 - Client authentication failed
This error means the API couldn’t authenticate your request. This can
happen for several reasons:
- The API key expired.
- The
Authorizationheader is missing. - The organization is out of credits, which disables API keys.
- The organization has reached its monthly spend limit.
- If your key expired, create a new API key.
- Add the
Authorizationheader with a valid API key to your request. - Check your balance on the Billing page and add credits.
- If your organization reached its monthly spend limit, raise or remove the limit on the Billing page, or wait for it to reset.
403 - Forbidden
403 - Forbidden
This error means the request isn’t authorized for the resource or action.To resolve this, check if the key owner’s role has the necessary
permissions to complete the request.
429 - Rate limit exceeded
429 - Rate limit exceeded
This error means you exceeded a
rate limit. This can happen for several
reasons:
- You exceeded the organization’s RPM or TPM limit.
- You exceeded the model-specific RPM or TPM limit.
- The model endpoint has reached its total capacity limit. Because the endpoint is shared, requests from all users count toward this limit. As a result, you may reach the endpoint’s capacity even if you have not exceeded your own usage limits.
- Wait before retrying your request.
- Send the request to a different model endpoint.
- If you use a coding assistant, set it to retry automatically. For Pi, see Retry rate-limited requests.
- Add a payment method to upgrade from Tier 1 to Tier 2 limits.
- Contact us about Enterprise plans if you need higher than Tier 2 limits.
- Request a dedicated deployment with isolated capacity.
429 - Server is at capacity
429 - Server is at capacity
This error means the model server’s request queue is full.To resolve this error:
- Retry after the delay in the
Retry-Afterheader. - If you use a coding assistant, set it to retry automatically. For Pi, see Retry rate-limited requests.
500 - Internal server error
500 - Internal server error
This error means the service failed while generating a response.To resolve this error:
- Retry the request.
- If it keeps failing, contact us.
504 - Gateway timeout
504 - Gateway timeout
This error means the request didn’t finish before the gateway’s timeout.To resolve this error:
- Retry with a shorter prompt.
- Lower the
max_tokensvalue to shorten the response.