# Streaming & recovery

Receive generation previews and reconnect to the same task after a disconnect.

## Start a stream

```bash
curl -N https://noveadream.com/v1/nai/generations/stream \
  -H "Authorization: Bearer $NOVEA_API_KEY" \
  -H "Content-Type: application/json" \
  -d @request.json
```

request.json contains the full quoted request, including quote_id and client_request_id. This endpoint uses SSE; handle preview, queued, done, error and keepalive events.

## Resume an existing task

```bash
curl -N https://noveadream.com/v1/nai/generations/456/events \
  -H "Authorization: Bearer $NOVEA_API_KEY"
```

```bash
curl --fail-with-body 'https://noveadream.com/v1/nai/generations/456' \
  -H "Authorization: Bearer $NOVEA_API_KEY"
```

Replace 456 with the task ID. Continue querying the same ID after disconnecting.
