Hello, I am trying to use Structured Outputs with the new Responses API, which according to the docs should be supported. However, including the response_format key in my API request results in the following response:
}
"error": {
"message": "Unknown parameter: 'response_format'.",
"type": "invalid_request_error",
"param": "response_format",
"code": "unknown_parameter"
}
}
This is my API request:
{
"model": "gpt-4o-mini",
"input": [
{
"role": "user",
"content": [
{
"type": "input_image",
"image_url": {
"url": "imageUrl",
"detail": "auto"
}
}
]
}
],
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "receipt_parser",
"strict": true,
"schema": {
"type": "object",
"properties": {
"purchase_date": {
"type": "string",
"description": "The date of purchase in ISO 8601 format (Year-Month-Day)"
},
"tax_paid": {
"type": "number",
"description": "The order tax paid"
}
},
"required": [
"purchase_date",
"tax_paid"
],
"additionalProperties": false
}
}
},
"user": "965",
"meta": {
"tenant_id": "1"
}
}
Are my parameters wrong or are the API docs maybe inaccurate? Any insight is appreciated thank you.