---
title: "Why does an OpenAI structured response sometimes not match my JSON schema?"  
description: "Why does an OpenAI structured response sometimes not match my JSON schema?"  
author: "Stefano Coppola"  
published: 2026-10-23  
updated: 2026-10-23  
canonical: https://www.mindstick.com/forum/162902/why-does-an-openai-structured-response-sometimes-not-match-my-json-schema  
category: "OpenAI API"  
tags: ["OpenAI API", "Structured Outputs", "API error handling"]  
reading_time: 1 minute  

---

# Why does an OpenAI structured response sometimes not match my JSON schema?

I’m using [strict structured outputs](https://www.mindstick.com/forum/162393/how-should-openai-strict-structured-outputs-handle-optional-fields) with the OpenAI Responses API, but I’m unsure what to expect when the model refuses a request. Can a refusal come back outside the schema I supplied, and if so, what should a client check before trying to parse the response as ordinary JSON?

I’m interested in how people handle this in production, especially when downstream code assumes every successful API response has the same fields.


---

Original Source: https://www.mindstick.com/forum/162902/why-does-an-openai-structured-response-sometimes-not-match-my-json-schema

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
