Skip to main content
The fastest way in is POST /v1/query: send one question, get back one JSON response, done. The endpoint is stateless — no session, no setup, no history to manage.
Run this from a server or your terminal, never from browser code — see Authentication for why the key is server-side only.

1. Ask a question

2. Read the response

What comes back (SyncResponse, abbreviated):

3. Handle all three outcomes

A response is not always a grounded answer. Your integration must handle the deferral and crisis short-circuits too:
  • Deferral — answer is an empty string, citations an empty array, and deferral.originalQuery is set. The corpus lacks strong evidence for the query. Present the originalQuery back to the user and do not synthesize an answer from training data.
  • Crisis — answer is an empty string, citations an empty array, and crisis carries a category (self-harm, acute-symptom, or ipv), a locale, the originalQuery, and a resources array. Show the resources verbatim and route the user away from research framing. Never omit or reorder resources.
Citations only ever come from the citations array — never fabricate or paraphrase a citation that is not in it.

Already building /v1/chat request bodies?

/v1/query also accepts a single-element messages array in place of question, for continuity with callers already building /v1/chat bodies:
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 different role, returns 400 invalid_request. Exactly one of question or messages is required — not both.

Next steps