Skip to main content

Overview

Streaming allows you to receive responses in real-time as they’re generated, instead of waiting for the complete response.

Enable Streaming

Set stream: true in your request:

Stream Format

Responses are sent as Server-Sent Events (SSE):

Error Handling

Use Cases

  • Chatbots: Display responses as they’re typed
  • Code generation: Show code as it’s written
  • Long-form content: Stream articles/essays
  • Better UX: Reduce perceived latency
All chat models support streaming, including GPU TEE confidential models.