Error codes

An overview on error status codes, causes, and quick fix solutions

CodeCauseSolution
401 - Authentication ErrorMissing or Invalid API KeyEnsure you are using the correct API Key and supplying it correctly
403 - Bad RequestInput token count + max_tokens parameter must be less than the context length of the model being queried.Set max_tokens to a lower number. If querying a chat model, you may set max_tokens to null and let the model decide when to stop generation.
404 - Not FoundInvalid Endpoint URL or model nameCheck your request is being made to the correct endpoint (see the API reference page for details) and that the model being queried is available
429 - Rate limitToo many requests sent in a short period of timeThrottle the rate at which requests are sent to our servers (see our rate limits)
500 - Invalid RequestMisconfigured requestEnsure your request is a Valid JSON and your API Key is correct. Also ensure you're using the right prompt format - which is different for Mistral and LLaMA models.
503 - Engine OverloadedOur servers are seeing high amounts of trafficPlease try again after a brief wait. If the the issue persists, please contact support
504 - TimeoutOur servers are overloaded with requests and could not process your request on timePlease try again after a brief wait. If the the issue persists, please contact support
520 - Server ErrorUnknown server errorThis error is caused by an issue on our servers. Please try again after a brief wait. If the issue persists, please contact support
524 - TimeoutCloudflare established a connection to the server it's supposed to communicate with, but the server took too long to respond.Please try again after a brief wait. If the the issue persists, please contact support
529 - Server ErrorUnknown server errorThis error is caused by an issue on our servers. Please try again after a brief wait. If the issue persists, please contact support

If you are seeing other error codes or the solutions do not work, please contact support for help.