Error Handling
Understanding and handling errors in the Responses API
The Responses API Beta returns structured error responses that follow a consistent format.
Error Response Format
All errors follow this structure:
{
"error": {
"code": "invalid_prompt",
"message": "Detailed error description"
},
"metadata": null
}Error Codes
The API uses the following error codes:
Code
Description
Equivalent HTTP Status
invalid_prompt
Request validation failed
400
server_error
Internal server error
500+
rate_limit_exceeded
Too many requests
429
Last updated