Find the passages that answer a query
POST/v1/workspaces/{workspaceId}/search
Semantic Search: the quoted passages and their sources, best first. Free on every plan. Needs the read scope. workspaceId comes from GET /v1/workspaces.
Parameters
| Name | Type | Description |
|---|
| workspaceId * | path · uuid | A workspace from GET /v1/workspaces |
Request body (application/json · V1SearchRequest)
| Name | Type | Description |
|---|
| query * | string | What to look for, in plain language. |
Response 200 · V1Answer
| Name | Type | Description |
|---|
| answer | string | The answer; [n] markers refer to citations. |
| mode | "reasoning" | "search" | |
| abstained | boolean | True when the workspace does not hold enough to answer. A declined AI Reasoning answer is not counted against the allowance. |
| citations | V1Citation[] | |
| passages | V1Passage[] | Matching passages, quoted (search mode). |
| conversationId | uuid | Pass it back as conversationId to ask a follow-up. |
| turnId | uuid | |
Ask a question
POST/v1/workspaces/{workspaceId}/ask
A cited answer from the workspace's sources. In reasoning mode (the default) it counts against your AI Reasoning allowance, exactly as in the app, and answers 402 when that is used up; a declined answer is not counted. search mode is free. Needs the ask scope.
Parameters
| Name | Type | Description |
|---|
| workspaceId * | path · uuid | A workspace from GET /v1/workspaces |
Request body (application/json · V1AskRequest)
| Name | Type | Description |
|---|
| question * | string | The question, in plain language. |
| mode | "reasoning" | "search" | reasoning (default): a written answer, counted against your AI Reasoning allowance. search: the passages that answer it, free. |
| conversationId | uuid | Continue a conversation: the conversationId of an earlier answer. Omit to start a new one. |
Response 200 · V1Answer
| Name | Type | Description |
|---|
| answer | string | The answer; [n] markers refer to citations. |
| mode | "reasoning" | "search" | |
| abstained | boolean | True when the workspace does not hold enough to answer. A declined AI Reasoning answer is not counted against the allowance. |
| citations | V1Citation[] | |
| passages | V1Passage[] | Matching passages, quoted (search mode). |
| conversationId | uuid | Pass it back as conversationId to ask a follow-up. |
| turnId | uuid | |
Ask a question, streamed
POST/v1/workspaces/{workspaceId}/ask/stream
Server-Sent Events: token events carry the answer as it is written ({"text": …}), then one answer event carries the whole Answer, then the stream closes. A failure is an error event ({"code", "message"}). Access and the allowance are checked before the stream opens, so those refusals are ordinary 403 / 402 responses. Needs the ask scope.
Parameters
| Name | Type | Description |
|---|
| workspaceId * | path · uuid | A workspace from GET /v1/workspaces |
Request body (application/json · V1AskRequest)
| Name | Type | Description |
|---|
| question * | string | The question, in plain language. |
| mode | "reasoning" | "search" | reasoning (default): a written answer, counted against your AI Reasoning allowance. search: the passages that answer it, free. |
| conversationId | uuid | Continue a conversation: the conversationId of an earlier answer. Omit to start a new one. |
Response 200 · SseEmitter
| Name | Type | Description |
|---|
| timeout | integer | |