Skip to main content
POST

Authorizations

Authorization
string
header
required

Shared-secret bearer token(s) configured via config.gateway.auth.tokens. Validated in constant time against a SHA-256 hash of each configured token, so neither timing nor length leaks which token matched. Set gateway.auth.mode: "none" in config to disable bearer auth (not recommended outside of localhost).

Body

application/json
question
string
required

The user's natural-language question. Non-empty — an empty string is rejected upstream because some LLM providers (Anthropic) reject empty user messages with a 400 mid-stream, surfacing as a vague "Provider returned error". Validating here gives a clean 400 with invalid_request instead.

Minimum string length: 1
Example:

"Summarize the latest quarterly results for Apple."

agents
object[]

Catalog of A2A peers the planner may call. Empty array = planner runs with no tools (useful for questions the configured planner LLM can answer on its own, e.g., general knowledge).

preferences
object

Caps and shaping hints. All keys are snake_case; an earlier draft declared them camelCase, which caused docs-compliant clients to silently lose the caps — the schema is now strict on casing and unknown keys pass through via additionalProperties: true for forward compatibility.

session_id
string

Opaque external session identifier. If provided AND a session row exists with the matching external_session_id, that session is resumed (history persists). If omitted or unmatched, a new session is created and its server-assigned id is surfaced in the first SSE session event.

Example:

"client-session-42"

Response

SSE stream of the plan. Each event is one of the types documented under SSEEvent below. The stream closes after event: done.

The text/event-stream body is a sequence of event: / data: pairs. Each data: value is a JSON object matching one of the SSEEvent_* schemas below. OpenAPI doesn't model SSE natively; $ref the per-event schemas to generate typed consumers.