ReferenceSearch

Stream a search answer

Same pipeline as `POST /search`, delivered as Server-Sent Events.

The source list arrives before the first answer token. That ordering is deliberate and guaranteed: a reader sees the grounding before the prose, so a hallucination is visible against its citations rather than after them.

Event sequence:

event: sources     data: { "citations": [...] }
event: token       data: { "text": "The Acme" }
event: token       data: { "text": " expansion deal" }
event: done        data: { "answer": "...", "suggested_followups": [...] }
POST
/api/v1/memory/search/stream

Authorization

x-api-key<token>

A platform key (ck_live_…) — reaches every memory in the tenant.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

text/event-stream

curl -X POST "https://example.com/api/v1/memory/search/stream" \  -H "Content-Type: application/json" \  -d '{    "query": "string"  }'
"string"
Was this page helpful?
Report an issue