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

# Streaming

> Show what the AI is thinking and browsing

## Stream Event Types

### 1. Thoughts and Actions

```python theme={null}
from openai import OpenAI

client = OpenAI(
    api_key="not-needed",
    base_url="http://127.0.0.1:8000"
)

stream = client.responses.create(
    model="not-needed",
    input="Search for Python documentation",
    stream=True
)

for event in stream:
    if event.type == "response.output_text.delta":
        # Real-time thoughts and actions (contains spaces)
        if ' ' in event.delta:
            print(event.delta, end="", flush=True)
    elif event.type == "response.completed":
        # Final result
        print("\nTask completed:", event.response.output[0].content[0].text)
```

### 2. Screenshots

```python theme={null}
for event in stream:
    if event.type == "response.output_text.delta":
        # Screenshot data (no spaces)
        if ' ' not in event.delta:
            print("Screenshot data received:", event.delta)
```

### 3. Task Progress

```python theme={null}
for event in stream:
    match event.type:
        case "response.created":
            print("Task created")
        case "response.in_progress":
            print("Task started")
        case "response.output_text.delta":
            # Process updates
            pass
        case "response.output_text.done":
            print("Intermediate result completed")
        case "response.completed":
            print("Task finished")
```

## Next Steps

* Learn about [Concurrency](/guides/concurrency) for handling multiple streams
* Explore [Caching](/guides/caching)
* Configure [Settings](/guides/settings) and [Constraints](/guides/constraints)
