curl --request POST \
--url https://api.collectivex.health/v1/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"question": "What does the research say about magnesium for perimenopause sleep?"
}
'
{
"request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"answer": "Progesterone during the luteal phase has a thermogenic effect...",
"citations": [
{
"id": "CXH-00835",
"score": 0.92,
"text": "Transdermal estradiol was associated with significant reductions...",
"metadata": {
"cxh_id": "CXH-00835",
"doi": "10.1093/humrep/dead156",
"year": "2023"
}
}
]
}
Ask a question
Ask a question — one-shot JSON answer
One-shot, synchronous endpoint. Always returns application/json (the
SyncResponse shape) — there is no streaming mode and no stream field.
This is the recommended path for Claude Skills, MCP tool calls, agent
pipelines, and any caller that wants the full answer before processing —
the same contract as stream: false on POST /v1/chat, promoted to its
own named path with a question-shaped request body. Both endpoints remain
fully supported; there is no deprecation or migration deadline for
stream: false on /v1/chat.
Server-to-server (the only supported pattern for web), or
native-mobile-direct via a short-lived session token minted by
your backend through POST /v1/session-tokens (native mobile only,
not browser/JS — see “API keys” above). Never embed your long-lived key in any client,
browser or mobile.
Internally this is the exact same pipeline as /v1/chat — same
retrieval, safety, and grounding behavior. Nothing about answer quality
changes based on which endpoint you call.
Rate limits are communicated via X-RateLimit-* headers on every
response and are shared with /v1/chat per API key
(same rate-limit namespace, same key — see “Rate limits” above).
When a 429 is returned, honour Retry-After before retrying.
POST
/
v1
/
query
curl --request POST \
--url https://api.collectivex.health/v1/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"question": "What does the research say about magnesium for perimenopause sleep?"
}
'
{
"request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"answer": "Progesterone during the luteal phase has a thermogenic effect...",
"citations": [
{
"id": "CXH-00835",
"score": 0.92,
"text": "Transdermal estradiol was associated with significant reductions...",
"metadata": {
"cxh_id": "CXH-00835",
"doi": "10.1093/humrep/dead156",
"year": "2023"
}
}
]
}
Bearer token used by every /v1/* endpoint. Two kinds of key work here:
Long-lived partner key (cxh_pk_live_*) — issued by
CollectiveX Health (contact partners@collectivex.health). Keep
it server-side only — never expose it in client bundles or
mobile app code. This rule is absolute and does not change for
any endpoint.
Short-lived session key — minted server-side via
POST /v1/session-tokens from a long-lived key. Safe to hand
to a native mobile client only — not a browser or other
JavaScript context, see "API keys" in the description above.
It's scoped to /v1/query and /v1/chat only, expires in at
most 60 minutes, and can't mint further session keys.
POST /v1/session-tokens itself only ever accepts the
long-lived key.
Body
application/json
Option 1
Option 2
Request body for POST /v1/query. Uses additionalProperties: false (mirrors
Zod .strict() on the server, matching ChatRequest's convention). Exactly
one of question or messages is required — not both. Retrieval tuning
knobs are intentionally not accepted here either, for the same reason as
/v1/chat: we curate retrieval, partners don't tune.
A single question, plain string. The preferred shape for /v1/query
callers — no message envelope needed. Internally wrapped into a
single-element UIMessage before being passed to the same pipeline
that /v1/chat uses, so behavior is identical to sending that text as
the sole message on /v1/chat.
Single-element AI SDK v6 UIMessage array, provided for continuity
with callers already building /v1/chat request bodies who want to
switch endpoints with a minimal diff. Unlike /v1/chat, this array
MUST contain exactly one message with role "user" — /v1/query has
no multi-turn concept. Sending more than one message, or a message
with a different role, is a 400 invalid_request (use /v1/chat with
stream:false instead if you need conversation history).
BETA. When omitted or "text", the response is byte-for-byte
the SyncResponse this endpoint has always returned — no behavior
change. When "structured", the response ADDS a structured_answer
field (machine-readable sections/claims/citations) alongside the
unchanged answer/citations fields; nothing is removed or
replaced. This field, and the shape it produces, may change in a
future minor version while in beta.
Available options:
text,
structured
Response
OK. Always application/json — the SyncResponse flat envelope.
No stream negotiation; this endpoint has exactly one response shape.
/v1/query's response — the shared SyncResponse shape plus the
BETA structured_answer field. Defined as its own schema (rather
than putting structured_answer on SyncResponse directly) so
clients generated from this spec do not advertise structured_answer
on /v1/chat, which has no response_format field and can never
produce it.
The model's answer string. Empty string ("") on deferral or crisis short-circuit
(the pipeline refuses to generate an answer without grounded evidence).
Retrieved citations from the peer-reviewed corpus. Empty array on deferral or crisis.
Never fabricate or paraphrase a citation that is not in this array.
Present when the corpus lacks strong evidence for the query. Present the originalQuery
back to the user and do not synthesize an answer from training data.
Present when a safety classifier fires before retrieval (self-harm, acute symptoms,
IPV). Show the resources verbatim and route the user away from research framing.
Present when the generation pipeline emitted an error (v1.1, optional). The message
is always a generic sanitized string — internal error details are never exposed.
With no usable content the response status is 502; alongside a partial answer or a
deferral/crisis short-circuit the status stays 200 and this field flags the failure.
BETA. Present only when the request set
response_format: "structured" (see QueryRequest.response_format).
For structured-mode consumers, structured_answer.status is the
authoritative outcome — do not also branch on the legacy
top-level answer/error fields, which keep text-mode
semantics unchanged and can disagree with status on
truncated generations.
Absent — not null — on every request that omits it or sends
response_format: "text", which is every request today: this field
is purely additive and never changes the meaning of answer or
citations.
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Collective X API","colors":{"primary":"#1a3f52","light":"#6aade4","dark":"#101828"},"logo":{"light":"https://mintcdn.com/collective-x/XmdndrtGclqPo6DR/logo/light.svg?fit=max\u0026auto=format\u0026n=XmdndrtGclqPo6DR\u0026q=85\u0026s=a7e95b40e54fc2a5bb8a468486937833","dark":"https://mintcdn.com/collective-x/XmdndrtGclqPo6DR/logo/dark.svg?fit=max\u0026auto=format\u0026n=XmdndrtGclqPo6DR\u0026q=85\u0026s=e49aacf5db1549f425bb1876eb3006ad"},"favicon":"https://mintcdn.com/collective-x/XmdndrtGclqPo6DR/favicon.png?fit=max\u0026auto=format\u0026n=XmdndrtGclqPo6DR\u0026q=85\u0026s=78206f470882a5ed0733d80506b8c90a","navbar":{"links":[{"href":"https://api.collectivex.health","label":"Status"}]},"footer":{},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"collective-x","hasAudioNarration":false,"actualSubdomain":"collective-x","customDomains":["docs.collectivex.health"],"gitSource":{"type":"github","owner":"collective-x","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6aa635006cb71c753f702f70","collectionId":"75e7c7d0-413f-4f2e-8fac-bcec7f6e2d60","liveDeploymentHistoryId":"6aa635006cb71c753f702f70","schemaVersion":"v3"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6aa635006cb71c753f702f70","clientVersion":"0.0.4006","searchFilterCounts":[{"language":"default","tag":"Guides","count":6},{"language":"default","tag":"API Reference","count":5},{"language":"default","tag":"Getting Started","count":3},{"language":"default","tag":"Features","count":2},{"language":"default","tag":"Async jobs","count":2},{"language":"default","tag":"Reference","count":1},{"language":"default","tag":"Ask a question","count":1},{"language":"default","tag":"Have a conversation","count":1},{"language":"default","tag":"Session tokens","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/ask-a-question/ask-a-question-—-one-shot-json-answer","slug":"/api-reference/ask-a-question/ask-a-question-—-one-shot-json-answer","pageMetadata":{"title":"Ask a question — one-shot JSON answer","description":"One-shot, synchronous endpoint. Always returns `application/json` (the\n`SyncResponse` shape) — there is no streaming mode and no `stream` field.\nThis is the recommended path for Claude Skills, MCP tool calls, agent\npipelines, and any caller that wants the full answer before processing —\nthe same contract as `stream: false` on `POST /v1/chat`, promoted to its\nown named path with a question-shaped request body. Both endpoints remain\nfully supported; there is no deprecation or migration deadline for\n`stream: false` on `/v1/chat`.\n\n**Server-to-server (the only supported pattern for web), or\nnative-mobile-direct via a short-lived session token** minted by\nyour backend through `POST /v1/session-tokens` (native mobile only,\nnot browser/JS — see \"API keys\" above). Never embed your long-lived key in any client,\nbrowser or mobile.\n\nInternally this is the exact same pipeline as `/v1/chat` — same\nretrieval, safety, and grounding behavior. Nothing about answer quality\nchanges based on which endpoint you call.\n\nRate limits are communicated via `X-RateLimit-*` headers on every\nresponse and are shared with `/v1/chat` per API key\n(same rate-limit namespace, same key — see \"Rate limits\" above).\nWhen a 429 is returned, honour `Retry-After` before retrying.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/query","href":"/api-reference/ask-a-question/ask-a-question-—-one-shot-json-answer","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n strong: \"strong\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"One-shot, synchronous endpoint. Always returns \", _jsx(_components.code, {\n children: \"application/json\"\n }), \" (the\\n\", _jsx(_components.code, {\n children: \"SyncResponse\"\n }), \" shape) — there is no streaming mode and no \", _jsx(_components.code, {\n children: \"stream\"\n }), \" field.\\nThis is the recommended path for Claude Skills, MCP tool calls, agent\\npipelines, and any caller that wants the full answer before processing —\\nthe same contract as \", _jsx(_components.code, {\n children: \"stream: false\"\n }), \" on \", _jsx(_components.code, {\n children: \"POST /v1/chat\"\n }), \", promoted to its\\nown named path with a question-shaped request body. Both endpoints remain\\nfully supported; there is no deprecation or migration deadline for\\n\", _jsx(_components.code, {\n children: \"stream: false\"\n }), \" on \", _jsx(_components.code, {\n children: \"/v1/chat\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Server-to-server (the only supported pattern for web), or\\nnative-mobile-direct via a short-lived session token\"\n }), \" minted by\\nyour backend through \", _jsx(_components.code, {\n children: \"POST /v1/session-tokens\"\n }), \" (native mobile only,\\nnot browser/JS — see “API keys” above). Never embed your long-lived key in any client,\\nbrowser or mobile.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Internally this is the exact same pipeline as \", _jsx(_components.code, {\n children: \"/v1/chat\"\n }), \" — same\\nretrieval, safety, and grounding behavior. Nothing about answer quality\\nchanges based on which endpoint you call.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Rate limits are communicated via \", _jsx(_components.code, {\n children: \"X-RateLimit-*\"\n }), \" headers on every\\nresponse and are shared with \", _jsx(_components.code, {\n children: \"/v1/chat\"\n }), \" per API key\\n(same rate-limit namespace, same key — see “Rate limits” above).\\nWhen a 429 is returned, honour \", _jsx(_components.code, {\n children: \"Retry-After\"\n }), \" before retrying.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Ask a question — one-shot JSON answer","description":"One-shot, synchronous endpoint. Always returns `application/json` (the\n`SyncResponse` shape) — there is no streaming mode and no `stream` field.\nThis is the recommended path for Claude Skills, MCP tool calls, agent\npipelines, and any caller that wants the full answer before processing —\nthe same contract as `stream: false` on `POST /v1/chat`, promoted to its\nown named path with a question-shaped request body. Both endpoints remain\nfully supported; there is no deprecation or migration deadline for\n`stream: false` on `/v1/chat`.\n\n**Server-to-server (the only supported pattern for web), or\nnative-mobile-direct via a short-lived session token** minted by\nyour backend through `POST /v1/session-tokens` (native mobile only,\nnot browser/JS — see \"API keys\" above). Never embed your long-lived key in any client,\nbrowser or mobile.\n\nInternally this is the exact same pipeline as `/v1/chat` — same\nretrieval, safety, and grounding behavior. Nothing about answer quality\nchanges based on which endpoint you call.\n\nRate limits are communicated via `X-RateLimit-*` headers on every\nresponse and are shared with `/v1/chat` per API key\n(same rate-limit namespace, same key — see \"Rate limits\" above).\nWhen a 429 is returned, honour `Retry-After` before retrying.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/query","href":"/api-reference/ask-a-question/ask-a-question-—-one-shot-json-answer","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"postQuery","summary":"Ask a question — one-shot JSON answer","tags":["Ask a question"],"description":"One-shot, synchronous endpoint. Always returns `application/json` (the\n`SyncResponse` shape) — there is no streaming mode and no `stream` field.\nThis is the recommended path for Claude Skills, MCP tool calls, agent\npipelines, and any caller that wants the full answer before processing —\nthe same contract as `stream: false` on `POST /v1/chat`, promoted to its\nown named path with a question-shaped request body. Both endpoints remain\nfully supported; there is no deprecation or migration deadline for\n`stream: false` on `/v1/chat`.\n\n**Server-to-server (the only supported pattern for web), or\nnative-mobile-direct via a short-lived session token** minted by\nyour backend through `POST /v1/session-tokens` (native mobile only,\nnot browser/JS — see \"API keys\" above). Never embed your long-lived key in any client,\nbrowser or mobile.\n\nInternally this is the exact same pipeline as `/v1/chat` — same\nretrieval, safety, and grounding behavior. Nothing about answer quality\nchanges based on which endpoint you call.\n\nRate limits are communicated via `X-RateLimit-*` headers on every\nresponse and are shared with `/v1/chat` per API key\n(same rate-limit namespace, same key — see \"Rate limits\" above).\nWhen a 429 is returned, honour `Retry-After` before retrying.\n","security":["76a9de3d-a39e-4df7-9b56-918a8858c228"],"requestBody":"f54b7a26-5fb2-4b02-a82b-19970cfd6cff","responses":{"200":"1e38f20c-af7e-4a5b-803a-e66cb79b320c","400":"cec931fb-ca07-41de-9245-015d3cd8532a","401":"dff54ed4-5ce2-43fc-abd4-06e8fee4f009","403":"e4e023b1-434d-4b5a-90b4-dc4386e628f3","429":"df02c1a9-e53a-45f6-9763-ea50d06c8e2d","500":"82c9d369-2a79-456d-b1fc-564b839e1f4f","502":"affc804a-04c0-4403-a0f9-ed9bb2c2cee7","503":"d5d1bc25-cf15-4727-8c48-6bc09c6adecd"},"method":"post","type":"path","servers":["3aec66e8-ea38-412b-92a2-04eeb1a50e2f"],"path":"/v1/query","baseUrlOptions":["https://api.collectivex.health"],"title":"Ask a question — one-shot JSON answer","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","description":"Request body for POST /v1/query. Uses additionalProperties: false (mirrors\nZod .strict() on the server, matching ChatRequest's convention). Exactly\none of `question` or `messages` is required — not both. Retrieval tuning\nknobs are intentionally not accepted here either, for the same reason as\n/v1/chat: we curate retrieval, partners don't tune.\n","required":["question"],"properties":{"question":{"type":"string","minLength":1,"description":"A single question, plain string. The preferred shape for /v1/query\ncallers — no message envelope needed. Internally wrapped into a\nsingle-element UIMessage before being passed to the same pipeline\nthat /v1/chat uses, so behavior is identical to sending that text as\nthe sole message on /v1/chat.\n","isRequired":true,"uniqueKey":"oneOf.0.question","typeLabel":"string"},"messages":{"type":"array","description":"Single-element AI SDK v6 UIMessage array, provided for continuity\nwith callers already building /v1/chat request bodies who want to\nswitch endpoints with a minimal diff. Unlike /v1/chat, this array\nMUST contain exactly one message with role \"user\" — /v1/query has\nno multi-turn concept. Sending more than one message, or a message\nwith a different role, is a 400 invalid_request (use /v1/chat with\nstream:false instead if you need conversation history).\n","minItems":1,"maxItems":1,"items":{"type":"object","description":"AI SDK v6 UIMessage shape. id + role + parts are the load-bearing fields.\n`file` parts are rejected with `400 invalid_request` on every endpoint —\nthis API's contract is text questions in, grounded text answers out, and\nfile URLs are never forwarded upstream. Text parts (and, on replayed\nassistant history, the `data-*` parts our own stream emits) are accepted.\n","required":["id","role","parts"],"properties":{"id":{"type":"string","description":"Unique message identifier. AI SDK clients (e.g. useChat) auto-generate\nthis; raw HTTP callers MUST provide it (any opaque string — e.g. UUID,\npartner-side conversation row id). validateUIMessages rejects messages\nwithout an id.\n","isRequired":true,"uniqueKey":"oneOf.0.messages.items.[INDEX].id","typeLabel":"string"},"role":{"type":"string","enum":["user","assistant","system"],"description":"Message sender role.","isRequired":true,"uniqueKey":"oneOf.0.messages.items.[INDEX].role","typeLabel":"enum\u003cstring>"},"parts":{"type":"array","description":"Message content as an array of parts. Each part has a `type` field.\nFor user messages: use `{ \"type\": \"text\", \"text\": \"...\" }`.\nFor assistant messages: the API returns text-delta parts assembled into parts.\n","items":{"type":"object","description":"A single content part within a UIMessage.","required":["type"],"properties":{"type":{"type":"string","description":"Part type. Common values: \"text\", \"tool-invocation\", \"tool-result\".","isRequired":true,"uniqueKey":"oneOf.0.messages.items.[INDEX].parts.items.[INDEX].type","typeLabel":"string"},"text":{"type":"string","description":"Text content (present when type is \"text\").","uniqueKey":"oneOf.0.messages.items.[INDEX].parts.items.[INDEX].text","typeLabel":"string"}},"uniqueKey":"oneOf.0.messages.items.[INDEX].parts.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"oneOf.0.messages.items.[INDEX].parts","typeLabel":"object[]"}},"uniqueKey":"oneOf.0.messages.items.[INDEX]","typeLabel":"object"},"uniqueKey":"oneOf.0.messages","typeLabel":"object[]"},"response_format":{"type":"string","enum":["text","structured"],"default":"text","description":"**BETA.** When omitted or `\"text\"`, the response is byte-for-byte\nthe `SyncResponse` this endpoint has always returned — no behavior\nchange. When `\"structured\"`, the response ADDS a `structured_answer`\nfield (machine-readable sections/claims/citations) alongside the\nunchanged `answer`/`citations` fields; nothing is removed or\nreplaced. This field, and the shape it produces, may change in a\nfuture minor version while in beta.\n","uniqueKey":"oneOf.0.response_format","typeLabel":"enum\u003cstring>"}},"additionalProperties":false,"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","description":"Request body for POST /v1/query. Uses additionalProperties: false (mirrors\nZod .strict() on the server, matching ChatRequest's convention). Exactly\none of `question` or `messages` is required — not both. Retrieval tuning\nknobs are intentionally not accepted here either, for the same reason as\n/v1/chat: we curate retrieval, partners don't tune.\n","required":["messages"],"properties":{"messages":{"type":"array","description":"Single-element AI SDK v6 UIMessage array, provided for continuity\nwith callers already building /v1/chat request bodies who want to\nswitch endpoints with a minimal diff. Unlike /v1/chat, this array\nMUST contain exactly one message with role \"user\" — /v1/query has\nno multi-turn concept. Sending more than one message, or a message\nwith a different role, is a 400 invalid_request (use /v1/chat with\nstream:false instead if you need conversation history).\n","minItems":1,"maxItems":1,"items":{"type":"object","description":"AI SDK v6 UIMessage shape. id + role + parts are the load-bearing fields.\n`file` parts are rejected with `400 invalid_request` on every endpoint —\nthis API's contract is text questions in, grounded text answers out, and\nfile URLs are never forwarded upstream. Text parts (and, on replayed\nassistant history, the `data-*` parts our own stream emits) are accepted.\n","required":["id","role","parts"],"properties":{"id":{"type":"string","description":"Unique message identifier. AI SDK clients (e.g. useChat) auto-generate\nthis; raw HTTP callers MUST provide it (any opaque string — e.g. UUID,\npartner-side conversation row id). validateUIMessages rejects messages\nwithout an id.\n","isRequired":true,"uniqueKey":"oneOf.1.messages.items.[INDEX].id","typeLabel":"string"},"role":{"type":"string","enum":["user","assistant","system"],"description":"Message sender role.","isRequired":true,"uniqueKey":"oneOf.1.messages.items.[INDEX].role","typeLabel":"enum\u003cstring>"},"parts":{"type":"array","description":"Message content as an array of parts. Each part has a `type` field.\nFor user messages: use `{ \"type\": \"text\", \"text\": \"...\" }`.\nFor assistant messages: the API returns text-delta parts assembled into parts.\n","items":{"type":"object","description":"A single content part within a UIMessage.","required":["type"],"properties":{"type":{"type":"string","description":"Part type. Common values: \"text\", \"tool-invocation\", \"tool-result\".","isRequired":true,"uniqueKey":"oneOf.1.messages.items.[INDEX].parts.items.[INDEX].type","typeLabel":"string"},"text":{"type":"string","description":"Text content (present when type is \"text\").","uniqueKey":"oneOf.1.messages.items.[INDEX].parts.items.[INDEX].text","typeLabel":"string"}},"uniqueKey":"oneOf.1.messages.items.[INDEX].parts.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"oneOf.1.messages.items.[INDEX].parts","typeLabel":"object[]"}},"uniqueKey":"oneOf.1.messages.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"oneOf.1.messages","typeLabel":"object[]"},"question":{"type":"string","minLength":1,"description":"A single question, plain string. The preferred shape for /v1/query\ncallers — no message envelope needed. Internally wrapped into a\nsingle-element UIMessage before being passed to the same pipeline\nthat /v1/chat uses, so behavior is identical to sending that text as\nthe sole message on /v1/chat.\n","uniqueKey":"oneOf.1.question","typeLabel":"string"},"response_format":{"type":"string","enum":["text","structured"],"default":"text","description":"**BETA.** When omitted or `\"text\"`, the response is byte-for-byte\nthe `SyncResponse` this endpoint has always returned — no behavior\nchange. When `\"structured\"`, the response ADDS a `structured_answer`\nfield (machine-readable sections/claims/citations) alongside the\nunchanged `answer`/`citations` fields; nothing is removed or\nreplaced. This field, and the shape it produces, may change in a\nfuture minor version while in beta.\n","uniqueKey":"oneOf.1.response_format","typeLabel":"enum\u003cstring>"}},"additionalProperties":false,"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"examples":{"single_question":{"title":"single_question","value":{"question":"What does the research say about magnesium for perimenopause sleep?"}},"single_element_messages":{"title":"single_element_messages","value":{"messages":[{"id":"msg_smoke_1","role":"user","parts":[{"type":"text","text":"How does luteal-phase progesterone affect sleep?"}]}]}},"structured_response_format":{"title":"structured_response_format","value":{"question":"What does the research say about magnesium for perimenopause sleep?","response_format":"structured"}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"1e38f20c-af7e-4a5b-803a-e66cb79b320c":{"description":"OK. Always `application/json` — the `SyncResponse` flat envelope.\nNo `stream` negotiation; this endpoint has exactly one response shape.\n","headers":{"X-Request-Id":{"description":"UUID correlation key for this request (propagated to PostHog + Langfuse).","required":true,"schema":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"}},"X-RateLimit-Limit":{"description":"Maximum requests per minute for this key (shared budget with /v1/chat, /v1/jobs/{id}, and /v1/session-tokens; per-key configurable, default 60).","required":true,"schema":{"type":"integer","example":60}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current per-minute rate-limit window.","required":true,"schema":{"type":"integer","example":59}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) when the per-minute rate-limit window resets.","required":true,"schema":{"type":"integer","example":1717000060}},"X-RateLimit-Limit-Daily":{"description":"Present only when this key has a configured daily (rpd) budget. Maximum requests per day.","required":false,"schema":{"type":"integer","example":5000}},"X-RateLimit-Remaining-Daily":{"description":"Present only when this key has a configured daily (rpd) budget. Requests remaining in the current day's window.","required":false,"schema":{"type":"integer","example":4321}},"X-RateLimit-Reset-Daily":{"description":"Present only when this key has a configured daily (rpd) budget. Unix timestamp (seconds) when the daily window resets.","required":false,"schema":{"type":"integer","example":1717003600}}},"content":{"application/json":{"schema":{"type":"object","description":"`/v1/query`'s response — the shared `SyncResponse` shape plus the\nBETA `structured_answer` field. Defined as its own schema (rather\nthan putting `structured_answer` on `SyncResponse` directly) so\nclients generated from this spec do not advertise `structured_answer`\non `/v1/chat`, which has no `response_format` field and can never\nproduce it.\n","required":["request_id","answer","citations"],"properties":{"request_id":{"type":"string","format":"uuid","description":"UUID minted per request. Use for support correlation across PostHog / Langfuse / logs.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string\u003cuuid>"},"answer":{"type":"string","description":"The model's answer string. Empty string (\"\") on deferral or crisis short-circuit\n(the pipeline refuses to generate an answer without grounded evidence).\n","isRequired":true,"uniqueKey":"answer","typeLabel":"string"},"citations":{"type":"array","description":"Retrieved citations from the peer-reviewed corpus. Empty array on deferral or crisis.\nNever fabricate or paraphrase a citation that is not in this array.\n","items":{"type":"object","description":"A single research citation from the CollectiveX Health corpus.","required":["id","score","text"],"properties":{"id":{"type":"string","description":"Corpus-internal citation ID (e.g. \"CXH-00835\"). Use as an inline citation reference.","isRequired":true,"uniqueKey":"citations.items.[INDEX].id","typeLabel":"string"},"score":{"type":"number","format":"float","minimum":0,"maximum":1,"description":"Retrieval relevance score. Higher is more relevant.","isRequired":true,"uniqueKey":"citations.items.[INDEX].score","typeLabel":"number\u003cfloat>"},"text":{"type":"string","description":"Excerpt from the source paper used to ground the answer.","isRequired":true,"uniqueKey":"citations.items.[INDEX].text","typeLabel":"string"},"metadata":{"type":"object","description":"Bibliographic metadata. Strict allowlist — fields not listed here are\nstripped at the `/v1/*` boundary so partners never see Agentset-internal\nfield names. Source of truth: `lib/api/v1/citation-sanitizer.ts`\n(`PARTNER_METADATA_ALLOWLIST`).\n","additionalProperties":false,"properties":{"cxh_id":{"type":"string","description":"Canonical paper identifier in the CollectiveX Health corpus.","example":"CXH-00835","uniqueKey":"citations.items.[INDEX].metadata.cxh_id","typeLabel":"string"},"doi":{"type":"string","description":"Peer-reviewed DOI of the source paper.","example":"10.1093/humrep/dead156","uniqueKey":"citations.items.[INDEX].metadata.doi","typeLabel":"string"},"year":{"type":"string","description":"Publication year as it appears in the corpus catalog. Emitted as a\nstring at runtime (#191) — partners that want a number should\n`parseInt(year, 10)` on the partner side. The corpus also includes\nnon-numeric values like `\"in press\"` for unpublished work.\n","example":"2023","uniqueKey":"citations.items.[INDEX].metadata.year","typeLabel":"string"},"journal":{"type":"string","description":"Peer-review journal name.","example":"Human Reproduction","uniqueKey":"citations.items.[INDEX].metadata.journal","typeLabel":"string"},"authors":{"oneOf":[{"type":"string","description":"Author list — either a single joined string or an array of\nauthor strings; both forms occur in corpus metadata.\n","example":"Shultz et al.","uniqueKey":"citations.items.[INDEX].metadata.authors.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"string","uniqueKey":"citations.items.[INDEX].metadata.authors.oneOf.1.items.[INDEX]","typeLabel":"string"},"description":"Author list — either a single joined string or an array of\nauthor strings; both forms occur in corpus metadata.\n","example":"Shultz et al.","uniqueKey":"citations.items.[INDEX].metadata.authors.oneOf.1","typeLabel":"string[]"}],"uniqueKey":"citations.items.[INDEX].metadata.authors","typeLabel":"string | string[]"},"title":{"type":"string","description":"Paper title.","example":"Sex hormone profiles in normal menstruating females","uniqueKey":"citations.items.[INDEX].metadata.title","typeLabel":"string"},"page_number":{"type":"integer","description":"Page within the source paper this excerpt came from.","example":4,"uniqueKey":"citations.items.[INDEX].metadata.page_number","typeLabel":"integer"}},"uniqueKey":"citations.items.[INDEX].metadata","typeLabel":"object"}},"uniqueKey":"citations.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"citations","typeLabel":"object[]"},"deferral":{"oneOf":[{"type":"null","description":"Present when the corpus lacks strong evidence for the query. Present the originalQuery\nback to the user and do not synthesize an answer from training data.\n","uniqueKey":"deferral.oneOf.0","typeLabel":"null"},{"type":"object","description":"Present when the corpus lacks strong evidence for the query. Present the originalQuery\nback to the user and do not synthesize an answer from training data.\n","required":["originalQuery"],"properties":{"originalQuery":{"type":"string","description":"The query that triggered the deferral.","isRequired":true,"uniqueKey":"deferral.oneOf.1.originalQuery","typeLabel":"string"}},"uniqueKey":"deferral.oneOf.1","typeLabel":"object"}],"uniqueKey":"deferral","typeLabel":"null | object"},"crisis":{"oneOf":[{"type":"null","description":"Present when a safety classifier fires before retrieval (self-harm, acute symptoms,\nIPV). Show the resources verbatim and route the user away from research framing.\n","uniqueKey":"crisis.oneOf.0","typeLabel":"null"},{"type":"object","description":"Present when a safety classifier fires before retrieval (self-harm, acute symptoms,\nIPV). Show the resources verbatim and route the user away from research framing.\n","required":["category","locale","originalQuery","resources"],"properties":{"category":{"type":"string","enum":["self-harm","acute-symptom","ipv"],"description":"Safety category that triggered the classifier.","isRequired":true,"uniqueKey":"crisis.oneOf.1.category","typeLabel":"enum\u003cstring>"},"locale":{"type":"string","description":"Detected locale (e.g. \"US\", \"GB\"). Used to select region-appropriate resources.","example":"US","isRequired":true,"uniqueKey":"crisis.oneOf.1.locale","typeLabel":"string"},"originalQuery":{"type":"string","description":"The query that triggered the crisis classifier.","isRequired":true,"uniqueKey":"crisis.oneOf.1.originalQuery","typeLabel":"string"},"resources":{"type":"array","description":"Crisis resources to show verbatim. Never omit or reorder.","items":{"type":"object","description":"A single crisis support resource. Render verbatim — do not reorder, summarise, or\nomit fields. Source of truth: `lib/safety/crisis-resources.ts`.\n","required":["region","name","description"],"properties":{"region":{"type":"string","enum":["US","UK","global"],"description":"Region this resource applies to.","example":"US","isRequired":true,"uniqueKey":"crisis.oneOf.1.resources.items.[INDEX].region","typeLabel":"enum\u003cstring>"},"name":{"type":"string","description":"Human-readable resource name.","example":"988 Suicide \u0026 Crisis Lifeline","isRequired":true,"uniqueKey":"crisis.oneOf.1.resources.items.[INDEX].name","typeLabel":"string"},"description":{"type":"string","description":"Short context line shown next to the resource.","example":"24/7 free, confidential support for people in distress.","isRequired":true,"uniqueKey":"crisis.oneOf.1.resources.items.[INDEX].description","typeLabel":"string"},"phone":{"type":"string","description":"Phone or SMS contact (optional). Format varies by region.","example":"988","uniqueKey":"crisis.oneOf.1.resources.items.[INDEX].phone","typeLabel":"string"},"hours":{"type":"string","description":"Operating hours, when not 24/7 (optional).","example":"Mon–Fri 9am–5pm ET","uniqueKey":"crisis.oneOf.1.resources.items.[INDEX].hours","typeLabel":"string"}},"uniqueKey":"crisis.oneOf.1.resources.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"crisis.oneOf.1.resources","typeLabel":"object[]"}},"uniqueKey":"crisis.oneOf.1","typeLabel":"object"}],"uniqueKey":"crisis","typeLabel":"null | object"},"error":{"description":"Present when the generation pipeline emitted an error (v1.1, optional). The message\nis always a generic sanitized string — internal error details are never exposed.\nWith no usable content the response status is 502; alongside a partial answer or a\ndeferral/crisis short-circuit the status stays 200 and this field flags the failure.\n","type":"object","required":["message"],"properties":{"message":{"type":"string","description":"Generic human-readable failure message. Safe to display; do not parse.","example":"Generation failed. Please retry.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"},"structured_answer":{"type":"object","description":"**BETA.** Present only when the request set\n`response_format: \"structured\"` (see `QueryRequest.response_format`).\nFor structured-mode consumers, `structured_answer.status` is the\nauthoritative outcome — do not also branch on the legacy\ntop-level `answer`/`error` fields, which keep text-mode\nsemantics unchanged and can disagree with `status` on\ntruncated generations.\nAbsent — not null — on every request that omits it or sends\n`response_format: \"text\"`, which is every request today: this field\nis purely additive and never changes the meaning of `answer` or\n`citations`.\n","required":["format","format_version","schema_version","status","sections","citations","deferral","crisis","error","disclaimer"],"properties":{"format":{"type":"string","description":"Which adapter rendered this payload. `\"generic\"` is the self-service public shape.","example":"generic","isRequired":true,"uniqueKey":"structured_answer.format","typeLabel":"string"},"format_version":{"type":"string","description":"Bumped when this adapter's rendered shape changes in a breaking way.","example":"1","isRequired":true,"uniqueKey":"structured_answer.format_version","typeLabel":"string"},"schema_version":{"type":"string","description":"Canonical answer schema version (`lib/partner-format/canonical.ts`).","example":"1","isRequired":true,"uniqueKey":"structured_answer.schema_version","typeLabel":"string"},"status":{"type":"string","enum":["answered","ungrounded","deferral","crisis","error"],"description":"REQUIRED discriminant. `\"answered\"` — a grounded answer with at\nleast one citation. `\"ungrounded\"` — a real, non-empty answer with\nzero citations; kept distinct from `\"answered\"` so a partner can\nchoose not to present it as evidence-backed. `\"deferral\"` — the\ncorpus lacked strong evidence; no answer was synthesized.\n`\"crisis\"` — the crisis classifier short-circuited before\nretrieval. `\"error\"` — the pipeline emitted an error chunk\n(model/execute failure, mid-stream or outright); `sections` and\n`citations` are always empty in this state — a truncated or\npartial answer is never packaged as a grounded claim, even when\nthe top-level `answer` field (unaffected by `response_format`)\nstill carries a partial fragment for a text-mode caller.\n","example":"answered","isRequired":true,"uniqueKey":"structured_answer.status","typeLabel":"enum\u003cstring>"},"sections":{"type":"array","description":"The answer broken into sections. Today's pipeline emits one markdown\nanswer with no section boundaries, so a normal answer is always a\nsingle-element array; the shape supports more so a future\nmulti-section generation step needs no new schema. Empty when\n`status` is `\"error\"`; exactly one synthetic section when `status`\nis `\"deferral\"` or `\"crisis\"` (see `StructuredSection.kind`).\n","items":{"type":"object","description":"A single section of a structured answer.","required":["id","kind","heading","body","claims"],"properties":{"id":{"type":"string","example":"section-1","isRequired":true,"uniqueKey":"structured_answer.sections.items.[INDEX].id","typeLabel":"string"},"kind":{"type":"string","enum":["answer","crisis","deferral"],"description":"`\"answer\"` is real, model-generated or corpus-grounded content.\n`\"crisis\"` / `\"deferral\"` are synthetic sections carrying\npre-approved safety copy — present so a client that renders\n`sections[].body` and nothing else still shows something instead\nof a blank card. `StructuredAnswer.status` is still the\nauthoritative discriminant; `kind` exists for section-only\nrenderers.\n","example":"answer","isRequired":true,"uniqueKey":"structured_answer.sections.items.[INDEX].kind","typeLabel":"enum\u003cstring>"},"heading":{"oneOf":[{"type":"string","description":"Null when the answer has no distinct heading (today's default).","isRequired":true,"uniqueKey":"structured_answer.sections.items.[INDEX].heading.oneOf.0","typeLabel":"string"},{"type":"null","description":"Null when the answer has no distinct heading (today's default).","isRequired":true,"uniqueKey":"structured_answer.sections.items.[INDEX].heading.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"structured_answer.sections.items.[INDEX].heading","typeLabel":"string | null"},"body":{"type":"string","description":"Full markdown/plain text body of this section.","isRequired":true,"uniqueKey":"structured_answer.sections.items.[INDEX].body","typeLabel":"string"},"claims":{"type":"array","description":"Claims within this section, each bound to the citation ids that\nground it. Today's pipeline has no per-claim generation step, so\nthis is at most one claim covering the whole section body, bound to\nevery citation returned for the answer — never a fabricated\nsentence-level binding. A section with no supporting citations has\nzero claims, not a claim with an empty `citation_ids`. Always empty\non a `\"crisis\"`/`\"deferral\"` `kind` section.\n","items":{"type":"object","required":["id","text","citation_ids"],"properties":{"id":{"type":"string","example":"claim-1","isRequired":true,"uniqueKey":"structured_answer.sections.items.[INDEX].claims.items.[INDEX].id","typeLabel":"string"},"text":{"type":"string","description":"The claim text (today, the full section body).","isRequired":true,"uniqueKey":"structured_answer.sections.items.[INDEX].claims.items.[INDEX].text","typeLabel":"string"},"citation_ids":{"type":"array","description":"Ids into this response's `citations` array that ground this claim.","items":{"type":"string","uniqueKey":"structured_answer.sections.items.[INDEX].claims.items.[INDEX].citation_ids.items.[INDEX]","typeLabel":"string"},"example":["CXH-00835"],"isRequired":true,"uniqueKey":"structured_answer.sections.items.[INDEX].claims.items.[INDEX].citation_ids","typeLabel":"string[]"}},"uniqueKey":"structured_answer.sections.items.[INDEX].claims.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"structured_answer.sections.items.[INDEX].claims","typeLabel":"object[]"}},"uniqueKey":"structured_answer.sections.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"structured_answer.sections","typeLabel":"object[]"},"citations":{"type":"array","description":"Same citations as the top-level `citations` field, reshaped through\nthe same `Citation` schema — no new citation shape, no new sanitizer.\nEmpty unless `status` is `\"answered\"` or `\"ungrounded\"`.\n","items":{"type":"object","description":"A single research citation from the CollectiveX Health corpus.","required":["id","score","text"],"properties":{"id":{"type":"string","description":"Corpus-internal citation ID (e.g. \"CXH-00835\"). Use as an inline citation reference.","isRequired":true,"uniqueKey":"structured_answer.citations.items.[INDEX].id","typeLabel":"string"},"score":{"type":"number","format":"float","minimum":0,"maximum":1,"description":"Retrieval relevance score. Higher is more relevant.","isRequired":true,"uniqueKey":"structured_answer.citations.items.[INDEX].score","typeLabel":"number\u003cfloat>"},"text":{"type":"string","description":"Excerpt from the source paper used to ground the answer.","isRequired":true,"uniqueKey":"structured_answer.citations.items.[INDEX].text","typeLabel":"string"},"metadata":{"type":"object","description":"Bibliographic metadata. Strict allowlist — fields not listed here are\nstripped at the `/v1/*` boundary so partners never see Agentset-internal\nfield names. Source of truth: `lib/api/v1/citation-sanitizer.ts`\n(`PARTNER_METADATA_ALLOWLIST`).\n","additionalProperties":false,"properties":{"cxh_id":{"type":"string","description":"Canonical paper identifier in the CollectiveX Health corpus.","example":"CXH-00835","uniqueKey":"structured_answer.citations.items.[INDEX].metadata.cxh_id","typeLabel":"string"},"doi":{"type":"string","description":"Peer-reviewed DOI of the source paper.","example":"10.1093/humrep/dead156","uniqueKey":"structured_answer.citations.items.[INDEX].metadata.doi","typeLabel":"string"},"year":{"type":"string","description":"Publication year as it appears in the corpus catalog. Emitted as a\nstring at runtime (#191) — partners that want a number should\n`parseInt(year, 10)` on the partner side. The corpus also includes\nnon-numeric values like `\"in press\"` for unpublished work.\n","example":"2023","uniqueKey":"structured_answer.citations.items.[INDEX].metadata.year","typeLabel":"string"},"journal":{"type":"string","description":"Peer-review journal name.","example":"Human Reproduction","uniqueKey":"structured_answer.citations.items.[INDEX].metadata.journal","typeLabel":"string"},"authors":{"oneOf":[{"type":"string","description":"Author list — either a single joined string or an array of\nauthor strings; both forms occur in corpus metadata.\n","example":"Shultz et al.","uniqueKey":"structured_answer.citations.items.[INDEX].metadata.authors.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"string","uniqueKey":"structured_answer.citations.items.[INDEX].metadata.authors.oneOf.1.items.[INDEX]","typeLabel":"string"},"description":"Author list — either a single joined string or an array of\nauthor strings; both forms occur in corpus metadata.\n","example":"Shultz et al.","uniqueKey":"structured_answer.citations.items.[INDEX].metadata.authors.oneOf.1","typeLabel":"string[]"}],"uniqueKey":"structured_answer.citations.items.[INDEX].metadata.authors","typeLabel":"string | string[]"},"title":{"type":"string","description":"Paper title.","example":"Sex hormone profiles in normal menstruating females","uniqueKey":"structured_answer.citations.items.[INDEX].metadata.title","typeLabel":"string"},"page_number":{"type":"integer","description":"Page within the source paper this excerpt came from.","example":4,"uniqueKey":"structured_answer.citations.items.[INDEX].metadata.page_number","typeLabel":"integer"}},"uniqueKey":"structured_answer.citations.items.[INDEX].metadata","typeLabel":"object"}},"uniqueKey":"structured_answer.citations.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"structured_answer.citations","typeLabel":"object[]"},"deferral":{"oneOf":[{"type":"null","description":"Same semantics as the top-level `deferral` field, mirrored here.","isRequired":true,"uniqueKey":"structured_answer.deferral.oneOf.0","typeLabel":"null"},{"type":"object","description":"Same semantics as the top-level `deferral` field, mirrored here.","required":["originalQuery"],"properties":{"originalQuery":{"type":"string","description":"The query that triggered the deferral.","isRequired":true,"uniqueKey":"structured_answer.deferral.oneOf.1.originalQuery","typeLabel":"string"}},"isRequired":true,"uniqueKey":"structured_answer.deferral.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"structured_answer.deferral","typeLabel":"null | object"},"crisis":{"oneOf":[{"type":"null","description":"Same semantics as the top-level `crisis` field, mirrored here.","isRequired":true,"uniqueKey":"structured_answer.crisis.oneOf.0","typeLabel":"null"},{"type":"object","description":"Same semantics as the top-level `crisis` field, mirrored here.","required":["category","locale","originalQuery","resources"],"properties":{"category":{"type":"string","enum":["self-harm","acute-symptom","ipv"],"description":"Safety category that triggered the classifier.","isRequired":true,"uniqueKey":"structured_answer.crisis.oneOf.1.category","typeLabel":"enum\u003cstring>"},"locale":{"type":"string","description":"Detected locale (e.g. \"US\", \"GB\"). Used to select region-appropriate resources.","example":"US","isRequired":true,"uniqueKey":"structured_answer.crisis.oneOf.1.locale","typeLabel":"string"},"originalQuery":{"type":"string","description":"The query that triggered the crisis classifier.","isRequired":true,"uniqueKey":"structured_answer.crisis.oneOf.1.originalQuery","typeLabel":"string"},"resources":{"type":"array","description":"Crisis resources to show verbatim. Never omit or reorder.","items":{"type":"object","description":"A single crisis support resource. Render verbatim — do not reorder, summarise, or\nomit fields. Source of truth: `lib/safety/crisis-resources.ts`.\n","required":["region","name","description"],"properties":{"region":{"type":"string","enum":["US","UK","global"],"description":"Region this resource applies to.","example":"US","isRequired":true,"uniqueKey":"structured_answer.crisis.oneOf.1.resources.items.[INDEX].region","typeLabel":"enum\u003cstring>"},"name":{"type":"string","description":"Human-readable resource name.","example":"988 Suicide \u0026 Crisis Lifeline","isRequired":true,"uniqueKey":"structured_answer.crisis.oneOf.1.resources.items.[INDEX].name","typeLabel":"string"},"description":{"type":"string","description":"Short context line shown next to the resource.","example":"24/7 free, confidential support for people in distress.","isRequired":true,"uniqueKey":"structured_answer.crisis.oneOf.1.resources.items.[INDEX].description","typeLabel":"string"},"phone":{"type":"string","description":"Phone or SMS contact (optional). Format varies by region.","example":"988","uniqueKey":"structured_answer.crisis.oneOf.1.resources.items.[INDEX].phone","typeLabel":"string"},"hours":{"type":"string","description":"Operating hours, when not 24/7 (optional).","example":"Mon–Fri 9am–5pm ET","uniqueKey":"structured_answer.crisis.oneOf.1.resources.items.[INDEX].hours","typeLabel":"string"}},"uniqueKey":"structured_answer.crisis.oneOf.1.resources.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"structured_answer.crisis.oneOf.1.resources","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"structured_answer.crisis.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"structured_answer.crisis","typeLabel":"null | object"},"error":{"oneOf":[{"type":"null","description":"Populated only when `status` is `\"error\"`; `null` otherwise.\nMirrors the top-level `error` field verbatim — the same generic,\nsanitized message, never raw internal error text.\n","isRequired":true,"uniqueKey":"structured_answer.error.oneOf.0","typeLabel":"null"},{"type":"object","description":"Populated only when `status` is `\"error\"`; `null` otherwise.\nMirrors the top-level `error` field verbatim — the same generic,\nsanitized message, never raw internal error text.\n","required":["message"],"properties":{"message":{"type":"string","description":"Generic, sanitized failure message — safe to display, never parsed.","example":"Generation failed. Please retry.","isRequired":true,"uniqueKey":"structured_answer.error.oneOf.1.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"structured_answer.error.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"structured_answer.error","typeLabel":"null | object"},"disclaimer":{"oneOf":[{"type":"null","description":"A versioned \"research summary, not medical advice\" notice.\nPopulated only when `status` is `\"answered\"` or `\"ungrounded\"`\n(i.e. `sections` carries real answer content); `null` for\ndeferral/crisis/error, which carry their own dedicated safety\nframing instead.\n","isRequired":true,"uniqueKey":"structured_answer.disclaimer.oneOf.0","typeLabel":"null"},{"type":"object","description":"A versioned \"research summary, not medical advice\" notice.\nPopulated only when `status` is `\"answered\"` or `\"ungrounded\"`\n(i.e. `sections` carries real answer content); `null` for\ndeferral/crisis/error, which carry their own dedicated safety\nframing instead.\n","required":["text","version"],"properties":{"text":{"type":"string","example":"Research summary, not medical advice. Consult your clinician for personal health decisions.","isRequired":true,"uniqueKey":"structured_answer.disclaimer.oneOf.1.text","typeLabel":"string"},"version":{"type":"integer","description":"Bumped whenever the disclaimer copy changes.","example":1,"isRequired":true,"uniqueKey":"structured_answer.disclaimer.oneOf.1.version","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"structured_answer.disclaimer.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"structured_answer.disclaimer","typeLabel":"null | object"}},"uniqueKey":"structured_answer","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"grounded_sync":{"title":"grounded_sync","value":{"request_id":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","answer":"Progesterone during the luteal phase has a thermogenic effect...","citations":[{"id":"CXH-00835","score":0.92,"text":"Transdermal estradiol was associated with significant reductions...","metadata":{"cxh_id":"CXH-00835","doi":"10.1093/humrep/dead156","year":"2023"}}]}},"deferral_sync":{"title":"deferral_sync","value":{"request_id":"b2c3d4e5-f6a7-8901-bcde-f12345678901","answer":"","citations":[],"deferral":{"originalQuery":"How do I lose weight fast?"}}},"crisis_sync":{"title":"crisis_sync","value":{"request_id":"c3d4e5f6-a7b8-9012-cdef-123456789012","answer":"","citations":[],"crisis":{"category":"self-harm","locale":"US","originalQuery":"I want to hurt myself","resources":[{"region":"US","name":"988 Suicide \u0026 Crisis Lifeline","description":"24/7 free, confidential support for people in distress.","phone":"988"}]}}},"structured_sync":{"title":"structured_sync","value":{"request_id":"e5f6a7b8-c9d0-1234-ef01-345678901234","answer":"Magnesium supplementation has been associated with modest improvements in sleep...","citations":[{"id":"CXH-00835","score":0.92,"text":"Transdermal estradiol was associated with significant reductions...","metadata":{"cxh_id":"CXH-00835","doi":"10.1093/humrep/dead156","year":"2023"}}],"structured_answer":{"format":"generic","format_version":"1","schema_version":"1","status":"answered","sections":[{"id":"section-1","kind":"answer","heading":null,"body":"Magnesium supplementation has been associated with modest improvements in sleep...","claims":[{"id":"claim-1","text":"Magnesium supplementation has been associated with modest improvements in sleep...","citation_ids":["CXH-00835"]}]}],"citations":[{"id":"CXH-00835","score":0.92,"text":"Transdermal estradiol was associated with significant reductions...","metadata":{"cxh_id":"CXH-00835","doi":"10.1093/humrep/dead156","year":"2023"}}],"deferral":null,"crisis":null,"error":null,"disclaimer":{"text":"Research summary, not medical advice. Consult your clinician for personal health decisions.","version":1}}}},"structured_crisis_sync":{"title":"structured_crisis_sync","value":{"request_id":"f6a7b8c9-d0e1-2345-f012-456789012345","answer":"","citations":[],"crisis":{"category":"self-harm","locale":"US","originalQuery":"I want to hurt myself","resources":[{"region":"US","name":"988 Suicide \u0026 Crisis Lifeline","description":"24/7 free, confidential support for people in distress.","phone":"988"}]},"structured_answer":{"format":"generic","format_version":"1","schema_version":"1","status":"crisis","sections":[{"id":"crisis-1","kind":"crisis","heading":null,"body":"What you're describing sounds really hard. Please consider reaching out to someone who can help right now.\n\n988 Suicide \u0026 Crisis Lifeline \nCall or text: 988 \n24/7 free, confidential support for people in distress.\n\nAfter you've reached out, you're welcome to continue here.","claims":[]}],"citations":[],"deferral":null,"crisis":{"category":"self-harm","locale":"US","originalQuery":"I want to hurt myself","resources":[{"region":"US","name":"988 Suicide \u0026 Crisis Lifeline","description":"24/7 free, confidential support for people in distress.","phone":"988"}]},"error":null,"disclaimer":null}}}},"exampleType":"examples"}},"exampleType":"examples"},"cec931fb-ca07-41de-9245-015d3cd8532a":{"description":"400 Bad Request. The request body failed Zod .strict() validation. The error message\nnames the offending field (e.g. \"Unknown field: topK\"). Fix the request body.\n","headers":{"X-Request-Id":{"description":"Request UUID.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","description":"Standard partner API error envelope (D-09). Mirrors Anthropic/OpenAI error shape.\nParse `error.code` for machine-readable error classification.\n","required":["error"],"properties":{"error":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string","description":"Machine-readable error code (D-10 locked enum). Use this for branching logic.\nAdding new codes is a minor version bump per the versioning policy.\n","enum":["unauthorized","forbidden","rate_limited","invalid_request","corpus_unavailable","grounding_deferral","crisis_resources","not_found","internal_error"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable error description. Use for logging; do not parse programmatically.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","format":"uuid","description":"UUID for this request. Include when contacting support.","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string\u003cuuid>"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"invalid_request","message":"Unknown field: topK. The /v1/chat endpoint does not accept retrieval tuning parameters.","request_id":"550e8400-e29b-41d4-a716-446655440000"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"invalid_request","message":"Unknown field: topK. The /v1/chat endpoint does not accept retrieval tuning parameters.","request_id":"550e8400-e29b-41d4-a716-446655440000"}}}},"exampleType":"examples"}},"exampleType":"examples"},"dff54ed4-5ce2-43fc-abd4-06e8fee4f009":{"description":"401 Unauthorized. Missing, malformed, or invalid API key. Check that the Authorization\nheader is present and has the form `Bearer \u003ckey>`. An EXPIRED session token also\nreturns 401, with an \"API key expired\" message — session-token clients should treat\nthat specific message as \"request a fresh token from your backend\", not as an alert.\nSession tokens additionally return 401 whenever the session-token feature is disabled\n(the feature flag is a kill switch for outstanding keys).\n","headers":{"X-Request-Id":{"description":"Request UUID.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","description":"Standard partner API error envelope (D-09). Mirrors Anthropic/OpenAI error shape.\nParse `error.code` for machine-readable error classification.\n","required":["error"],"properties":{"error":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string","description":"Machine-readable error code (D-10 locked enum). Use this for branching logic.\nAdding new codes is a minor version bump per the versioning policy.\n","enum":["unauthorized","forbidden","rate_limited","invalid_request","corpus_unavailable","grounding_deferral","crisis_resources","not_found","internal_error"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable error description. Use for logging; do not parse programmatically.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","format":"uuid","description":"UUID for this request. Include when contacting support.","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string\u003cuuid>"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"unauthorized","message":"Missing or malformed Authorization header. Expected: Bearer \u003ckey>","request_id":"550e8400-e29b-41d4-a716-446655440000"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"unauthorized","message":"Missing or malformed Authorization header. Expected: Bearer \u003ckey>","request_id":"550e8400-e29b-41d4-a716-446655440000"}}}},"exampleType":"examples"}},"exampleType":"examples"},"e4e023b1-434d-4b5a-90b4-dc4386e628f3":{"description":"403 Forbidden. Key is valid but does not have permission for this operation. Four\ncases, distinguishable by `error.message`: (1) the key's scope excludes this\nendpoint — e.g. a session token calling anything other than /v1/query or /v1/chat,\nincluding /v1/session-tokens itself; (2) the key's total request allowance is\nexhausted (\"…allowance is exhausted. Mint a new session token.\" — permanent for\nthat key, do not retry; mint a new token); (3) \"This session token is not usable.\nMint a new one.\" — a SERVER-SIDE provisioning fault, not a client mistake: do NOT\nre-mint in a loop (each mint is a metered request and the replacement will fail the\nsame way) — surface the error and contact partners@collectivex.health; (4) an\naccount-level restriction — contact partners@collectivex.health.\n","headers":{"X-Request-Id":{"description":"Request UUID.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","description":"Standard partner API error envelope (D-09). Mirrors Anthropic/OpenAI error shape.\nParse `error.code` for machine-readable error classification.\n","required":["error"],"properties":{"error":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string","description":"Machine-readable error code (D-10 locked enum). Use this for branching logic.\nAdding new codes is a minor version bump per the versioning policy.\n","enum":["unauthorized","forbidden","rate_limited","invalid_request","corpus_unavailable","grounding_deferral","crisis_resources","not_found","internal_error"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable error description. Use for logging; do not parse programmatically.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","format":"uuid","description":"UUID for this request. Include when contacting support.","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string\u003cuuid>"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"forbidden","message":"This key does not have permission to access /v1/chat.","request_id":"550e8400-e29b-41d4-a716-446655440000"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"forbidden","message":"This key does not have permission to access /v1/chat.","request_id":"550e8400-e29b-41d4-a716-446655440000"}}}},"exampleType":"examples"}},"exampleType":"examples"},"df02c1a9-e53a-45f6-9763-ea50d06c8e2d":{"description":"429 Too Many Requests. Rate limit exceeded. Read the Retry-After header (seconds)\nbefore retrying. Also check X-RateLimit-Remaining on successful responses to\nself-throttle before hitting 429. Limits are per-key configurable (a partner may\nhave a non-default requests-per-minute ceiling and/or a requests-per-day ceiling);\nX-RateLimit-* on this response always reflects whichever budget was exceeded.\n","headers":{"Retry-After":{"description":"Seconds until the rate-limit window resets. Wait this long before retrying.","required":true,"schema":{"type":"integer","example":37}},"X-Request-Id":{"description":"Request UUID.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum requests for the window that was exceeded (per-minute by default, or per-day if this key has a daily budget and that's what was hit).","schema":{"type":"integer","example":60}},"X-RateLimit-Remaining":{"description":"Requests remaining (0 when rate-limited).","schema":{"type":"integer","example":0}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","description":"Standard partner API error envelope (D-09). Mirrors Anthropic/OpenAI error shape.\nParse `error.code` for machine-readable error classification.\n","required":["error"],"properties":{"error":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string","description":"Machine-readable error code (D-10 locked enum). Use this for branching logic.\nAdding new codes is a minor version bump per the versioning policy.\n","enum":["unauthorized","forbidden","rate_limited","invalid_request","corpus_unavailable","grounding_deferral","crisis_resources","not_found","internal_error"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable error description. Use for logging; do not parse programmatically.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","format":"uuid","description":"UUID for this request. Include when contacting support.","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string\u003cuuid>"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"rate_limited","message":"Rate limit exceeded. Retry after 37s.","request_id":"550e8400-e29b-41d4-a716-446655440000"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"rate_limited","message":"Rate limit exceeded. Retry after 37s.","request_id":"550e8400-e29b-41d4-a716-446655440000"}}}},"exampleType":"examples"}},"exampleType":"examples"},"82c9d369-2a79-456d-b1fc-564b839e1f4f":{"description":"500 Internal Server Error. Unexpected server-side failure. Retry with exponential\nbackoff. If persistent, contact partners@collectivex.health with the request_id.\n","headers":{"X-Request-Id":{"description":"Request UUID.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","description":"Standard partner API error envelope (D-09). Mirrors Anthropic/OpenAI error shape.\nParse `error.code` for machine-readable error classification.\n","required":["error"],"properties":{"error":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string","description":"Machine-readable error code (D-10 locked enum). Use this for branching logic.\nAdding new codes is a minor version bump per the versioning policy.\n","enum":["unauthorized","forbidden","rate_limited","invalid_request","corpus_unavailable","grounding_deferral","crisis_resources","not_found","internal_error"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable error description. Use for logging; do not parse programmatically.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","format":"uuid","description":"UUID for this request. Include when contacting support.","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string\u003cuuid>"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"internal_error","message":"An unexpected error occurred. Please retry.","request_id":"550e8400-e29b-41d4-a716-446655440000"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"internal_error","message":"An unexpected error occurred. Please retry.","request_id":"550e8400-e29b-41d4-a716-446655440000"}}}},"exampleType":"examples"}},"exampleType":"examples"},"affc804a-04c0-4403-a0f9-ed9bb2c2cee7":{"description":"The generation pipeline failed and no usable content was produced\n(empty answer, no deferral, no crisis). The body is still the\nSyncResponse envelope: use `request_id` for support correlation and\n`error.message` for display. Retry with backoff. When a PARTIAL\nanswer (or a deferral/crisis short-circuit) exists alongside a\npipeline error, the endpoint returns 200 with the optional `error`\nfield populated instead. Identical mapping to `/v1/chat`'s sync mode.\n\n**`response_format: \"structured\"` gets the exact same status code\nfor the exact same envelope** — `response_format` never changes\nwhich status this endpoint returns, only what's in the body. When\nit does, `structured_answer.status` is `\"error\"` and\n`structured_answer.error` carries the same message as the\ntop-level `error` field; `structured_answer.sections`/`citations`\nare always empty in this state, even when a partial `answer` is\npresent in the same body — a truncated generation is never\nreshaped into a claim that looks grounded.\n","content":{"application/json":{"schema":{"type":"object","description":"`/v1/query`'s response — the shared `SyncResponse` shape plus the\nBETA `structured_answer` field. Defined as its own schema (rather\nthan putting `structured_answer` on `SyncResponse` directly) so\nclients generated from this spec do not advertise `structured_answer`\non `/v1/chat`, which has no `response_format` field and can never\nproduce it.\n","required":["request_id","answer","citations"],"properties":{"request_id":{"type":"string","format":"uuid","description":"UUID minted per request. Use for support correlation across PostHog / Langfuse / logs.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string\u003cuuid>"},"answer":{"type":"string","description":"The model's answer string. Empty string (\"\") on deferral or crisis short-circuit\n(the pipeline refuses to generate an answer without grounded evidence).\n","isRequired":true,"uniqueKey":"answer","typeLabel":"string"},"citations":{"type":"array","description":"Retrieved citations from the peer-reviewed corpus. Empty array on deferral or crisis.\nNever fabricate or paraphrase a citation that is not in this array.\n","items":{"type":"object","description":"A single research citation from the CollectiveX Health corpus.","required":["id","score","text"],"properties":{"id":{"type":"string","description":"Corpus-internal citation ID (e.g. \"CXH-00835\"). Use as an inline citation reference.","isRequired":true,"uniqueKey":"citations.items.[INDEX].id","typeLabel":"string"},"score":{"type":"number","format":"float","minimum":0,"maximum":1,"description":"Retrieval relevance score. Higher is more relevant.","isRequired":true,"uniqueKey":"citations.items.[INDEX].score","typeLabel":"number\u003cfloat>"},"text":{"type":"string","description":"Excerpt from the source paper used to ground the answer.","isRequired":true,"uniqueKey":"citations.items.[INDEX].text","typeLabel":"string"},"metadata":{"type":"object","description":"Bibliographic metadata. Strict allowlist — fields not listed here are\nstripped at the `/v1/*` boundary so partners never see Agentset-internal\nfield names. Source of truth: `lib/api/v1/citation-sanitizer.ts`\n(`PARTNER_METADATA_ALLOWLIST`).\n","additionalProperties":false,"properties":{"cxh_id":{"type":"string","description":"Canonical paper identifier in the CollectiveX Health corpus.","example":"CXH-00835","uniqueKey":"citations.items.[INDEX].metadata.cxh_id","typeLabel":"string"},"doi":{"type":"string","description":"Peer-reviewed DOI of the source paper.","example":"10.1093/humrep/dead156","uniqueKey":"citations.items.[INDEX].metadata.doi","typeLabel":"string"},"year":{"type":"string","description":"Publication year as it appears in the corpus catalog. Emitted as a\nstring at runtime (#191) — partners that want a number should\n`parseInt(year, 10)` on the partner side. The corpus also includes\nnon-numeric values like `\"in press\"` for unpublished work.\n","example":"2023","uniqueKey":"citations.items.[INDEX].metadata.year","typeLabel":"string"},"journal":{"type":"string","description":"Peer-review journal name.","example":"Human Reproduction","uniqueKey":"citations.items.[INDEX].metadata.journal","typeLabel":"string"},"authors":{"oneOf":[{"type":"string","description":"Author list — either a single joined string or an array of\nauthor strings; both forms occur in corpus metadata.\n","example":"Shultz et al.","uniqueKey":"citations.items.[INDEX].metadata.authors.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"string","uniqueKey":"citations.items.[INDEX].metadata.authors.oneOf.1.items.[INDEX]","typeLabel":"string"},"description":"Author list — either a single joined string or an array of\nauthor strings; both forms occur in corpus metadata.\n","example":"Shultz et al.","uniqueKey":"citations.items.[INDEX].metadata.authors.oneOf.1","typeLabel":"string[]"}],"uniqueKey":"citations.items.[INDEX].metadata.authors","typeLabel":"string | string[]"},"title":{"type":"string","description":"Paper title.","example":"Sex hormone profiles in normal menstruating females","uniqueKey":"citations.items.[INDEX].metadata.title","typeLabel":"string"},"page_number":{"type":"integer","description":"Page within the source paper this excerpt came from.","example":4,"uniqueKey":"citations.items.[INDEX].metadata.page_number","typeLabel":"integer"}},"uniqueKey":"citations.items.[INDEX].metadata","typeLabel":"object"}},"uniqueKey":"citations.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"citations","typeLabel":"object[]"},"deferral":{"oneOf":[{"type":"null","description":"Present when the corpus lacks strong evidence for the query. Present the originalQuery\nback to the user and do not synthesize an answer from training data.\n","uniqueKey":"deferral.oneOf.0","typeLabel":"null"},{"type":"object","description":"Present when the corpus lacks strong evidence for the query. Present the originalQuery\nback to the user and do not synthesize an answer from training data.\n","required":["originalQuery"],"properties":{"originalQuery":{"type":"string","description":"The query that triggered the deferral.","isRequired":true,"uniqueKey":"deferral.oneOf.1.originalQuery","typeLabel":"string"}},"uniqueKey":"deferral.oneOf.1","typeLabel":"object"}],"uniqueKey":"deferral","typeLabel":"null | object"},"crisis":{"oneOf":[{"type":"null","description":"Present when a safety classifier fires before retrieval (self-harm, acute symptoms,\nIPV). Show the resources verbatim and route the user away from research framing.\n","uniqueKey":"crisis.oneOf.0","typeLabel":"null"},{"type":"object","description":"Present when a safety classifier fires before retrieval (self-harm, acute symptoms,\nIPV). Show the resources verbatim and route the user away from research framing.\n","required":["category","locale","originalQuery","resources"],"properties":{"category":{"type":"string","enum":["self-harm","acute-symptom","ipv"],"description":"Safety category that triggered the classifier.","isRequired":true,"uniqueKey":"crisis.oneOf.1.category","typeLabel":"enum\u003cstring>"},"locale":{"type":"string","description":"Detected locale (e.g. \"US\", \"GB\"). Used to select region-appropriate resources.","example":"US","isRequired":true,"uniqueKey":"crisis.oneOf.1.locale","typeLabel":"string"},"originalQuery":{"type":"string","description":"The query that triggered the crisis classifier.","isRequired":true,"uniqueKey":"crisis.oneOf.1.originalQuery","typeLabel":"string"},"resources":{"type":"array","description":"Crisis resources to show verbatim. Never omit or reorder.","items":{"type":"object","description":"A single crisis support resource. Render verbatim — do not reorder, summarise, or\nomit fields. Source of truth: `lib/safety/crisis-resources.ts`.\n","required":["region","name","description"],"properties":{"region":{"type":"string","enum":["US","UK","global"],"description":"Region this resource applies to.","example":"US","isRequired":true,"uniqueKey":"crisis.oneOf.1.resources.items.[INDEX].region","typeLabel":"enum\u003cstring>"},"name":{"type":"string","description":"Human-readable resource name.","example":"988 Suicide \u0026 Crisis Lifeline","isRequired":true,"uniqueKey":"crisis.oneOf.1.resources.items.[INDEX].name","typeLabel":"string"},"description":{"type":"string","description":"Short context line shown next to the resource.","example":"24/7 free, confidential support for people in distress.","isRequired":true,"uniqueKey":"crisis.oneOf.1.resources.items.[INDEX].description","typeLabel":"string"},"phone":{"type":"string","description":"Phone or SMS contact (optional). Format varies by region.","example":"988","uniqueKey":"crisis.oneOf.1.resources.items.[INDEX].phone","typeLabel":"string"},"hours":{"type":"string","description":"Operating hours, when not 24/7 (optional).","example":"Mon–Fri 9am–5pm ET","uniqueKey":"crisis.oneOf.1.resources.items.[INDEX].hours","typeLabel":"string"}},"uniqueKey":"crisis.oneOf.1.resources.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"crisis.oneOf.1.resources","typeLabel":"object[]"}},"uniqueKey":"crisis.oneOf.1","typeLabel":"object"}],"uniqueKey":"crisis","typeLabel":"null | object"},"error":{"description":"Present when the generation pipeline emitted an error (v1.1, optional). The message\nis always a generic sanitized string — internal error details are never exposed.\nWith no usable content the response status is 502; alongside a partial answer or a\ndeferral/crisis short-circuit the status stays 200 and this field flags the failure.\n","type":"object","required":["message"],"properties":{"message":{"type":"string","description":"Generic human-readable failure message. Safe to display; do not parse.","example":"Generation failed. Please retry.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"},"structured_answer":{"type":"object","description":"**BETA.** Present only when the request set\n`response_format: \"structured\"` (see `QueryRequest.response_format`).\nFor structured-mode consumers, `structured_answer.status` is the\nauthoritative outcome — do not also branch on the legacy\ntop-level `answer`/`error` fields, which keep text-mode\nsemantics unchanged and can disagree with `status` on\ntruncated generations.\nAbsent — not null — on every request that omits it or sends\n`response_format: \"text\"`, which is every request today: this field\nis purely additive and never changes the meaning of `answer` or\n`citations`.\n","required":["format","format_version","schema_version","status","sections","citations","deferral","crisis","error","disclaimer"],"properties":{"format":{"type":"string","description":"Which adapter rendered this payload. `\"generic\"` is the self-service public shape.","example":"generic","isRequired":true,"uniqueKey":"structured_answer.format","typeLabel":"string"},"format_version":{"type":"string","description":"Bumped when this adapter's rendered shape changes in a breaking way.","example":"1","isRequired":true,"uniqueKey":"structured_answer.format_version","typeLabel":"string"},"schema_version":{"type":"string","description":"Canonical answer schema version (`lib/partner-format/canonical.ts`).","example":"1","isRequired":true,"uniqueKey":"structured_answer.schema_version","typeLabel":"string"},"status":{"type":"string","enum":["answered","ungrounded","deferral","crisis","error"],"description":"REQUIRED discriminant. `\"answered\"` — a grounded answer with at\nleast one citation. `\"ungrounded\"` — a real, non-empty answer with\nzero citations; kept distinct from `\"answered\"` so a partner can\nchoose not to present it as evidence-backed. `\"deferral\"` — the\ncorpus lacked strong evidence; no answer was synthesized.\n`\"crisis\"` — the crisis classifier short-circuited before\nretrieval. `\"error\"` — the pipeline emitted an error chunk\n(model/execute failure, mid-stream or outright); `sections` and\n`citations` are always empty in this state — a truncated or\npartial answer is never packaged as a grounded claim, even when\nthe top-level `answer` field (unaffected by `response_format`)\nstill carries a partial fragment for a text-mode caller.\n","example":"answered","isRequired":true,"uniqueKey":"structured_answer.status","typeLabel":"enum\u003cstring>"},"sections":{"type":"array","description":"The answer broken into sections. Today's pipeline emits one markdown\nanswer with no section boundaries, so a normal answer is always a\nsingle-element array; the shape supports more so a future\nmulti-section generation step needs no new schema. Empty when\n`status` is `\"error\"`; exactly one synthetic section when `status`\nis `\"deferral\"` or `\"crisis\"` (see `StructuredSection.kind`).\n","items":{"type":"object","description":"A single section of a structured answer.","required":["id","kind","heading","body","claims"],"properties":{"id":{"type":"string","example":"section-1","isRequired":true,"uniqueKey":"structured_answer.sections.items.[INDEX].id","typeLabel":"string"},"kind":{"type":"string","enum":["answer","crisis","deferral"],"description":"`\"answer\"` is real, model-generated or corpus-grounded content.\n`\"crisis\"` / `\"deferral\"` are synthetic sections carrying\npre-approved safety copy — present so a client that renders\n`sections[].body` and nothing else still shows something instead\nof a blank card. `StructuredAnswer.status` is still the\nauthoritative discriminant; `kind` exists for section-only\nrenderers.\n","example":"answer","isRequired":true,"uniqueKey":"structured_answer.sections.items.[INDEX].kind","typeLabel":"enum\u003cstring>"},"heading":{"oneOf":[{"type":"string","description":"Null when the answer has no distinct heading (today's default).","isRequired":true,"uniqueKey":"structured_answer.sections.items.[INDEX].heading.oneOf.0","typeLabel":"string"},{"type":"null","description":"Null when the answer has no distinct heading (today's default).","isRequired":true,"uniqueKey":"structured_answer.sections.items.[INDEX].heading.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"structured_answer.sections.items.[INDEX].heading","typeLabel":"string | null"},"body":{"type":"string","description":"Full markdown/plain text body of this section.","isRequired":true,"uniqueKey":"structured_answer.sections.items.[INDEX].body","typeLabel":"string"},"claims":{"type":"array","description":"Claims within this section, each bound to the citation ids that\nground it. Today's pipeline has no per-claim generation step, so\nthis is at most one claim covering the whole section body, bound to\nevery citation returned for the answer — never a fabricated\nsentence-level binding. A section with no supporting citations has\nzero claims, not a claim with an empty `citation_ids`. Always empty\non a `\"crisis\"`/`\"deferral\"` `kind` section.\n","items":{"type":"object","required":["id","text","citation_ids"],"properties":{"id":{"type":"string","example":"claim-1","isRequired":true,"uniqueKey":"structured_answer.sections.items.[INDEX].claims.items.[INDEX].id","typeLabel":"string"},"text":{"type":"string","description":"The claim text (today, the full section body).","isRequired":true,"uniqueKey":"structured_answer.sections.items.[INDEX].claims.items.[INDEX].text","typeLabel":"string"},"citation_ids":{"type":"array","description":"Ids into this response's `citations` array that ground this claim.","items":{"type":"string","uniqueKey":"structured_answer.sections.items.[INDEX].claims.items.[INDEX].citation_ids.items.[INDEX]","typeLabel":"string"},"example":["CXH-00835"],"isRequired":true,"uniqueKey":"structured_answer.sections.items.[INDEX].claims.items.[INDEX].citation_ids","typeLabel":"string[]"}},"uniqueKey":"structured_answer.sections.items.[INDEX].claims.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"structured_answer.sections.items.[INDEX].claims","typeLabel":"object[]"}},"uniqueKey":"structured_answer.sections.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"structured_answer.sections","typeLabel":"object[]"},"citations":{"type":"array","description":"Same citations as the top-level `citations` field, reshaped through\nthe same `Citation` schema — no new citation shape, no new sanitizer.\nEmpty unless `status` is `\"answered\"` or `\"ungrounded\"`.\n","items":{"type":"object","description":"A single research citation from the CollectiveX Health corpus.","required":["id","score","text"],"properties":{"id":{"type":"string","description":"Corpus-internal citation ID (e.g. \"CXH-00835\"). Use as an inline citation reference.","isRequired":true,"uniqueKey":"structured_answer.citations.items.[INDEX].id","typeLabel":"string"},"score":{"type":"number","format":"float","minimum":0,"maximum":1,"description":"Retrieval relevance score. Higher is more relevant.","isRequired":true,"uniqueKey":"structured_answer.citations.items.[INDEX].score","typeLabel":"number\u003cfloat>"},"text":{"type":"string","description":"Excerpt from the source paper used to ground the answer.","isRequired":true,"uniqueKey":"structured_answer.citations.items.[INDEX].text","typeLabel":"string"},"metadata":{"type":"object","description":"Bibliographic metadata. Strict allowlist — fields not listed here are\nstripped at the `/v1/*` boundary so partners never see Agentset-internal\nfield names. Source of truth: `lib/api/v1/citation-sanitizer.ts`\n(`PARTNER_METADATA_ALLOWLIST`).\n","additionalProperties":false,"properties":{"cxh_id":{"type":"string","description":"Canonical paper identifier in the CollectiveX Health corpus.","example":"CXH-00835","uniqueKey":"structured_answer.citations.items.[INDEX].metadata.cxh_id","typeLabel":"string"},"doi":{"type":"string","description":"Peer-reviewed DOI of the source paper.","example":"10.1093/humrep/dead156","uniqueKey":"structured_answer.citations.items.[INDEX].metadata.doi","typeLabel":"string"},"year":{"type":"string","description":"Publication year as it appears in the corpus catalog. Emitted as a\nstring at runtime (#191) — partners that want a number should\n`parseInt(year, 10)` on the partner side. The corpus also includes\nnon-numeric values like `\"in press\"` for unpublished work.\n","example":"2023","uniqueKey":"structured_answer.citations.items.[INDEX].metadata.year","typeLabel":"string"},"journal":{"type":"string","description":"Peer-review journal name.","example":"Human Reproduction","uniqueKey":"structured_answer.citations.items.[INDEX].metadata.journal","typeLabel":"string"},"authors":{"oneOf":[{"type":"string","description":"Author list — either a single joined string or an array of\nauthor strings; both forms occur in corpus metadata.\n","example":"Shultz et al.","uniqueKey":"structured_answer.citations.items.[INDEX].metadata.authors.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"string","uniqueKey":"structured_answer.citations.items.[INDEX].metadata.authors.oneOf.1.items.[INDEX]","typeLabel":"string"},"description":"Author list — either a single joined string or an array of\nauthor strings; both forms occur in corpus metadata.\n","example":"Shultz et al.","uniqueKey":"structured_answer.citations.items.[INDEX].metadata.authors.oneOf.1","typeLabel":"string[]"}],"uniqueKey":"structured_answer.citations.items.[INDEX].metadata.authors","typeLabel":"string | string[]"},"title":{"type":"string","description":"Paper title.","example":"Sex hormone profiles in normal menstruating females","uniqueKey":"structured_answer.citations.items.[INDEX].metadata.title","typeLabel":"string"},"page_number":{"type":"integer","description":"Page within the source paper this excerpt came from.","example":4,"uniqueKey":"structured_answer.citations.items.[INDEX].metadata.page_number","typeLabel":"integer"}},"uniqueKey":"structured_answer.citations.items.[INDEX].metadata","typeLabel":"object"}},"uniqueKey":"structured_answer.citations.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"structured_answer.citations","typeLabel":"object[]"},"deferral":{"oneOf":[{"type":"null","description":"Same semantics as the top-level `deferral` field, mirrored here.","isRequired":true,"uniqueKey":"structured_answer.deferral.oneOf.0","typeLabel":"null"},{"type":"object","description":"Same semantics as the top-level `deferral` field, mirrored here.","required":["originalQuery"],"properties":{"originalQuery":{"type":"string","description":"The query that triggered the deferral.","isRequired":true,"uniqueKey":"structured_answer.deferral.oneOf.1.originalQuery","typeLabel":"string"}},"isRequired":true,"uniqueKey":"structured_answer.deferral.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"structured_answer.deferral","typeLabel":"null | object"},"crisis":{"oneOf":[{"type":"null","description":"Same semantics as the top-level `crisis` field, mirrored here.","isRequired":true,"uniqueKey":"structured_answer.crisis.oneOf.0","typeLabel":"null"},{"type":"object","description":"Same semantics as the top-level `crisis` field, mirrored here.","required":["category","locale","originalQuery","resources"],"properties":{"category":{"type":"string","enum":["self-harm","acute-symptom","ipv"],"description":"Safety category that triggered the classifier.","isRequired":true,"uniqueKey":"structured_answer.crisis.oneOf.1.category","typeLabel":"enum\u003cstring>"},"locale":{"type":"string","description":"Detected locale (e.g. \"US\", \"GB\"). Used to select region-appropriate resources.","example":"US","isRequired":true,"uniqueKey":"structured_answer.crisis.oneOf.1.locale","typeLabel":"string"},"originalQuery":{"type":"string","description":"The query that triggered the crisis classifier.","isRequired":true,"uniqueKey":"structured_answer.crisis.oneOf.1.originalQuery","typeLabel":"string"},"resources":{"type":"array","description":"Crisis resources to show verbatim. Never omit or reorder.","items":{"type":"object","description":"A single crisis support resource. Render verbatim — do not reorder, summarise, or\nomit fields. Source of truth: `lib/safety/crisis-resources.ts`.\n","required":["region","name","description"],"properties":{"region":{"type":"string","enum":["US","UK","global"],"description":"Region this resource applies to.","example":"US","isRequired":true,"uniqueKey":"structured_answer.crisis.oneOf.1.resources.items.[INDEX].region","typeLabel":"enum\u003cstring>"},"name":{"type":"string","description":"Human-readable resource name.","example":"988 Suicide \u0026 Crisis Lifeline","isRequired":true,"uniqueKey":"structured_answer.crisis.oneOf.1.resources.items.[INDEX].name","typeLabel":"string"},"description":{"type":"string","description":"Short context line shown next to the resource.","example":"24/7 free, confidential support for people in distress.","isRequired":true,"uniqueKey":"structured_answer.crisis.oneOf.1.resources.items.[INDEX].description","typeLabel":"string"},"phone":{"type":"string","description":"Phone or SMS contact (optional). Format varies by region.","example":"988","uniqueKey":"structured_answer.crisis.oneOf.1.resources.items.[INDEX].phone","typeLabel":"string"},"hours":{"type":"string","description":"Operating hours, when not 24/7 (optional).","example":"Mon–Fri 9am–5pm ET","uniqueKey":"structured_answer.crisis.oneOf.1.resources.items.[INDEX].hours","typeLabel":"string"}},"uniqueKey":"structured_answer.crisis.oneOf.1.resources.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"structured_answer.crisis.oneOf.1.resources","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"structured_answer.crisis.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"structured_answer.crisis","typeLabel":"null | object"},"error":{"oneOf":[{"type":"null","description":"Populated only when `status` is `\"error\"`; `null` otherwise.\nMirrors the top-level `error` field verbatim — the same generic,\nsanitized message, never raw internal error text.\n","isRequired":true,"uniqueKey":"structured_answer.error.oneOf.0","typeLabel":"null"},{"type":"object","description":"Populated only when `status` is `\"error\"`; `null` otherwise.\nMirrors the top-level `error` field verbatim — the same generic,\nsanitized message, never raw internal error text.\n","required":["message"],"properties":{"message":{"type":"string","description":"Generic, sanitized failure message — safe to display, never parsed.","example":"Generation failed. Please retry.","isRequired":true,"uniqueKey":"structured_answer.error.oneOf.1.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"structured_answer.error.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"structured_answer.error","typeLabel":"null | object"},"disclaimer":{"oneOf":[{"type":"null","description":"A versioned \"research summary, not medical advice\" notice.\nPopulated only when `status` is `\"answered\"` or `\"ungrounded\"`\n(i.e. `sections` carries real answer content); `null` for\ndeferral/crisis/error, which carry their own dedicated safety\nframing instead.\n","isRequired":true,"uniqueKey":"structured_answer.disclaimer.oneOf.0","typeLabel":"null"},{"type":"object","description":"A versioned \"research summary, not medical advice\" notice.\nPopulated only when `status` is `\"answered\"` or `\"ungrounded\"`\n(i.e. `sections` carries real answer content); `null` for\ndeferral/crisis/error, which carry their own dedicated safety\nframing instead.\n","required":["text","version"],"properties":{"text":{"type":"string","example":"Research summary, not medical advice. Consult your clinician for personal health decisions.","isRequired":true,"uniqueKey":"structured_answer.disclaimer.oneOf.1.text","typeLabel":"string"},"version":{"type":"integer","description":"Bumped whenever the disclaimer copy changes.","example":1,"isRequired":true,"uniqueKey":"structured_answer.disclaimer.oneOf.1.version","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"structured_answer.disclaimer.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"structured_answer.disclaimer","typeLabel":"null | object"}},"uniqueKey":"structured_answer","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"generation_failed_sync":{"title":"generation_failed_sync","value":{"request_id":"d4e5f6a7-b8c9-0123-def1-234567890123","answer":"","citations":[],"error":{"message":"Generation failed. Please retry."}}}},"exampleType":"examples"}},"exampleType":"examples"},"d5d1bc25-cf15-4727-8c48-6bc09c6adecd":{"description":"503 Service Unavailable. A transient condition — retry with exponential\nbackoff. Two distinct causes share this status code, distinguishable by\n`error.code`:\n - `corpus_unavailable`: the research corpus (Agentset) is temporarily\n unavailable.\n - `internal_error`: an upstream dependency required to authenticate or\n rate-limit the request (Unkey) is temporarily unavailable — includes\n the \"rate-limit service degraded\" case described under \"Rate limits\"\n above. This variant always carries a `Retry-After` header.\n","headers":{"X-Request-Id":{"description":"Request UUID.","schema":{"type":"string","format":"uuid"}},"Retry-After":{"description":"Seconds to wait before retrying. Present on the `internal_error` (Unkey-outage) variant; absent on `corpus_unavailable`.","required":false,"schema":{"type":"integer","example":5}}},"content":{"application/json":{"schema":{"type":"object","description":"Standard partner API error envelope (D-09). Mirrors Anthropic/OpenAI error shape.\nParse `error.code` for machine-readable error classification.\n","required":["error"],"properties":{"error":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string","description":"Machine-readable error code (D-10 locked enum). Use this for branching logic.\nAdding new codes is a minor version bump per the versioning policy.\n","enum":["unauthorized","forbidden","rate_limited","invalid_request","corpus_unavailable","grounding_deferral","crisis_resources","not_found","internal_error"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable error description. Use for logging; do not parse programmatically.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","format":"uuid","description":"UUID for this request. Include when contacting support.","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string\u003cuuid>"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"corpus_unavailable":{"title":"corpus_unavailable","value":{"error":{"code":"corpus_unavailable","message":"Research corpus temporarily unavailable. Please retry.","request_id":"550e8400-e29b-41d4-a716-446655440000"}}},"auth_or_ratelimit_service_unavailable":{"title":"auth_or_ratelimit_service_unavailable","value":{"error":{"code":"internal_error","message":"Rate limit service temporarily unavailable. Please retry.","request_id":"660e8400-e29b-41d4-a716-446655440001"}}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"76a9de3d-a39e-4df7-9b56-918a8858c228":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"cxh_pk_live_*","description":"Bearer token used by every `/v1/*` endpoint. Two kinds of key work here:\n - **Long-lived partner key** (`cxh_pk_live_*`) — issued by\n CollectiveX Health (contact partners@collectivex.health). Keep\n it server-side only — never expose it in client bundles or\n mobile app code. This rule is absolute and does not change for\n any endpoint.\n - **Short-lived session key** — minted server-side via\n `POST /v1/session-tokens` from a long-lived key. Safe to hand\n to a native mobile client only — not a browser or other\n JavaScript context, see \"API keys\" in the description above.\n It's scoped to `/v1/query` and `/v1/chat` only, expires in at\n most 60 minutes, and can't mint further session keys.\n `POST /v1/session-tokens` itself only ever accepts the\n long-lived key.\n","scopes":[]}}},"servers":{"3aec66e8-ea38-412b-92a2-04eeb1a50e2f":{"url":"https://api.collectivex.health","description":"Production partner API"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"cxh_pk_live_*","description":"Bearer token used by every `/v1/*` endpoint. Two kinds of key work here:\n - **Long-lived partner key** (`cxh_pk_live_*`) — issued by\n CollectiveX Health (contact partners@collectivex.health). Keep\n it server-side only — never expose it in client bundles or\n mobile app code. This rule is absolute and does not change for\n any endpoint.\n - **Short-lived session key** — minted server-side via\n `POST /v1/session-tokens` from a long-lived key. Safe to hand\n to a native mobile client only — not a browser or other\n JavaScript context, see \"API keys\" in the description above.\n It's scoped to `/v1/query` and `/v1/chat` only, expires in at\n most 60 minutes, and can't mint further session keys.\n `POST /v1/session-tokens` itself only ever accepts the\n long-lived key.\n","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer token used by every `/v1/*` endpoint. Two kinds of key work here:\n - **Long-lived partner key** (`cxh_pk_live_*`) — issued by\n CollectiveX Health (contact partners@collectivex.health). Keep\n it server-side only — never expose it in client bundles or\n mobile app code. This rule is absolute and does not change for\n any endpoint.\n - **Short-lived session key** — minted server-side via\n `POST /v1/session-tokens` from a long-lived key. Safe to hand\n to a native mobile client only — not a browser or other\n JavaScript context, see \"API keys\" in the description above.\n It's scoped to `/v1/query` and `/v1/chat` only, expires in at\n most 60 minutes, and can't mint further session keys.\n `POST /v1/session-tokens` itself only ever accepts the\n long-lived key.\n","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"openapi.yaml"},"subdomain":"collective-x","siteName":"Collective X API","title":"Ask a question — one-shot JSON answer - Collective X API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-13T05:30:51.762Z","originalFileLocation":"api-reference/ask-a-question/ask-a-question-—-one-shot-json-answer.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"One-shot, synchronous endpoint. Always returns application/json (the SyncResponse shape) — there is no streaming mode and no stream field. This is the recommended path for Claude Skills, MCP tool calls, agent pipelines, and any caller that wants the full answer before processing — the same contract as stream: false on POST /v1/chat, promoted to its own named path with a question-shaped request body. Both endpoints remain fully supported; there is no deprecation or migration deadline for stream: false on /v1/chat. Server-to-server (the only supported pattern for web), or native-mobile-direct via a short-lived session token minted by your backend through POST /v1/session-tokens (native mobile only, not browser/JS — see \u0026quot;API keys\u0026quot; above). Never embed your long-lived key in any client, browser or mobile. Internally this is the exact same pipeline as /v1/chat — same retrieval, safety, and grounding behavior. Nothing about answer quality changes based on which endpoint you call. Rate limits are communicated via X-RateLimit-* headers on every response and are shared with /v1/chat per API key (same rate-limit namespace, same key — see \u0026quot;Rate limits\u0026quot; above). When a 429 is returned, honour Retry-After before retrying.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Collective X API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/collective-x/0_4ikjEQ7vib8PG9/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/collective-x/0_4ikjEQ7vib8PG9/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/collective-x/0_4ikjEQ7vib8PG9/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/collective-x/0_4ikjEQ7vib8PG9/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/collective-x/0_4ikjEQ7vib8PG9/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/collective-x/0_4ikjEQ7vib8PG9/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/collective-x/0_4ikjEQ7vib8PG9/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/collective-x/0_4ikjEQ7vib8PG9/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/collective-x/0_4ikjEQ7vib8PG9/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Ask a question — one-shot JSON answer - Collective X API\">\u003cmeta data-mint-head property=\"og:description\" content=\"One-shot, synchronous endpoint. Always returns application/json (the SyncResponse shape) — there is no streaming mode and no stream field. This is the recommended path for Claude Skills, MCP tool calls, agent pipelines, and any caller that wants the full answer before processing — the same contract as stream: false on POST /v1/chat, promoted to its own named path with a question-shaped request body. Both endpoints remain fully supported; there is no deprecation or migration deadline for stream: false on /v1/chat. Server-to-server (the only supported pattern for web), or native-mobile-direct via a short-lived session token minted by your backend through POST /v1/session-tokens (native mobile only, not browser/JS — see \u0026quot;API keys\u0026quot; above). Never embed your long-lived key in any client, browser or mobile. Internally this is the exact same pipeline as /v1/chat — same retrieval, safety, and grounding behavior. Nothing about answer quality changes based on which endpoint you call. Rate limits are communicated via X-RateLimit-* headers on every response and are shared with /v1/chat per API key (same rate-limit namespace, same key — see \u0026quot;Rate limits\u0026quot; above). When a 429 is returned, honour Retry-After before retrying.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Collective X API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.collectivex.health/api-reference/ask-a-question/ask-a-question-—-one-shot-json-answer\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://collective-x.mintlify.app/_mintlify/api/og/v2?division=Ask+a+question\u0026amp;title=Ask+a+question+%E2%80%94+one-shot+JSON+answer\u0026amp;description=One-shot%2C+synchronous+endpoint.+Always+returns+%60application%2Fjson%60+%28the%0A%60SyncResponse%60+shape%29+%E2%80%94+there+is+no+streaming+mode+and+no+%60stream%60+field.%0AThis+is+the+rec\u0026amp;theme=bb4e877d2136d284fc6ff9a0\u0026amp;signature=9729faf257b2fbd8e0209c37867e74875c14f87fc14436cd368131f439c58099\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Ask a question — one-shot JSON answer - Collective X API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"One-shot, synchronous endpoint. Always returns application/json (the SyncResponse shape) — there is no streaming mode and no stream field. This is the recommended path for Claude Skills, MCP tool calls, agent pipelines, and any caller that wants the full answer before processing — the same contract as stream: false on POST /v1/chat, promoted to its own named path with a question-shaped request body. Both endpoints remain fully supported; there is no deprecation or migration deadline for stream: false on /v1/chat. Server-to-server (the only supported pattern for web), or native-mobile-direct via a short-lived session token minted by your backend through POST /v1/session-tokens (native mobile only, not browser/JS — see \u0026quot;API keys\u0026quot; above). Never embed your long-lived key in any client, browser or mobile. Internally this is the exact same pipeline as /v1/chat — same retrieval, safety, and grounding behavior. Nothing about answer quality changes based on which endpoint you call. Rate limits are communicated via X-RateLimit-* headers on every response and are shared with /v1/chat per API key (same rate-limit namespace, same key — see \u0026quot;Rate limits\u0026quot; above). When a 429 is returned, honour Retry-After before retrying.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://collective-x.mintlify.app/_mintlify/api/og/v2?division=Ask+a+question\u0026amp;title=Ask+a+question+%E2%80%94+one-shot+JSON+answer\u0026amp;description=One-shot%2C+synchronous+endpoint.+Always+returns+%60application%2Fjson%60+%28the%0A%60SyncResponse%60+shape%29+%E2%80%94+there+is+no+streaming+mode+and+no+%60stream%60+field.%0AThis+is+the+rec\u0026amp;theme=bb4e877d2136d284fc6ff9a0\u0026amp;signature=9729faf257b2fbd8e0209c37867e74875c14f87fc14436cd368131f439c58099\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/collective-x/0_4ikjEQ7vib8PG9/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Collective X API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1a3f52\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.collectivex.health/api-reference/ask-a-question/ask-a-question-—-one-shot-json-answer\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/ask-a-question/ask-a-question-%E2%80%94-one-shot-json-answer.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.collectivex.health/#organization\",\"name\":\"Collective X API\",\"url\":\"https://docs.collectivex.health\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/collective-x/XmdndrtGclqPo6DR/logo/light.svg?fit=max\u0026auto=format\u0026n=XmdndrtGclqPo6DR\u0026q=85\u0026s=a7e95b40e54fc2a5bb8a468486937833\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.collectivex.health#website\",\"name\":\"Collective X API\",\"url\":\"https://docs.collectivex.health\",\"publisher\":{\"@id\":\"https://docs.collectivex.health/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.collectivex.health/api-reference/ask-a-question/ask-a-question-%E2%80%94-one-shot-json-answer#webpage\",\"url\":\"https://docs.collectivex.health/api-reference/ask-a-question/ask-a-question-%E2%80%94-one-shot-json-answer\",\"name\":\"Ask a question — one-shot JSON answer\",\"description\":\"One-shot, synchronous endpoint. Always returns application/json (the SyncResponse shape) — there is no streaming mode and no stream field. This is the recommended path for Claude Skills, MCP tool calls, agent pipelines, and any caller that wants the full answer before processing — the same contract as stream: false on POST /v1/chat, promoted to its own named path with a question-shaped request body. Both endpoints remain fully supported; there is no deprecation or migration deadline for stream: false on /v1/chat. Server-to-server (the only supported pattern for web), or native-mobile-direct via a short-lived session token minted by your backend through POST /v1/session-tokens (native mobile only, not browser/JS — see \\\"API keys\\\" above). Never embed your long-lived key in any client, browser or mobile. Internally this is the exact same pipeline as /v1/chat — same retrieval, safety, and grounding behavior. Nothing about answer quality changes based on which endpoint you call. Rate limits are communicated via X-RateLimit-* headers on every response and are shared with /v1/chat per API key (same rate-limit namespace, same key — see \\\"Rate limits\\\" above). When a 429 is returned, honour Retry-After before retrying.\",\"dateModified\":\"2026-09-13T05:30:51.762Z\",\"isPartOf\":{\"@id\":\"https://docs.collectivex.health#website\"},\"breadcrumb\":{\"@id\":\"https://docs.collectivex.health/api-reference/ask-a-question/ask-a-question-%E2%80%94-one-shot-json-answer#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.collectivex.health/api-reference/ask-a-question/ask-a-question-%E2%80%94-one-shot-json-answer#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Collective X API\",\"item\":\"https://docs.collectivex.health\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ask a question — one-shot JSON answer\",\"item\":\"https://docs.collectivex.health/api-reference/ask-a-question/ask-a-question-%E2%80%94-one-shot-json-answer\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.collectivex.health/api-reference/ask-a-question/ask-a-question-%E2%80%94-one-shot-json-answer#apireference\",\"headline\":\"Ask a question — one-shot JSON answer\",\"name\":\"Ask a question — one-shot JSON answer\",\"description\":\"One-shot, synchronous endpoint. Always returns application/json (the SyncResponse shape) — there is no streaming mode and no stream field. This is the recommended path for Claude Skills, MCP tool calls, agent pipelines, and any caller that wants the full answer before processing — the same contract as stream: false on POST /v1/chat, promoted to its own named path with a question-shaped request body. Both endpoints remain fully supported; there is no deprecation or migration deadline for stream: false on /v1/chat. Server-to-server (the only supported pattern for web), or native-mobile-direct via a short-lived session token minted by your backend through POST /v1/session-tokens (native mobile only, not browser/JS — see \\\"API keys\\\" above). Never embed your long-lived key in any client, browser or mobile. Internally this is the exact same pipeline as /v1/chat — same retrieval, safety, and grounding behavior. Nothing about answer quality changes based on which endpoint you call. Rate limits are communicated via X-RateLimit-* headers on every response and are shared with /v1/chat per API key (same rate-limit namespace, same key — see \\\"Rate limits\\\" above). When a 429 is returned, honour Retry-After before retrying.\",\"url\":\"https://docs.collectivex.health/api-reference/ask-a-question/ask-a-question-%E2%80%94-one-shot-json-answer\",\"mainEntityOfPage\":{\"@id\":\"https://docs.collectivex.health/api-reference/ask-a-question/ask-a-question-%E2%80%94-one-shot-json-answer#webpage\"},\"dateModified\":\"2026-09-13T05:30:51.762Z\",\"publisher\":{\"@id\":\"https://docs.collectivex.health/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.collectivex.health#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Collective X API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Collective X API","nav":{"global":null,"tabs":[{"tab":"API Reference","groups":[{"group":"Ask a question","pages":[{"title":"Ask a question — one-shot JSON answer","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/query","href":"/api-reference/ask-a-question/ask-a-question-—-one-shot-json-answer"}]},{"group":"Have a conversation","pages":[{"title":"Have a conversation — streaming or sync","description":"Dual-mode endpoint. By default (`stream` omitted or `true`) returns a streaming\nUIMessage SSE response compatible with the Vercel AI SDK `useChat` hook. Send\n`stream: false` to receive a synchronous JSON response (the `SyncResponse` shape)\nsuited for Claude Skills, MCP tool calls, and agent pipelines.\n\n**Server-to-server (the only supported pattern for web), or\nnative-mobile-direct via a short-lived session token** minted by\nyour backend through `POST /v1/session-tokens` (native mobile only,\nnot browser/JS — see \"API keys\" above). Never embed your long-lived key in any client,\nbrowser or mobile.\n\nRate limits are communicated via `X-RateLimit-*` headers on every\nresponse and are shared with `/v1/query` per API key\n(see \"Rate limits\" above). When a 429 is returned, honour\n`Retry-After` before retrying.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/chat","href":"/api-reference/have-a-conversation/have-a-conversation-—-streaming-or-sync"}]},{"group":"Async jobs","pages":[{"title":"Submit a question as an async job (asynchronous /v1/query)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/jobs","href":"/api-reference/async-jobs/submit-a-question-as-an-async-job-asynchronous-v1query"},{"title":"Poll an async job's status","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/jobs/{id}","href":"/api-reference/async-jobs/poll-an-async-jobs-status"}]},{"group":"Session tokens","pages":[{"title":"Mint a short-lived, scoped session token for a mobile client","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/session-tokens","href":"/api-reference/session-tokens/mint-a-short-lived-scoped-session-token-for-a-mobile-client"}]}]},{"tab":"Guides","pages":[{"title":"Guides","href":""}]}]},"title":"Ask a question — one-shot JSON answer - Collective X API","buildId":"dpl_2xiSHD9XEvLsPGPcfoMtkLTB3dy9","deploymentId":"dpl_2xiSHD9XEvLsPGPcfoMtkLTB3dy9","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DmVyH30O.js","utils-BHQqGGOd.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-CD-E4BIt.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Bp5Lq9Ds.js","snippetPresets-C4xAVCFP.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CgXVLxUC.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BF8I5oUf.js","shallow-Byd0lWnC.js","getApiPlaygroundDisplay-BGOZG1OK.js","CodeSnippet-CpvQL0CY.js","CodeSnippets-B8wkBKXa.js","Page-CBCH2P7b.js","getPastedJson-Ry3scI3Y.js","icon-D7a9HcdD.js","MethodPill-CJ8pmHhz.js","DuplicateIcon-rh1HJF0t.js","createIcon-DvGznqYs.js","DynamicMarkdown-Cc6AuSHS.js","SectionHeading-B4A0S-ep.js","axios-vUo_bRtp.js","Markdown-Cc16CX65.js","clsx-Cs6nMGht.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-zbf22OZA.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-C_fs-y5n.js"]}