Common Errors
401 Invalid API key
Section titled “401 Invalid API key”Check:
- Whether
Authorizationexists. - Whether it is written as
Bearer sk-xxx. - Whether the Token has been deleted or disabled.
- Whether a Token from the wrong environment is being used.
402 Insufficient balance
Section titled “402 Insufficient balance”Check:
- User balance.
- Token quota.
- Available quota for the account or Token.
- Current model price.
403 Permission denied
Section titled “403 Permission denied”Check:
- Whether the current account is allowed to access the model.
- Whether the Token has access restrictions.
- Whether the model is only available to some users.
429 Rate limited
Section titled “429 Rate limited”Actions:
- Reduce concurrency.
- Add retry backoff.
- Check whether a single Token is sending too many requests.
- Contact an administrator to adjust rate limits.
502 / 503 Model service error
Section titled “502 / 503 Model service error”Check:
- Whether the model service is available.
- Whether the account balance or quota is sufficient.
- Whether the request parameters are accepted by the model service.
- Retry later or contact an administrator to confirm service status.