Error Codes

The following table shows the possible error codes that might be returned from the API.

Error Code
Error Type
πŸ”΄ 400Invalid RequestCause: The request is invalid, which might be due to one of the following reasons:
  • The request body is not a valid JSON;
  • A parameter is invalid or has the wrong type.
  • Batch size is too large;
  • Total number of tokens in the batch exceeds the limit;
  • Number of tokens in an example exceeds the context length;
Solution: The specific error will be indicated in the error message. Double check the request body and correct the errors.
πŸ”΄ 401UnauthorizedCause: Invalid authentication.
Solution: Ensure the API key is correctly specified in the HTTP request header. Please create or view your API key in our dashboard.
πŸ”΄ 429Rate Limit ExceededCause: The frequency of your requests is too high.
Solution: Please pace your requests. Read the rate limit guide for more information.
πŸ”΄ 500Server ErrorCause: Unexpected issue on our servers.
Solution: Retry your request after a brief wait. If the error persists, please contact us at [email protected].
πŸ”΄ 502
πŸ”΄ 503
πŸ”΄ 504
Service UnavailableCause: Our servers are currently experiencing high traffic.
Solution: Retry your requests after a brief wait.