---
title: "Real-time task event stream (SSE)"
method: GET
path: "/v1/tasks/stream"
tags: ["Tasks"]
---

# Real-time task event stream (SSE)

`GET /v1/tasks/stream`

## Request

- Base URL: `https://nanostudiopro.com/api`
- URL: `https://nanostudiopro.com/api/v1/tasks/stream`
- Auth: HTTP bearer

Server-Sent Events firehose. Hold the connection open and you'll receive a JSON event every time one of *your* tasks changes state — queued → running → complete (or failed/canceled). Each event has the same shape as `GET /v1/tasks/{id}` so you can reuse the same parser. Lets you replace polling with `for await (const event of stream)` patterns.

**Heartbeats** every 25s prevent reverse proxies from killing idle connections. Browser EventSource and most SSE libraries auto-reconnect on drop; on reconnect, fetch `GET /v1/tasks?completedAfter=<last_seen>` to backfill anything missed during the disconnect window.

**Event shape:**
```
data: { "type": "task.update", "task": { ...Task } }

data: { "type": "heartbeat" }
```

## Response `200`

Event stream.

## Other responses

- `401`: Missing or invalid token
- `429`: Rate limit exceeded

---

[API](https://skmtc.dev/nanostudiopro/apis/nano-studio-pro-api.md) · [All operations](https://skmtc.dev/nanostudiopro/apis/nano-studio-pro-api/llms.txt) · [OpenAPI document](https://skmtc.dev/nanostudiopro/apis/nano-studio-pro-api/revisions/b454211e598e?raw)
