Pipelines

Query pipeline

Execute a RAG query against a specific pipeline.

When the server is configured with identity.enabled, this endpoint requires a caller identity, supplied by the trusted proxy in front of the server as a JSON claim set in the configured claims header (default X-Forwarded-Claims) or a bare subject in the configured subject header (default X-Forwarded-User). The server does NOT verify those headers: it checks no signature, issuer, audience or expiry, and trusts whatever the proxy asserts. Anything able to reach this server's port directly can therefore assert any identity, so the deployment must ensure only a trusted proxy can — see docs/identity.md. Retrieval then runs as that caller and PostgreSQL row-level security decides what it may see. A request carrying no identity is refused with 401 IDENTITY_REQUIRED; there is no fallback to the service's own database role.

Identity error codes: IDENTITY_REQUIRED (401, no identity was presented), IDENTITY_MALFORMED (400, the claims header was not a JSON object), IDENTITY_UNTRUSTED_PEER (403, the request came from an address not permitted to assert an identity) and IDENTITY_ROLE_NOT_ALLOWED (403, the claims named a database role that is not on the server's allowlist).

post/pipelines/{name}

Path parameters

namestring required

Pipeline name

Request body

disable_hybridboolean

Skip the keyword-search arm for this request, using vector search alone. Reduces latency and database work. This can only turn hybrid search off: a request cannot enable it where the pipeline configuration has disabled it.

include_sourcesboolean

Request the source documents used to produce the answer. Honoured only if the pipeline is configured with allow_include_sources: true; otherwise the answer is returned without sources and the request still succeeds.

querystring required

The question to answer

streamboolean

Enable streaming response (SSE)

top_ninteger

Override default result limit

Response

Query response

answerstring required

The generated answer

tokens_usedinteger required

Total tokens consumed

Changes

Changed in 6 of the 13 revisions of this API.17

    • added the non-success response with the status 401

      response-non-success-status-added

    • added the non-success response with the status 403

      response-non-success-status-added

    • added the non-success response with the status 503

      response-non-success-status-added

    • added the non-success response with the status 504

      response-non-success-status-added

    • added the non-success response with the status 413

      response-non-success-status-added

    • added the new optional request property disable_hybrid

      new-optional-request-property

    • added the new optional request property filter

      new-optional-request-property

    • removed the request property filter

      request-property-removed

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog