Debugging Errors | xAI Docs

Getting Started

Debugging Errors

View as Markdown

When you send a request, you would normally get a 200 OK response from the server with the expected response body. If there has been an error with your request, or error with our service, the API endpoint will typically return an error code with error message.

If there is an ongoing service disruption, you can visit https://status.x.ai for the latest updates. The status is also available via RSS at https://status.x.ai/feed.xml.


The service status is also indicated in the navigation bar of this site.

Most of the errors will be accompanied by an error message that is self-explanatory. For typical status codes of each endpoint, visit API Reference.


Status Codes

Here is a list of potential errors and statuses arranged by status codes.

4XX Status Codes

2XX Error Codes


Bug Report

If you believe you have encountered a bug and would like to contribute to our development process, email API Bug Report to support@x.ai with your API request and response and relevant logs.

You can also chat in the #help channel of our xAI API Developer Discord.


Did you find this page helpful?

Last updated: March 4, 2026