Skip to main content
Force LLM responses into valid JSON format. Supports json_object (free-form JSON) and json_schema (schema-validated JSON).

Basic JSON Mode

Schema-Validated JSON

Force the response to match a specific schema:

Provider Support

When json_object is not natively supported (Anthropic, Bedrock), add JSON instructions to your system prompt for best results.

With LLM Standalone

Anthropic Native JSON Schema

Anthropic Claude 4.5+ models support schema-validated JSON via output_config:
Anthropic requires additionalProperties: false on all object types in the schema. Models before Claude 4.5 do not support json_schema.

Testing in Prompt Studio

Test structured output in the Portal:
  1. Open Prompts and select a prompt
  2. Click the config icon and change Format to “JSON Object” or “JSON Schema”
  3. Send a message — the response will be valid JSON

Next Steps

Reasoning

Enable chain-of-thought thinking

Server-Side Tools

Provider-native web search and code execution