Streaming — ML Junction docs
Set stream=true on POST /v1/responses to receive Server-Sent Events. The response uses Content-Type: text/event-stream, Cache-Control: no-cache, and disables reverse-proxy buffering.
curl -N "$ASTRO_BASE_URL/v1/responses" \
-H "Authorization: Bearer $ASTRO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.5",
"stream": true,
"messages": [
{ "role": "user", "content": "Write a short deployment checklist." }
],
"output": {
"streaming_mode": "text"
}
}'
Mode · Use text · Normal incremental text delivery buffered · Hold structured output until validation completes raw_compat · Compatibility-oriented raw stream behavior
Do not retry a stream after user-visible content has been emitted unless your UI can explicitly represent a restarted answer.. Use an AbortController or equivalent cancellation primitive when the user stops generation.. Disable intermediary buffering in Nginx, CDNs, and serverless proxies.. Expect usage and final receipt information near stream completion rather than on every token event.. Requests carrying reasoning continuation state are buffered so terminal provider state can be verified and a pre-commit provider failure can fall back safely.
Canonical URL: https://mljunction.com/docs/streaming