Skip to main content
Version: 5.0.0

Visibox API

Visibox exposes a local network API that enables remote control, automation, and custom integrations. This page is a developer reference — if you want to use Visibox through an AI assistant or a shell, see AI Assistants or Command Line Interface instead.

note

API access requires a Pro plan with the API entitlement.

Overview

The API runs in a separate process for stability — if your integration misbehaves, it will not affect Visibox itself. Three services are available:

ServicePortProtocolDescription
WebSocket51734ws://Real-time bidirectional communication. State updates are pushed to connected clients instantly.
HTTP REST51736http://Standard request/response for querying state and sending commands.
OSC51735UDPOpen Sound Control (coming soon).

All services bind to all network interfaces on the machine, so any device on the same local network can connect.

Service Discovery

Visibox advertises itself on the local network using Bonjour (mDNS/DNS-SD). Applications can discover Visibox automatically without knowing its IP address:

Service TypeDescription
_visibox._tcpWebSocket API
_http._tcpHTTP REST API

The advertised TXT records include the API version, hostname, platform, and port numbers.

Authentication

Localhost (Same Machine)

Connections from 127.0.0.1 or ::1 (localhost) are automatically authenticated. No pairing or token is needed. This enables integrations running on the same machine — like the Stream Deck plugin, the CLI, and the MCP server — to connect seamlessly.

The localhost authentication exemption can be configured via the localhostAuthExempt setting in the API configuration. It is enabled by default.

Remote Devices (Pairing)

Devices connecting over the network must pair first using a one-time code. Open the Remote Pairing window (Window > Remote Pairing), where a 6-digit code is displayed. Enter this code on the remote device to establish a connection. Tokens are valid for 30 days.

Once paired, the remote device includes the token in every request — either as an Authorization: Bearer <token> HTTP header, or in the initial WebSocket auth message.

See Remote Pairing for full details.

HTTP REST API

Base URL: http://<visibox-ip>:51736

Health Check

GET /health

Returns a simple status response. No authentication required. Useful for verifying the API is running.

API Info

GET /api/info

Returns the API version and a list of available endpoints.

Pairing

POST /api/pair

Exchange a 6-digit OTP code for a JWT token:

{
"otp": "123456"
}

Returns:

{
"token": "eyJhbGciOi..."
}

Projects

GET /api/projects

List all open Projects with their IDs, names, song counts, and which one is active.

GET /api/projects/:projectId

Get full data for a specific Project — all Songs, Clips, files, Effects, Visualizers, and display options.

GET /api/projects/:projectId/playstate

Get the current playback state — which Clips are playing, their positions, durations, and directions.

GET /api/active

A convenience endpoint that returns the active Project and its playback state in a single request.

Drill-Down Endpoints

For granular access to specific parts of a Project without fetching the entire data structure:

GET /api/projects/:projectId/songs

List all Songs in a Project with their IDs, titles, clip counts, and audio info.

GET /api/projects/:projectId/songs/:songId

Get full data for a specific Song — all Clips, audio settings, and metadata.

GET /api/projects/:projectId/songs/:songId/clips/:clipId

Get data for a specific Clip — file info, options, effects, and current state.

GET /api/projects/:projectId/effects

List all Effects in a Project with their IDs, names, types, and linked status.

GET /api/projects/:projectId/visualizers

List all Visualizers in a Project with their IDs, names, engines, and linked status.

Media

GET /thumbnails/:projectId/:fileId.jpg

Get a Clip’s thumbnail image. Optional query parameters:

ParameterDefaultDescription
sizeoriginalSquare output size in pixels (16–512).
overlaynoneOverlay icon: play, pause, or none.
formatjpegOutput format: jpeg or png.
quality85JPEG quality (1–100).
GET /waveforms/:projectId/:fileId.png

Get a waveform image for an audio file.

Cameras

GET /api/cameras

List available cameras with their device IDs and labels.

GET /camera-thumbnails/:cameraId.jpg

Get a live camera thumbnail (updated every 5 seconds when the camera is active). Use default as the camera ID to get the default camera.

Sending Commands

POST /api/v1/action

Send a playback or system action. The request body specifies the action name and parameters:

{
"action": {
"name": "PlayClipByIndexAction",
"params": ["0", "1"]
}
}
POST /api/v1/edit

Send a project edit (add/remove/modify Songs, Clips, Effects, or Visualizers).

WebSocket API

Connect to: ws://<visibox-ip>:51734

The WebSocket API provides real-time, bidirectional communication. Connect once, authenticate, and you will receive state updates pushed instantly as things change in Visibox — no polling required.

Connecting

After establishing the WebSocket connection, send an auth message:

{
"type": "auth",
"payload": {
"token": "your-jwt-token"
}
}

On success, the server responds with a connected event containing your client ID.

Receiving State Updates

