query

Stream a knowledge-graph query response (SSE).

Stream a natural-language query response via Server-Sent Events (ADR-015 SSE framing protocol v1).

Pre-flight cost cap: If the tenant's daily cost cap is already exceeded, the server returns HTTP 402 before opening the SSE stream (ADR-015 §Cost-cap behaviour). Body: {"error": "cost_cap_exceeded", "current_spend": "<decimal>", "cap": "<decimal>"}. The same pre-flight gate also returns 402 {"error": "platform_budget_paused"} when the platform-wide daily spend cap is reached and this tenant is billed on the platform key (ADR-066); a tenant on their own key is unaffected.

Chunk ordering (normative): token* → source* → done.

Stage 1 stub: emits 2 hard-coded token chunks + 1 done chunk.

Versioning: Response header X-Andish-Stream-Version: 1 on every SSE response. Send X-Andish-Stream-Version-Accepted: 1 for v2 upgrade negotiation (ADR-015 §Versioning).

post/v1/query/stream

Request

  • Base URL: https://api.andish.ru (the document declares no server; this is the origin it was published from)
  • URL: https://api.andish.ru/v1/query/stream
  • Auth: none declared

Request body

querystring required

Natural-language question to ask the knowledge graph.

mode'mix' | 'local' | 'global' | 'naive'

Retrieval mode. mix (default) is recommended for production. local / global / naive are x-experimental.

include_sourcesboolean

When true, source chunks are emitted after the last token.

Response

Successful Response

Changes

No recorded changes to this operation across all 1 revision of this API.