The API runs in the Windows and macOS desktop app, not on
sonoran.studio. Keep the desktop app open and signed in. Lighting and Streamer.bot control require Sonoran Studio Pro or Sonoran One.Quick start
The default base URL is:available scene:
POST requests must use Content-Type: application/json.
Endpoint reference
Successful JSON responses contain
"ok": true. Errors contain "ok": false, an error code, and a human-readable message.
The unversioned /fivem and /lspdfr routes are reserved for bundled Sonoran Studio game integrations. Third-party integrations should use the versioned /api/v1 endpoints; LSPDFR overlay events are accepted only through the signed-in Studio desktop session.
Status and discovery
Discover endpoints
apiVersion, and the paths supported by the installed desktop app. Clients should use it when they need to detect API capabilities.
Get status
Lighting states
List states
state, display label, saved frame count, and whether at least one saved frame contains a bulb.
Activate a saved state
panic has priority: while it is active, other named states return HTTP 409 until restore is sent.
Bulbs
List configured bulbs
id in control and sequence requests. IDs are formed from the provider and device ID, are case-insensitive when supplied, and should otherwise be treated as opaque strings.
Set configured bulbs
color to use the bulb’s saved color. Up to 64 bulbs can be controlled in one request. #RRGGBB and rgb(r, g, b) colors are accepted; #000000 turns supported bulbs off.
Direct control cancels the currently looping scene and sets the current named state to restore.
Control an ad-hoc bulb descriptor
A bulb does not have to appear in a saved scene. Supply its provider descriptor instead ofid:
type can be wyze, philips, govee, or goveebt. mac is the provider’s device identifier rather than necessarily a network MAC address. Wyze and Govee Wi-Fi requests also require the device model. Using IDs returned by GET /lighting/bulbs is recommended because Studio fills these fields for you.
Temporary sequences
Start a finite sequence with one to 40 frames:delay is the number of milliseconds before the next frame and is clamped to 50–60000. repeat is optional, defaults to 1, and is clamped to 1–100. Each frame can contain up to 64 configured IDs, ad-hoc bulb descriptors, or a mixture of both.
The endpoint returns HTTP 202 as soon as Studio accepts the sequence. Playback continues locally. A later state, bulb, or sequence request cancels it. The final colors remain active after the last frame.
Streamer.bot actions
Enable and connect Streamer.bot in Sonoran Studio before using these endpoints.List actions
Invoke any action
id, name, or both. IDs are safer if action names may change. args is optional and is passed to Streamer.bot’s DoAction request. It can contain up to 50 flat string, finite number, or boolean values; nested objects and arrays are rejected.
Invoke a mapped Sonoran event
Use this endpoint when Sonoran Studio already maps an event to an action:409.
Complete client examples
JavaScript
This example uses the built-infetch available in current Node.js versions:
Python
This example uses only Python’s standard library:FiveM Lua
Legacy lighting endpoint
Existing integrations can continue to use:http://127.0.0.1:9990/lighting. Its state behavior and response codes match POST /api/v1/lighting/state. New integrations should use the versioned route.
LAN access and authentication
The server binds only to127.0.0.1 by default. This is the safest and recommended configuration.
To call Studio from another computer on the same trusted network:
- Enable Allow LAN control at the bottom of the desktop Smart Lighting panel.
- Select Copy LAN token.
- Replace
127.0.0.1with the Studio computer’s private LAN address. - Send the token in
X-Sonoran-Tokenor as a Bearer token.
9990 through a router or public firewall.
Browser and security behavior
Native programs and command-line tools do not send anOrigin header and can call the loopback API normally. Browser JavaScript is accepted only when its page is also served from localhost, 127.0.0.1, or ::1. Requests from public web origins are rejected to prevent a website from silently controlling local lights or Streamer.bot actions.
Request bodies are limited to 256 KiB. Provider credentials stay encrypted in the desktop app and are never accepted by or returned from this API.
HTTP status codes
Client code should use the HTTP status and the response’s
message; it should not depend on the exact wording of provider errors.
