Skip to main content

Overview

AtlasFlux supports streaming for both /v1/responses and /v1/chat/completions. Enable streaming by setting "stream": true in your request body.

How streaming works

When streaming is enabled, the API returns a text/event-stream response with Server-Sent Events (SSE). Tokens are delivered incrementally as they are generated.

Chat Completions streaming

Uses OpenAI-compatible SSE format:

Responses streaming

Uses AtlasFlux-specific event types:

Implementation tips

  • Parse SSE events line by line
  • Handle event: and data: fields separately
  • Accumulate text deltas for the full response
  • Handle connection drops gracefully with retry logic
  • The final event contains usage and cost information