Error Codes

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

Error Code
Error Type
Description
🔴 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.