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

# Subscribe to generation progress

WebSocket endpoint. Send `{ "type": "ping" }` to receive a pong; progress messages have `type: "progress"` and state replay messages have `type: "state"`.

` GET /api/ws/{demoId} `

Subscribe to generation progress

WebSocket endpoint. Send `{ "type": "ping" }` to receive a pong; progress messages have `type: "progress"` and state replay messages have `type: "state"`.

## Servers

- ` https://littledemo.com ` — Production

## Parameters

### ` demoId ` (path, required)

- ` value `: type ` string `

## Responses

### ` 101 ` — WebSocket upgrade

### ` 426 ` — Expected WebSocket upgrade

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` error `

  - ` error `: type ` string `

## Request examples

### cURL

```curl
curl -X GET 'https://littledemo.com/api/ws/string' \
  -H 'Authorization: Bearer YOUR_API_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://littledemo.com/api/ws/string', {
  method: 'GET',
  headers: {
      "Authorization": "Bearer YOUR_API_TOKEN"
  }
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN'
}

response = requests.get('https://littledemo.com/api/ws/string', headers=headers)
print(response.json())
```