Skip to main content
Run retrieval-augmented Q&A (RAG) over a workspace’s knowledge bases. The response is streamed as SSE (Server-Sent Events) with content type text/event-stream, returning the answer and citations incrementally.

Endpoint

Authentication

Authorization: Bearer <jwt> or X-API-Key <sk_...>. Minimum role: viewer.

Path parameters

string
required
Workspace id.

Request body

string
required
The user’s question.
integer
Number of document chunks to retrieve; server default when omitted.

Response (stream)

Content-Type: text/event-stream. Each data: line is an incremental text segment; a trailing “引用 / References” section lists the matched documents and snippets. Read line-by-line as SSE on the client.

Example