Streaming
Set "stream": true on Chat Completions, Responses, or Messages requests to receive Server-Sent Events. Boltch forwards upstream chunks unchanged after a scrub pass.
Chunk shape
OpenAI-style endpoints emit chat.completion.chunk objects on each data: frame and finish with data: [DONE].
data: {"id":"chatcmpl-...","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":"Hel"}}]}
data: {"id":"chatcmpl-...","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":"lo"}}]}
data: [DONE]
Anthropic-style streams
Anthropic Messages emit message_start, content_block_start, content_block_delta, content_block_stop, and message_stop events per the Anthropic API contract. Boltch preserves event ordering and event names verbatim.
Counter pattern
Streaming requests perform exactly one KV read on entry, zero writes per chunk, and exactly one D1 write at exit. Per-chunk operations would push tail latency past the SSE budget; the proxy intentionally avoids them.
Curl example
curl https://api.boltch.cloud/v1/chat/completions \
-H "Authorization: Bearer YOUR_BOLTCH_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-6-sol",
"stream": true,
"messages": [{"role":"user","content":"Stream a haiku."}]
}'