Streaming

Receive Anthropic-compatible server-sent events while preserving actor attribution.

Set stream to true on a message request to receive text/event-stream output.

{
  "mind_id": "mind_example",
  "actor_id": "user_123",
  "model": "sonnet",
  "max_tokens": 256,
  "stream": true,
  "messages": [{ "role": "user", "content": "Draft my update." }]
}

The event sequence follows the Anthropic Messages streaming shape. Read the x-mind-request-id response header before consuming the body if your HTTP client exposes headers separately.

Streaming requests use eventual consistency. Do not set mind_consistency to required; the API rejects that combination with 400. When you need to observe the later update, poll the request-status endpoint using the request ID.

If the client disconnects after the request is accepted, the final outcome can be uncertain. Use the request-status endpoint before starting dependent work.