---
title: "SchemaCompatibility"
canonical_url: "https://www.nutrient.io/api/python/enums/schema-compatibility/"
md_url: "https://www.nutrient.io/api/python/enums/schema-compatibility.md"
last_updated: "2026-07-15T14:46:57.766Z"
description: "Target dialect for a generated JSON Schema. Structured-output modes of the major LLM providers each accept a different subset of JSON Schema; the selected valu…"
---

Target dialect for a generated JSON Schema. Structured-output modes of the major LLM providers each accept a different subset of JSON Schema; the selected value acts as a preset filter applied on top of the individual `SchemaGenerationSettings` knobs — the effective rule is the stricter of the knob and the dialect limit, and features the dialect rejects are never emitted regardless of the knobs.

```python

from nutrient_sdk import SchemaCompatibility

```

## Values

| Name                            | Value | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ------------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `SchemaCompatibility.PORTABLE`  | `0`   | Emit only the intersection accepted by all major structured-output modes (OpenAI strict mode, Anthropic strict tool use, Gemini, and grammar-constrained local inference engines). Nullability uses type arrays, unions use `anyOf`, every object sets `additionalProperties: false` with all properties required, nesting is capped at five levels, and size constraints such as `maxItems` are expressed as description text instead of constraint keywords. This is the default and the safest choice when the consuming provider is not known up front. |
| `SchemaCompatibility.OPEN_AI`   | `1`   | Target OpenAI Structured Outputs (strict mode). Unlocks constraint keywords OpenAI supports (`minItems`/`maxItems`, string lengths, numeric ranges, `pattern`) while enforcing its documented rejections (no `oneOf`/`allOf`, no `patternProperties`, five-level nesting cap, all properties required, `additionalProperties: false`).                                                                                                                                                                                                                      |
| `SchemaCompatibility.ANTHROPIC` | `2`   | Target Anthropic structured outputs / strict tool use. Enforces its documented rejections: no recursion, no `maxItems` or string-length or numeric-range constraints (expressed as description text instead), string formats limited to the documented whitelist, and `additionalProperties: false` on every object.                                                                                                                                                                                                                                        |
| `SchemaCompatibility.GEMINI`    | `3`   | Target Google Gemini structured output (JSON Schema path). Unions use `anyOf` only — Gemini silently ignores `oneOf`/`allOf`, so they are never emitted. Constraint keywords Gemini documents (`minItems`/`maxItems`, lengths, numeric ranges) are allowed.                                                                                                                                                                                                                                                                                                 |
| `SchemaCompatibility.NONE`      | `4`   | No dialect filter. The schema is shaped by the individual knobs only and may use any standard JSON Schema feature the knobs enable. Use when the schema is consumed by a validator rather than an LLM structured-output mode.                                                                                                                                                                                                                                                                                                                               |

## Usage Example

```python

from nutrient_sdk import SchemaCompatibility

# Access enum values

value = SchemaCompatibility.PORTABLE
print(f"Value: {value}")  # Output: Value: SchemaCompatibility.PORTABLE

print(f"Integer value: {value.value}")  # Output: Integer value: 0

```

---

## Related pages

- [All public classes import directly from the top-level package:](/api/python/enums.md)
- [Access enum values](/api/python/enums/description-level.md)
- [Access enum values](/api/python/enums/document-bookmark-source.md)
- [Access enum values](/api/python/enums/document-format.md)
- [Access enum values](/api/python/enums/document-markup-mode.md)
- [Access enum values](/api/python/enums/document-type.md)
- [Access enum values](/api/python/enums/execution-provider.md)
- [Access enum values](/api/python/enums/html-layout-type.md)
- [Access enum values](/api/python/enums/image-export-format.md)
- [Access enum values](/api/python/enums/image-export-mode.md)
- [Access enum values](/api/python/enums/image-setting-mode.md)
- [Access enum values](/api/python/enums/implicit-conversion.md)
- [Access enum values](/api/python/enums/instant-json-render-theme.md)
- [Access enum values](/api/python/enums/json-export-content.md)
- [Access enum values](/api/python/enums/json-export-format.md)
- [Access enum values](/api/python/enums/ocr-activation-mode.md)
- [Access enum values](/api/python/enums/open-settings-mode.md)
- [Access enum values](/api/python/enums/page-cache-mode.md)
- [Access enum values](/api/python/enums/pdf-border-style.md)
- [Access enum values](/api/python/enums/pdf-compression.md)
- [Access enum values](/api/python/enums/pdf-conformance.md)
- [Access enum values](/api/python/enums/pdf-form-field-type.md)
- [Access enum values](/api/python/enums/pdf-line-ending-style.md)
- [Access enum values](/api/python/enums/pdf-page-sizes.md)
- [Access enum values](/api/python/enums/pdf-rubber-stamp-icon.md)
- [Access enum values](/api/python/enums/pdf-save-preferences.md)
- [Access enum values](/api/python/enums/pdf-settings-mode.md)
- [Access enum values](/api/python/enums/rendering-layout-mode.md)
- [Access enum values](/api/python/enums/search-display.md)
- [Access enum values](/api/python/enums/search-mode.md)
- [Access enum values](/api/python/enums/signature-hash-algorithm.md)
- [Access enum values](/api/python/enums/text-direction.md)
- [Access enum values](/api/python/enums/tiff-compression.md)
- [Access enum values](/api/python/enums/unit-mode.md)
- [Access enum values](/api/python/enums/vision-engine.md)
- [Access enum values](/api/python/enums/vision-features.md)
- [Access enum values](/api/python/enums/vision-output-format.md)
- [Access enum values](/api/python/enums/vlm-classification-strategy.md)
- [Access enum values](/api/python/enums/vlm-provider.md)
- [Access enum values](/api/python/enums/word-refining-method.md)

