DocsLocal REST API
View .md

Local REST API Overview

Base URL, JSON serialization rules, TriggerRequest schema, localhost-only security boundary, and HTTP status codes for all 76 DVE FX API endpoints.

Every DVE FX instance hosts an embedded local HTTP server (default http://0.0.0.0:8090, reachable locally at http://127.0.0.1:8090) serving a minimal read-only Engine Status, Diagnostics & API page at / (plus a local license modal for headless installations) and 76 /api/v1/* JSON, SSE, and control endpoints across 72 unique paths for the Bitfocus Companion plugin, Stream Deck, external controllers, and vMix scripts.

Companion & External Controller Primitives

In addition to transition triggers and MultiView controls, DVE FX exposes dedicated endpoints for native Bitfocus Companion plugins and external automation:

  • GET /api/v1/info: Lightweight capabilities, version, transport protocol, license edition, and switcher connection summary.
  • GET /api/v1/events: Server-Sent Events (text/event-stream) stream pushing compact state, tally, active preset, graphic slot, look, and fader updates without high-rate polling.
  • GET /api/v1/looks, GET /api/v1/show_packs & POST /api/v1/look/recall: Enumerate built-in Show Packs and saved Looks and recall any look dynamically via { "id": "boardroom_lounge", "apply_dock_kit": false }.
  • GET/POST /api/v1/transition/fader: Bidirectional manual T-Bar scrubbing synchronized with the per-slot half T-Bars docked in vMix.
  • GET/POST /api/v1/camera_fx* & GET/POST /api/v1/translate/*: Control per-camera Camera FX (Blur, Alpha removal, 4-Face Skin Touch-Up, Auto-Reframe, 3D LUTs) and Live Captions & Translation without exposing private keys or stream credentials.
  • GET /api/v1/preview.png: Lightweight RGBA PNG snapshot of the current Program Return frame (Cache-Control: no-store).

Conventions & Serialization

  • All JSON enum variants use snake_case serialization (for example, "spring_reflow", "motion_masked", "chamfer_octagon").
  • Mutating POST endpoints accept Content-Type: application/json (except /api/v1/transition and /api/v1/preview_fx, which also accept an empty body to fire the currently selected preset and duration).
  • Numeric parameters such as duration_ms (180..=3000, or 350..=1800 for stingers) and feather_px (0.0..=120.0) are clamped server-side.

TriggerRequest Schema

Used by POST /api/v1/transition and POST /api/v1/preview_fx:

{
  "preset": "spring_reflow",
  "duration_ms": 750,
  "handoff_mode": "motion_masked",
  "target_layout": null,
  "hold_on_return": false
}
Field Type Default / Notes
preset string | null Optional TransitionPreset ID (see Presets, Wipes & Audio SFX). When omitted (or on an empty POST body), fires the active preset and duration.
duration_ms number | null Defaults to the active duration when preset is omitted, or 750 when preset is specified (clamped to 180..=3000).
handoff_mode string | null Optional "motion_masked", "frame_delay_sync", or "unmasked_cut".
target_layout string | null Optional layout override used in demo / studio-layout mode.
hold_on_return boolean Optional (false by default). Keeps output latched on DVE FX Return after the transition completes.

Security Boundaries & CSRF Protection

  • Loopback-Only Admin Routes: GET /api/v1/license, POST /api/v1/license, POST /api/v1/setup/open_presets, and POST /api/v1/benchmark/m0 strictly require a loopback client (127.0.0.1 or ::1). Remote LAN callers receive 403 Forbidden.
  • LAN Filesystem Isolation & Credential Masking: Remote LAN callers cannot inject arbitrary local or UNC filesystem paths into POST /api/v1/brand, POST /api/v1/brand_override, POST /api/v1/stingers, or POST /api/v1/graphics/slot (returns 403 Forbidden). GET /api/v1/translate/status never exposes RTMP stream keys or portal credentials.
  • Cross-Site CSRF Guard: Browser requests with Sec-Fetch-Site: cross-site or a mismatched Origin header are rejected with 403 Forbidden, while non-browser automation tools (curl, Bitfocus Companion, vMix VB.NET WebClient) connect directly.

HTTP Status & Error Codes

Status Meaning
200 OK Synchronous query or configuration update applied.
202 Accepted Asynchronous engine transition, vMix command, or benchmark queued cleanly.
204 No Content /api/v1/preview.bmp or /api/v1/preview.png has not yet produced a preview frame.
400 Bad Request Invalid slot index, empty/oversized field, invalid/duplicate hotkey binding, or invalid upload payload.
403 Forbidden Cross-site browser CSRF request, remote LAN access to a localhost-only endpoint, or disallowed LAN filesystem path.
404 Not Found Requested built-in or saved id on /api/v1/look/recall was not found.
422 Unprocessable Entity Malformed JSON, unknown enum variant, or rejected Ed25519 license token.
503 Service Unavailable Engine command channel is closed (DVE FX is shutting down).
504 Gateway Timeout Timed out waiting for engine confirmation on synchronous upload, vMix sync, or license update.