Events
OpenAI Chat events

OpenAI Chat Completions — Event Reference

This page documents the streaming frames emitted by POST /api/openai/v1/chat/completions when stream: true.

Frame shape

Each line is an SSE data: JSON object.

Notes:

  • Initial chunk includes role: "assistant".
  • Text arrives via choices[0].delta.content.
  • Tool calling deltas use choices[0].delta.tool_calls[].function.arguments.
  • The terminal chunk sets finish_reason to stop, length, or tool_calls.
  • When stream_options.include_usage is true, an extra usage-only chunk precedes [DONE].

See also