Single-shot Q&A over project, org, or Open Library knowledge

Stateless query endpoint — does not persist a chat history. Use this for one-off questions. For multi-turn conversation, use POST /chat instead. `search_scope` picks the corpus: `project` (default, `project_id` required), `org` (the org's own documents), or `open_library` (the shared Open Library corpus of Hong Kong government engineering documents — requires the `api.open_library` feature).

Authentication

AuthorizationBearer

Pyramid API key (prefix with “Bearer ”)

Request

This endpoint expects an object.
querystringRequired<=100000 characters
project_idstringOptionalformat: "uuid"

Required when search_scope is “project” (the default); must be omitted for “org” and “open_library”.

max_sourcesintegerOptional1-20Defaults to 5
response_formatenumOptionalDefaults to text
Allowed values:
response_schemaobjectOptional

JSON schema for structured output (required when response_format=json)

search_scopeenumOptional
Which corpus the query searches. Exclusive — one request searches one corpus. - `project` — the given project's document chunks (`project_id` required). - `org` — the organization's own org-level documents (`project_id` must be omitted). - `open_library` — the shared Open Library corpus of Hong Kong government engineering documents (`project_id` must be omitted). Requires the `api.open_library` feature to be enabled for your organization. When omitted, the scope is derived for backward compatibility: `project` when `project_id` is present, `org` otherwise.
Allowed values:

Response

Query result
request_idstringformat: "uuid"

Server-generated per-request UUID. Also sent as X-Request-Id response header. Include in support tickets.

successany
dataobjectOptional
paginationobjectOptional

Present only on list endpoints. Top-level (not nested inside data).

Errors

400
Bad Request Error
401
Unauthorized Error