The server pushes state-update events whenever something changes:

{
"type": "event",
"payload": {
"event": "state-update",
"updates": [
{
"updateType": "playstate",
"projectId": "p1234567890",
"data": {
"event": "clip-play-state-changed",
"clipID": "c001",
"newState": "playing"
}
}
]
}
}

Update types include: project, playstate, clip, song, volume, and full (complete state refresh).

Sending Actions

Send commands via the action message type:

{
"type": "action",
"payload": {
"action": {
"name": "NextSongAction",
"params": []
}
},
"correlationId": "req-123"
}

The server responds with an action-response message containing the same correlationId, so you can match responses to requests.

Available Actions

Playback

ActionParametersDescription
PlayClipByIndexActionsongIndex, clipIndexPlay a Clip by its position.
PlayClipActionclipIdPlay a specific Clip by ID.
TriggerClipActionclipIdTrigger a Clip (respects retrigger behavior).
StopActionStop all playback.
StopClipActionclipIdStop a specific Clip.
StopAllClipsActionStop all Clips.
PauseActionPause playback.
PauseToggleActionToggle pause state.
ResumeActionResume from pause.
PlayActionStart playback.
RestartClipActionclipIdRestart a Clip from the beginning.
ActionParametersDescription
SongSelectActionsongIndexSelect a Song by its position.
SongSelectByIdActionsongIdSelect a Song by ID.
NextClipActionAdvance to the next Clip.
PrevClipActionGo to the previous Clip.
NextSongActionAdvance to the next Song.
PrevSongActionGo to the previous Song.

Seeking & Direction

ActionParametersDescription
SeekClipActionclipId, positionSeek a Clip to a position (seconds).
SeekSongActionsongId, positionSeek Song audio to a position (seconds).
ClipDirectionActionclipId, directionSet Clip direction: forward or reverse.

Volume & System

ActionParametersDescription
OutputLevelActionlevel (0–1)Set master volume.
MuteToggleActionToggle mute.
PanicActionEmergency reload of all windows.
FullscreenToggleActionToggle fullscreen mode.

MCP Tools Reference

The AI Assistants integration is powered by an MCP server that exposes a set of tools to AI clients. For end-user setup, see the AI Assistants page. This section is the developer reference for the tools themselves.

Query Tools

ToolDescription
visibox_get_projectsList all open Projects.
visibox_get_projectGet full data for a Project — Songs, Clips, files, Effects, Visualizers.
visibox_get_active_projectGet the active Project and its playback state in one call.
visibox_get_playstateGet playback state for a Project.
visibox_get_app_stateGet app-level state — fullscreen, mute, volume level.
visibox_get_presetsList all Effect and Visualizer presets. Optionally include full preset data.
visibox_get_presetGet full data for a single preset by ID and type.

Edit Tools

ToolDescription
visibox_clip_editAdd, move, duplicate, delete Clips, or update Clip options (filters, effects, visualizers).
visibox_song_editAdd, move, duplicate, delete Songs, or manage Song audio and titles.
visibox_project_editUndo, redo, update display options, manage Background Clips, adjust zoom.
visibox_effect_editAdd, update, remove, or copy Effects in a Project.
visibox_visualizer_editAdd, update, remove, or copy Visualizers in a Project.
visibox_preset_editAdd, update, or remove user Effects and Visualizers in the preset store.

Action Tools

ToolDescription
visibox_playbackAll playback controls — play, stop, pause, resume, trigger Clips, navigate Songs, seek, adjust volume.
visibox_systemSystem controls — toggle fullscreen, toggle mute, panic (emergency reload).

Live Editor Updates

When a visibox_effect_edit or visibox_visualizer_edit tool call modifies a preset, the corresponding Editor window updates in real time if it’s open — code changes, parameter changes, and the live preview all reflect the edit as it happens. This enables collaborative iteration with AI tools while watching the result live.

Stream Deck Plugin

Visibox 5.0 includes an official Elgato Stream Deck plugin that connects via this API. See the Stream Deck page for full details.

Security

The API is designed for local network use. A few things to keep in mind:

  • All communication is unencrypted (HTTP and WebSocket, not HTTPS or WSS). Do not expose these ports to the public internet.
  • Localhost connections bypass authentication — this is by design, for integrations running on the same machine.
  • OTP codes expire after 5 minutes.

Error Handling

HTTP Status Codes

CodeMeaning
400Bad request — invalid parameters.
401Authentication required or invalid token.
404Resource not found.
500Server error.
503Service unavailable — API not ready yet.

WebSocket Error Types

TypeDescription
AUTHENTICATION_FAILEDInvalid token.
ACTION_FAILEDThe requested action could not be executed.
INVALID_MESSAGEMalformed message.
RATE_LIMITEDToo many requests.
SERVER_ERRORInternal server error.