API Reference
Remote control LiveWing via its WebSocket API.
LiveWing exposes a WebSocket API on port 8099 for remote control, automation, and third-party integration. The API uses a JSON protocol over WebSocket and covers switching, audio, outputs, replay, overlays, inputs, and system state.
Connection
ws://<host>:8099Authentication must be the first message sent after connecting — any other command before auth is rejected.
Authentication
Send system.auth within 5 seconds of connecting or the server closes the connection.
// Request
{ "id": "1", "type": "system.auth", "params": { "token": "your-token" } }
// Success
{ "id": "1", "status": "ok", "data": {} }
// Failure
{ "id": "1", "status": "error", "error": { "code": "AUTH_FAILED", "message": "Invalid token" } }The shared token is configured in LiveWing settings and stored in the macOS Keychain. After 5 failed attempts the connection is dropped.
Protocol
All messages are UTF-8 JSON objects.
Client → Server
{ "id": "<string>", "type": "domain.action", "params": {} }Server → Client (response)
{ "id": "<string>", "status": "ok", "data": {} }
{ "id": "<string>", "status": "error", "error": { "code": "ERROR_CODE", "message": "..." } }Server → Client (push event)
{ "event": "topic.name", "data": {} }Use system.describe to discover all available commands and topics at runtime.
Subscriptions
Subscribe to real-time push events without polling.
{ "id": "1", "type": "system.subscribe", "params": { "topics": ["switcher.state", "audio.levels"] } }
{ "id": "2", "type": "system.unsubscribe", "params": { "topics": ["audio.levels"] } }| Topic | Description |
|---|---|
tally | Program/preview tally state |
switcher.state | Current switcher state |
audio.levels | Real-time metering (configurable interval) |
audio.config | Audio configuration changes |
output.<N>.stats | Streaming/recording stats for output N |
output.<N>.state | State changes for output N |
inputs | Input list changes |
replay.state | Replay mode and playback state |
replay.position | Replay playhead position (configurable interval) |
presets | Preset list changes |
transforms | Transform state changes |
input.overlays | Overlay assignments on inputs |
program.overlays | Overlay assignments on program output |
displays | Fullscreen display state |
source.health | Per-source signal status |
Rate limits
| Scope | Limit |
|---|---|
| Commands | 100 / second |
| Subscription changes | 30 / minute |
system.getState | 5 / minute |
Error codes
| Code | Meaning |
|---|---|
AUTH_FAILED | Token is incorrect |
AUTH_TIMEOUT | Auth not sent within 5 seconds |
AUTH_RATE_LIMITED | Too many failed attempts |
COMMAND_NOT_FOUND | Unknown command type |
INVALID_PARAMS | Missing or wrong-type params |
COMMAND_FAILED | Valid command, could not execute |
RESOURCE_NOT_FOUND | Referenced ID does not exist |
STATE_ERROR | Command invalid in current app state |
PROTOCOL_ERROR | Message is not valid JSON |