UseDocumentation Index
Fetch the complete documentation index at: https://docs.naga.ac/llms.txt
Use this file to discover all available pages before exploring further.
text.format when your application needs schema-shaped output instead of free-form prose. On the wire, the structured result still comes back as JSON text inside a normal message item.
Choose this when downstream code depends on a predictable schema, not just “please answer in JSON” prompting.
Request
Response Shape
Choose the right mode
| Mode | Use it when |
|---|---|
json_schema | you need required fields, enums, nested objects, or strict validation |
json_object | you only need valid JSON without full schema enforcement |
How To Read The Result
- parse the JSON string from
output[*].content[*].text - if you only need valid JSON and not schema enforcement, use
text.format.type: "json_object"instead
Caveats
strict: trueworks best with a closed schema such asadditionalProperties: false- the wire response remains item-based even when the output is structured
- model support still depends on the selected model
Common mistakes
- expecting a native JSON object instead of parsing the returned text
- using an open schema when the app really needs closed, validated output
- assuming every model supports strict schema following equally well