# Get voice changer status

`GET http://127.0.0.1:19470/v1/status`

Returns the current state of the voice changer, the selected voice and,
while it runs, the voice changer's delay (`latencyMs`). Call it again, or
follow `GET /v1/events`, to see the latency change.

Authenticate with `Authorization: Bearer <API key>` (key from Settings > Developer in Voices AI Live).

## Responses

### 200: Current status

- `state` (string, required): Current state of the voice changer One of: `idle`, `starting`, `running`, `stopping`, `error`.
- `message` (string, required)
- `voiceId` (string or null, required): Currently selected voice ID, or null if none selected
- `latencyMs` (integer or null, required): How far the changed voice lags behind your microphone, in milliseconds: the measured end-to-end delay, smoothed and rounded to 10 ms. Null while the voice changer isn't running. Delay your camera by this much (for example with a video delay filter in OBS) to keep it in sync with your voice.

```json
{
  "state": "running",
  "message": "Voice changer is running.",
  "voiceId": "voice_james",
  "latencyMs": 190
}
```

### 401: Invalid or missing API key

- `error` (string, required): Error message

```json
{
  "error": "Invalid or missing API key"
}
```

## Examples

```bash
curl http://127.0.0.1:19470/v1/status \
  -H "Authorization: Bearer $VOICES_AI_API_KEY"
```

```javascript
const res = await fetch('http://127.0.0.1:19470/v1/status', {
  headers: {
    Authorization: `Bearer ${process.env.VOICES_AI_API_KEY}`,
  },
});
const data = await res.json();
```

```python
import os
import requests

res = requests.get(
    "http://127.0.0.1:19470/v1/status",
    headers={"Authorization": f"Bearer {os.environ['VOICES_AI_API_KEY']}"},
)
print(res.json())
```
