---
title: "Which JSON Schema constraints work with OpenAI Structured Outputs?"  
description: "Which JSON Schema constraints work with OpenAI Structured Outputs?"  
author: "Otto Lehtonen"  
published: 2026-10-22  
updated: 2026-10-22  
canonical: https://www.mindstick.com/forum/162851/which-json-schema-constraints-work-with-openai-structured-outputs  
category: "Structured Outputs"  
tags: ["OpenAI", "api(s)", "JSON schema"]  
reading_time: 1 minute  

---

# Which JSON Schema constraints work with OpenAI Structured Outputs?

I’m moving an API response from ordinary JSON mode to Structured Outputs and am unsure how much of JSON Schema I can rely on. My schema uses required fields, `enum`, and a regular-expression `pattern`; I may also need to limit array lengths.

Has anyone run into constraints that the API rejects or silently handles differently? I’m especially interested in what happens when a schema is valid JSON Schema but not accepted for [strict structured output](https://www.mindstick.com/forum/162393/how-should-openai-strict-structured-outputs-handle-optional-fields).


---

Original Source: https://www.mindstick.com/forum/162851/which-json-schema-constraints-work-with-openai-structured-outputs

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
