Skip to Content

Error Handling

Responses API Beta

Understanding and handling errors in the Responses API.

This API is in beta stage and may have breaking changes.
It is also stateless: each request is independent and no conversation state is persisted between requests.

The Responses API returns structured error responses that follow a consistent format.

Error Response Format

All errors follow this structure:

responses-error-handling-01.json
{ "error": { "code": "invalid_prompt", "message": "Detailed error description" }, "metadata": null }

Error Codes

The API uses the following error codes:

CodeDescriptionEquivalent HTTP Status
invalid_promptRequest validation failed400
rate_limit_exceededToo many requests429
server_errorInternal server error500+