Skip to main content
The Chat Completions endpoint streams responses by default using server-sent events (SSE). Each chunk is prefixed with data: and the stream ends with data: [DONE].

Streaming

Parse the SSE stream in real time. Each chunk contains a delta object with incremental content.

Non-streaming

Set stream to false to receive the complete response in a single JSON payload.