JSON Prompt — Complete Guide

Use the JSON mode to force models to return valid JSON—perfect for structured data, APIs, or downstream automation.

Request

Describe the data you want in plain language.

“Provide 5 travel destinations with quick facts for families.”

Schema (informal or JSON Schema)

Define fields and types. Models follow examples well.

Array of: { "name": string, "country": string, "is_beach": boolean, "budget_level": "low"|"mid"|"high" }

Strict JSON Prompt Template

You are a JSON-only generator.

TASK
- Based on the REQUEST below, return data that strictly conforms to the SCHEMA.
- Output MUST be valid JSON only. No prose, no markdown, no comments.
- Use double quotes for all keys and string values.
- No trailing commas. No additional fields.

REQUEST
[describe your data needs]

SCHEMA (informal or JSON Schema)
[fields and types]

RESPONSE FORMAT
- Return exactly one JSON value conforming to the schema.

Validation Tips