> ## Documentation Index
> Fetch the complete documentation index at: https://docs.parallel.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Streaming Events

> Stream Responses API results as server-sent events

Set `stream: true` to receive the response as server-sent events (SSE,
`Content-Type: text/event-stream`) following the standard OpenAI Responses event sequence.
The stock OpenAI SDK's streaming interface works unchanged.

## Event sequence

```
response.created
response.in_progress
response.output_item.added
response.content_part.added
response.output_text.delta
response.output_text.annotation.added   (one per citation)
response.output_text.done
response.content_part.done
response.output_item.done
response.completed
```

Today the full answer text arrives as a single `response.output_text.delta` once research
completes — there is no token-by-token streaming yet. The early `response.created` and
`response.in_progress` events still arrive up front, so streaming works well as a connection
acknowledgment during longer requests. Consume deltas in a loop rather than assuming one
chunk; granularity may become finer in the future.

## Usage

<CodeGroup>
  ```bash cURL theme={"system"}
  # -N disables buffering so events print as they arrive
  curl -N https://api.parallel.ai/v1/responses \
    -H "Authorization: Bearer $PARALLEL_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "parallel",
      "input": "Who is the current CEO of Nvidia?",
      "reasoning": {"effort": "low"},
      "stream": true
    }'
  ```

  ```python Python theme={"system"}
  import os
  from openai import OpenAI

  client = OpenAI(
      api_key=os.environ["PARALLEL_API_KEY"],
      base_url="https://api.parallel.ai/v1",
  )

  stream = client.responses.create(
      model="parallel",
      input="Who is the current CEO of Nvidia?",
      reasoning={"effort": "low"},
      stream=True,
  )

  for event in stream:
      if event.type == "response.output_text.delta":
          print(event.delta, end="", flush=True)
      elif event.type == "response.completed":
          print()  # final Response object is on event.response
  ```

  ```typescript TypeScript theme={"system"}
  import OpenAI from "openai";

  const client = new OpenAI({
    apiKey: process.env.PARALLEL_API_KEY,
    baseURL: "https://api.parallel.ai/v1",
  });

  const stream = await client.responses.create({
    model: "parallel",
    input: "Who is the current CEO of Nvidia?",
    reasoning: { effort: "low" },
    stream: true,
  });

  for await (const event of stream) {
    if (event.type === "response.output_text.delta") {
      process.stdout.write(event.delta);
    } else if (event.type === "response.completed") {
      process.stdout.write("\n"); // final Response object is on event.response
    }
  }
  ```
</CodeGroup>

The `response.completed` event carries the complete final Response object — the same shape
a non-streaming request returns, including `usage`.

Source citations arrive as `response.output_text.annotation.added` events after the text
delta — see [Citations](/responses-api/features/citations).
