AI & LLM
LLM Structured Output (JSON Schema) JSON Example
A JSON example of LLM structured outputs — a request with response_format json_schema and the guaranteed-valid JSON the model returns. Copy-ready for OpenAI JSON mode and reliable parsing.
Field Reference
sentimentrequiredstringConstrained by the schema's enum — guaranteed to be one of the allowed valuesscorerequirednumberModel-estimated confidence; schema can bound it to 0–1topicsrequiredarray<string>Extracted topics; schema enforces the array-of-strings shapesummaryrequiredstringFree-text field still constrained to appear and be a stringVariants
Request with json_schemaSetting response_format forces the model to return JSON matching your schema exactly.
Common Use Cases
- →Forcing an LLM to return parseable JSON instead of prose
- →Extracting structured fields (entities, classifications) from free text
- →Eliminating fragile regex parsing of model output in production
structured outputjson modeopenaijson schemaresponse_formatllm
Validate or format this JSON
One click loads this exact example into the tool — no copy-paste needed. Format it, validate it, explore the tree, or generate TypeScript types instantly.
Frequently Asked Questions
Related JSON Examples
AI & LLMLLM Tool / Function CallFunction-calling JSON: a tool definition plus the model's tool_call with arguments.AI & LLMOpenAI Chat Completion ResponseOpenAI Chat Completions API response with choices, message, finish_reason, and usage.DataJSON Form SchemaDynamic form definition JSON with field types, validation, selects, and layout.