Skip to main content
When the LLM Gateway API encountered an error, it returns a standard JSON response with an appropriate HTTP status code.

Error Response Body

Common Error Codes

Handling Errors in Code

We recommend using a structured error handler to catch and react to specific codes:
For more detailed information on how the gateway communicates these errors back to the AI model, see the Reference -> Error Handling guide.