LiveWing
API Reference

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>:8099

Authentication 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"] } }
TopicDescription
tallyProgram/preview tally state
switcher.stateCurrent switcher state
audio.levelsReal-time metering (configurable interval)
audio.configAudio configuration changes
output.<N>.statsStreaming/recording stats for output N
output.<N>.stateState changes for output N
inputsInput list changes
replay.stateReplay mode and playback state
replay.positionReplay playhead position (configurable interval)
presetsPreset list changes
transformsTransform state changes
input.overlaysOverlay assignments on inputs
program.overlaysOverlay assignments on program output
displaysFullscreen display state
source.healthPer-source signal status

Rate limits

ScopeLimit
Commands100 / second
Subscription changes30 / minute
system.getState5 / minute

Error codes

CodeMeaning
AUTH_FAILEDToken is incorrect
AUTH_TIMEOUTAuth not sent within 5 seconds
AUTH_RATE_LIMITEDToo many failed attempts
COMMAND_NOT_FOUNDUnknown command type
INVALID_PARAMSMissing or wrong-type params
COMMAND_FAILEDValid command, could not execute
RESOURCE_NOT_FOUNDReferenced ID does not exist
STATE_ERRORCommand invalid in current app state
PROTOCOL_ERRORMessage is not valid JSON

On this page