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

# Stream Run Events

> Stream real-time Server-Sent Events (SSE) for a workflow run

This endpoint streams real-time events for a workflow run using [Server-Sent Events (SSE)](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events). It provides instant notifications as nodes start, produce output, and when the run completes — eliminating the need to poll the run status endpoint.

## Event Format

Each SSE message has the following structure:

```
event: message
data: {"type": "content", "data": {...}, "redisId": "1234567890-0"}
```

### Event Types

| Type      | Description                                                                                                          |
| --------- | -------------------------------------------------------------------------------------------------------------------- |
| `content` | Node status changes and streaming output. Contains `id` (node ID), `status`, and optionally `content` (text output). |
| `state`   | Run progress state. Contains `progress_details` and overall `status`.                                                |

### Terminal Events

The stream ends when a content event includes `workflow_status` set to `"completed"` or `"failed"`.

## Resumable Streaming

Pass the `etag` query parameter with a `redisId` value from a previous event to resume streaming from that point. This is useful for recovering from connection drops.

## Example

```bash theme={null}
curl -N -H "X-API-Key: your-api-key" \
  "https://backend.noxus.ai/v1/runs/{run_id}/events"
```

```python theme={null}
from noxus_sdk.client import Client

client = Client(api_key="your-api-key")
workflow = client.workflows.get("workflow-id")
run = workflow.run(body={"Input 1": "Hello"})

for event in run.stream():
    if event.type == "content":
        print(event.data)
    if event.is_terminal:
        break
```


## OpenAPI

````yaml get /v1/runs/{run_id}/events
openapi: 3.1.0
info:
  title: Noxus Backend
  description: >-
    Backend API for the Noxus Platform. More information can be found at
    https://docs.noxus.ai
  version: 1.1.0
servers: []
security: []
paths:
  /v1/runs/{run_id}/events:
    get:
      tags:
        - V1 - Runs
      summary: Public Run Events
      operationId: public_run_events
      parameters:
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            title: Run Id
        - name: etag
          in: query
          required: false
          schema:
            type: string
            title: Etag
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````