Skip to main content
POST /api/v1/query Answers a single question against one or more collections. No conversation state is created — for multi-turn conversations, use Chat Sessions.

Request

string[]
required
Collections to retrieve from. Your account must have access to every listed collection.
string
required
The question to answer. Maximum 32,000 characters.
string[]
Restrict retrieval to these file IDs.
boolean
default:"false"
Stream the response as Server-Sent Events.

Response

string
The generated answer, in Markdown. May contain inline citation markers of the form [citation:{id}] referencing entries in citations.
array
Source citation objects backing the answer.
Response

The Citation object

string
Marker ID. Inline markers in the answer text ([citation:3:12]) reference this value.
string
UUID of the source file. Resolve details with Get File.
string
UUID of the collection the file belongs to.
string
Source filename.
integer
First page of the cited range (1-indexed). When the answer cites a specific page, page_start equals page_end.
integer
Last page of the cited range.