OpenAI vs Claude vs Gemini Structured Outputs Compared: 97 of 167 Models Support

A side-by-side comparison of OpenAI, Claude, Gemini, and Mistral structured output capabilities and selection advice.
The article systematically compares the structured output capabilities of OpenAI, Claude, Gemini, and Mistral. Only 97 of 167 tracked models support enforced JSON Schema, leaving over 40% without native support. Request formats differ: OpenAI specifies schemas via `response_format`, Claude uses tool use, Gemini embeds `responseSchema`, and Mistral only guarantees valid JSON. Schema keyword support and refusal handling vary significantly across platforms. The article recommends OpenAI or Claude for production and an abstraction layer to reduce vendor lock-in.
Structured Outputs: The "Contract" Capability of AI APIs
When building AI applications, getting the model to reliably output JSON is often trickier than generating the content itself. Structured Outputs turns this uncertainty into a predictable "contract" by forcing the model to follow a JSON Schema. According to the latest statistics, 97 of the 167 models we track are able to enforce a JSON Schema. That means more than 40% of models still lack native support, so developers need to vet their choices carefully when selecting a model.

Based on multi-platform API documentation and hands-on testing data, this article compares OpenAI, Claude, Gemini, and Mistral across request formats, schema limitations, and refusal handling, helping you make a better choice for different scenarios.
Request Formats: Four Vendors, Four Approaches
OpenAI: response_format and json_schema
OpenAI uses the response_format parameter, where type: "json_schema" specifies strict mode. Developers need to provide a schema name, description, and the strict: true flag. This design makes the schema a first-class citizen of the request, reusing the same validation logic as the schema used in function calling.
JSON Schema is a declarative language for describing and validating the structure of JSON documents; it is itself a JSON document that defines the shape and constraints of data through keywords such as type, properties, required, and enum. It is standardized by the IETF (the latest draft is the 2020-12 version) and is not tied to any programming language or vendor. In structured output scenarios, JSON Schema serves as the "data contract" between the model and the developer: the developer uses the Schema to precisely describe the expected output format, and the platform enforces constraints during decoding so that the model can only generate token sequences that conform to that Schema. Note that AI vendors typically implement only a subset of JSON Schema and may introduce their own extension keywords, so the same Schema may behave differently across platforms.
Claude: Tool Use Is Structured Output
Anthropic's Claude has no standalone "structured output" parameter; instead, it achieves this through tool use. The developer defines an input schema, and when the model is asked to call that tool, the output naturally follows the schema. This approach is flexible but requires an extra tool definition, and the model may choose not to call the tool, so prompt engineering is needed to support it.
Tool Use / Function Calling is a capability of large models: the developer declares a set of tools in the request, each containing a name, description, and JSON Schema for its input parameters; during inference, the model can choose to call a tool and generate arguments that conform to that Schema. The platform can then validate these arguments, thereby indirectly achieving structured output. Compared with dedicated structured output parameters, the strength of the constraints in the tool-calling path depends on whether the platform enforces Schema validation and whether the model is forced to select a tool (for example, via the tool_choice parameter). In addition, tool descriptions themselves consume context tokens, and too many tools may affect the model's selection accuracy.
Gemini: responseSchema Embedded
Google Gemini provides responseMimeType: "application/json" and the responseSchema field in generationConfig, embedding the schema directly. This is similar to OpenAI, but the schema's expressiveness is limited to the OpenAPI subset that Gemini supports.
The OpenAPI Specification is a standardized format for describing REST APIs; the Schema Object in its 3.0 version is based on a subset of JSON Schema with several adjustments (such as the nullable keyword and lack of support for certain composition keywords). Google's responseSchema uses the OpenAPI 3.0 subset as its expression language, so its expressiveness is not fully equivalent to standard JSON Schema: for example, external $ref references, some composition keywords (oneOf, anyOf, allOf), and recursive structures may not be supported or may have limited behavior in Gemini. When migrating Schemas across platforms, developers should specifically check these differences to avoid validation failures or unexpected output caused by unrecognized keywords.
Mistral: Lightweight but Limited
Mistral also supports response_format, but only the json_object type, without enforcing a schema. This means the output is valid JSON, but the field structure must be inferred by the model itself, making it less reliable than the previous two.
Schema Limitations: Details Make the Difference
The practical usability of structured outputs often depends on each platform's support for JSON Schema.
- OpenAI supports most JSON Schema keywords, but has many restrictions on complex compositions such as
oneOfandanyOf, and requires all fields to berequired(optionality can be simulated vianullable). - Claude's tool schemas support nested objects and arrays, but have limited support for recursive structures, and schema descriptions consume context tokens.
- Gemini's responseSchema is based on an OpenAPI 3.0 subset, does not support external
$refreferences, and also has limits on array nesting depth. - Mistral barely validates the schema at all, guaranteeing only that the JSON syntax is correct.
These limitations directly affect modeling complex data structures. For example, when polymorphic fields are needed, OpenAI may require splitting into multiple independent schemas, whereas Claude can guide the model through tool descriptions.
Refusal Handling: When the Model Says "No"
Structured outputs are not a silver bullet. When the input cannot satisfy the schema, the model may refuse to generate. OpenAI returns a refusal field with a reason; Claude may return a tool call error or a text refusal; Gemini may throw an API error. Developers need to write error-handling logic for each platform rather than assuming the output is always valid.
Because Mistral does not enforce a schema, it almost never refuses due to structural issues, but output quality depends more on the prompt.
Refusal, in the context of structured outputs, refers to the behavior in which the model declines to generate the expected content due to safety policies, input ambiguity, or inability to satisfy Schema constraints. Different platforms expose refusals differently: OpenAI provides a separate refusal field in the response that is mutually exclusive with the content field, making it easy to detect programmatically; Claude may manifest as a missing tool call, a returned textual explanation, or a tool argument validation failure; Gemini may directly return an API error code. Production systems should abstract these signals into unified, retryable, degradable, and alertable error categories rather than relying solely on HTTP status codes. For Mistral, which does not enforce a Schema, the refusal rate is low, but the probability of structurally incorrect output is higher, so application-level JSON Schema validation should be added as a fallback.
Selection Advice and Trends
For production systems that need strict data contracts, OpenAI and Claude are the safer choices: the former expresses schemas more directly, while the latter is more natural within the tool ecosystem. Gemini is suitable for scenarios where you are already using Google Cloud and the schema is not complex. Mistral is suited to cost-sensitive, lightweight tasks with simple structures.
As the support rate of 97/167 models gradually rises, structured outputs are shifting from an "advanced feature" to a "basic capability." However, the schema dialects and error semantics of different platforms remain inconsistent, so cross-platform migrations require re-validation. It is advisable to abstract a schema adapter layer in your architecture to reduce vendor lock-in risk.
One-line Summary
A side-by-side comparison of OpenAI, Claude, Gemini, and Mistral structured output capabilities with selection advice.
Paragraph Summary
The article systematically compares the structured output capabilities of OpenAI, Claude, Gemini, and Mistral. Statistics show that only 97 of the 167 tracked models support enforced JSON Schema, with more than 40% lacking native support. In terms of request format, OpenAI specifies the schema directly via response_format, Claude achieves it indirectly through tool use, Gemini embeds responseSchema in generationConfig, and Mistral only guarantees correct JSON syntax. Regarding schema limitations, the platforms differ significantly in support for complex keywords such as oneOf and $ref, which directly affects modeling of polymorphic data structures. Refusal handling mechanisms are also inconsistent: OpenAI returns a refusal field, Claude may fail a tool call, and Gemini throws an API error. The article recommends that production systems prioritize OpenAI or Claude and abstract a schema adapter layer in the architecture to reduce vendor lock-in risk.
Related articles

Chain of Thought Isn't Just for AI: How Humans Can Use CoT to Improve Thinking Quality
Chain of Thought isn't just a prompt trick for large models. Starting from a Hacker News discussion, this article analyzes why CoT works for human thinking too, breaks down actionable ways to transfer it, and highlights the key differences between human CoT and machine CoT.
Cloudflare Teams Up with OpenAI: Closi…
Cloudflare Teams Up with OpenAI: Closing the Loop from Vulnerability Discovery to Defense with AI
Cloudflare uses OpenAI Daybreak to investigate security vulnerabilities and generate reviewable remediation plans, while developers use Codex to boost coding efficiency and quality.

Orca Multi-Agent Orchestration in Practice: A Guide to Parallel Collaboration with Claude and Codex
Orca is Stable AI's free open-source agent workbench supporting 34 agents like Claude Code and Codex in parallel. Learn its Git worktree isolation, multi-model orchestration, and mobile management.