Structured Outputs
Choose the shape of the AI Query answer with one field: responseFormat.
#The three formats
The responseFormat field controls the shape of the AI Query answer. It works the same way on both the query endpoint and the streaming endpoint, on every tier All plans — there is no plan gating on format.
| Value | Shape |
|---|---|
text (default) | Plain answer text. |
markdown | Answer text formatted with markdown. |
json | A structured JSON conversion of the reading, alongside the answer text. |
#Structured JSON
responseFormat:"json" returns a structured JSON conversion built from the reading. The response carries the usual answer text alongside a structuredResponse object built from that same reading, so you can bind fields into a UI instead of re-parsing prose.
Note
This page covers the
responseFormat field only. For the full response envelope — metadata, conversationId, followUps and more — see the response reference.#Example
{
"question": "What does my chart say about career timing?",
"birthDetails": { "...": "..." },
"responseFormat": "json"
}{
"answer": "Based on your chart, the 10th house lord ...",
"structuredResponse": { "...": "structured breakdown of the reading" },
"metadata": { "...": "usage and cost" }
}