🛠️JSON Mode
Also known as JSON Output Mode, JSON Response Format
A switch so the model only replies with JSON that will load.
Think of it like
Think of it like a rule that all answers go in boxes. It does not say which boxes.
Example
Why it matters
It stops one common failure, a reply a program cannot parse. It does not stop the rest.
Definition
Example code
json
{"cities": ["Lisbon", "Oslo", "Kyoto"]}Common mistake
Key takeaways
- 1Always valid JSON. It will parse.
- 2No set shape. Fields can change.
- 3Schema is stricter. Use it when it matters.