Download OpenAPI specification:
JSON API for controlling WLED LED controllers. This API allows you to control LED effects, colors, and device settings.
WLED is a fast and feature-rich implementation of an ESP8266/ESP32 webserver to control NeoPixel (WS2812B, WS2811, SK6812) LEDs or also SPI based chipsets like the WS2801 and APA102.
Basic authentication can be enabled in WLED settings. When enabled, all API endpoints require basic auth.
Retrieve all essential WLED device information in a single comprehensive request. This is the most complete endpoint, containing device state, information, available effects, and palette names all in one response.
This endpoint is ideal for: - Initial application setup and discovery - Getting a complete snapshot of device capabilities - Reducing the number of API calls needed for full device status
Response contains: - state
: Complete current device state (same as /json/state) - info
: Complete device information (same as /json/info) - effects
: Array of effect names (same as /json/eff) - palettes
: Array of palette names (same as /json/pal)
Note: For detailed palette color data, use /json/palx
. For effect metadata, use /json/fxda
. This endpoint provides names and basic information only.
curl --request GET \ --url http://{host}/json
{- "state": {
- "on": true,
- "bri": 128,
- "transition": 7,
- "ps": -1,
- "pl": -1,
- "mainseg": 0,
- "seg": [
- {
- "id": 0,
- "start": 0,
- "stop": 30,
- "len": 30,
- "on": true,
- "bri": 255,
- "col": [
- [
- 255,
- 160,
- 0
], - [
- 0,
- 0,
- 0
], - [
- 0,
- 0,
- 0
]
], - "fx": 0,
- "sx": 128,
- "ix": 128,
- "pal": 0,
- "sel": true,
- "rev": false,
- "mi": false
}
], - "nl": {
- "on": false,
- "dur": 60,
- "mode": 1,
- "tbri": 5,
- "rem": -1
}, - "udpn": {
- "send": false,
- "recv": true,
- "sgrp": 1,
- "rgrp": 1
}
}, - "info": {
- "ver": "0.14.0",
- "vid": 2310130,
- "leds": {
- "count": 30,
- "pwr": 0,
- "fps": 42,
- "maxpwr": 0,
- "maxseg": 32,
- "lc": 1
}, - "name": "WLED",
- "udpport": 21324,
- "live": false,
- "liveseg": -1,
- "fxcount": 187,
- "palcount": 71,
- "wifi": {
- "bssid": "FC:EC:DA:A4:C4:77",
- "rssi": -60,
- "signal": 80,
- "channel": 1
}, - "fs": {
- "u": 12,
- "t": 983,
- "pmt": 0
}, - "ndc": 0,
- "arch": "esp32",
- "core": "v3.3.6-16-gcc5440f6a2",
- "freeheap": 200300,
- "uptime": 6,
- "time": "1970-1-1, 00:00:06",
- "opt": 79,
- "brand": "WLED",
- "product": "FOSS",
- "mac": "a842e38d9828",
- "ip": "192.168.1.40"
}, - "effects": [
- "Solid",
- "Blink",
- "Breathe",
- "Wipe",
- "Wipe Random",
- "Random Colors",
- "Sweep",
- "Dynamic",
- "Colorloop",
- "Rainbow"
], - "palettes": [
- "Default",
- "* Random Cycle",
- "* Color 1",
- "* Colors 1&2",
- "* Color Gradient",
- "Party",
- "Cloud",
- "Lava",
- "Ocean",
- "Forest"
]
}
Retrieve the current state of the WLED device including brightness, colors, effects, segments, and all other state properties.
{- "on": true,
- "bri": 128,
- "transition": 7,
- "ps": -1,
- "pl": -1,
- "mainseg": 0,
- "seg": [
- {
- "id": 0,
- "start": 0,
- "stop": 30,
- "on": true,
- "bri": 255,
- "col": [
- [
- 255,
- 160,
- 0
], - [
- 0,
- 0,
- 0
], - [
- 0,
- 0,
- 0
]
], - "fx": 0,
- "sx": 128,
- "ix": 128,
- "pal": 0
}
]
}
Update the WLED device state. All properties are optional - only include the properties you want to change. The device will respond with the updated state if the 'v' parameter is set to true.
State properties to update
on | boolean On/Off state of the light |
bri | integer [ 1 .. 255 ] Brightness of the light. Setting bri to 0 is supported but it is recommended to use the range 1-255 and use on: false to turn off. |
transition | integer [ 0 .. 255 ] Duration of the crossfade between different colors/brightness levels. One unit is 100ms, so a value of 4 results in a transition of 400ms. |
tt | integer [ 0 .. 255 ] Similar to transition, but applies to just the current API call. |
ps | integer [ -1 .. 65535 ] ID of preset to apply. -1 indicates no preset. |
psave | integer [ 1 .. 250 ] Save current light config to specified preset slot. |
pl | integer [ -1 .. 0 ] ID of playlist. -1 is off and 0 is on. |
object (Nightlight) Nightlight configuration for automatic dimming | |
object (UdpSync) UDP sync configuration for WLED broadcast synchronization | |
v | boolean If set to true, the response will contain the full JSON state object. |
rb | boolean If set to true, device will reboot immediately. |
live | boolean If set to true, enters realtime mode and blanks the LEDs. |
lor | integer [ 0 .. 2 ] Live data override. 0 is off, 1 is override until live data ends, 2 is override until ESP reboot. |
time | integer >= 0 Set module time to unix timestamp. |
mainseg | integer >= 0 Main Segment. |
object (Playlist) Custom preset playlists for automatically cycling through different presets. Not included in state response. Available since 0.11.0. | |
Array of objects (Segment) Array of segment objects to update. Only segments included will be modified. |
{- "on": true
}
{- "on": true,
- "bri": 128,
- "transition": 7,
- "ps": 1,
- "pl": -1,
- "mainseg": 0,
- "seg": [
- {
- "id": 0,
- "start": 0,
- "stop": 30,
- "on": true,
- "bri": 255,
- "col": [
- [
- 255,
- 0,
- 0
], - [
- 0,
- 0,
- 0
], - [
- 0,
- 0,
- 0
]
], - "fx": 0,
- "sx": 128,
- "ix": 128,
- "pal": 0
}
]
}
Retrieve both the current device state and device information in a single request. This endpoint combines the responses from /json/state
and /json/info
into one JSON object for efficiency.
The response contains: - state
: Current device state (brightness, effects, segments, etc.) - info
: Device information (version, hardware, capabilities, etc.)
#!/bin/bash # Get combined WLED device state and info curl -X GET "http://192.168.1.100/json/si" \ -H "Accept: application/json" \ -H "Content-Type: application/json"
{- "state": {
- "on": true,
- "bri": 128,
- "transition": 7,
- "ps": -1,
- "pl": -1,
- "mainseg": 0,
- "seg": [
- {
- "id": 0,
- "start": 0,
- "stop": 30,
- "len": 30,
- "on": true,
- "bri": 255,
- "col": [
- [
- 255,
- 160,
- 0
], - [
- 0,
- 0,
- 0
], - [
- 0,
- 0,
- 0
]
], - "fx": 0,
- "sx": 128,
- "ix": 128,
- "pal": 0,
- "sel": true,
- "rev": false,
- "mi": false
}
], - "nl": {
- "on": false,
- "dur": 60,
- "mode": 1,
- "tbri": 5,
- "rem": -1
}, - "udpn": {
- "send": false,
- "recv": true,
- "sgrp": 1,
- "rgrp": 1
}
}, - "info": {
- "ver": "0.14.0",
- "vid": 2310130,
- "leds": {
- "count": 30,
- "pwr": 0,
- "fps": 42,
- "maxpwr": 0,
- "maxseg": 32,
- "lc": 1
}, - "name": "WLED",
- "udpport": 21324,
- "live": false,
- "liveseg": -1,
- "fxcount": 187,
- "palcount": 71,
- "wifi": {
- "bssid": "FC:EC:DA:A4:C4:77",
- "rssi": -60,
- "signal": 80,
- "channel": 1
}, - "fs": {
- "u": 12,
- "t": 983,
- "pmt": 0
}, - "ndc": 0,
- "arch": "esp32",
- "core": "v3.3.6-16-gcc5440f6a2",
- "freeheap": 200300,
- "uptime": 6,
- "time": "1970-1-1, 00:00:06",
- "opt": 79,
- "brand": "WLED",
- "product": "FOSS",
- "mac": "a842e38d9828",
- "ip": "192.168.1.40"
}
}
Retrieve the complete WLED device configuration including network settings, hardware configuration, lighting parameters, and all other system settings. Note: Sensitive information like WiFi passwords are not returned in full.
{- "id": {
- "name": "WLED-Living-Room",
- "inv": "Generic ESP32"
}, - "nw": {
- "ins": [
- {
- "ssid": "MyWiFiNetwork",
- "pskl": 12,
- "ip": [
- 192,
- 168,
- 1,
- 100
], - "gw": [
- 192,
- 168,
- 1,
- 1
], - "sn": [
- 255,
- 255,
- 255,
- 0
]
}
]
}, - "def": {
- "ps": 1,
- "on": true,
- "bri": 128
}, - "hw": {
- "led": {
- "total": 144,
- "maxpwr": 850
}
}, - "light": {
- "scale-bri": 100,
- "aseg": true
}
}
Update WLED device configuration. All properties are optional - only include the properties you want to change. WARNING: Incorrect configuration changes can render the device inaccessible. Always backup configurations before making changes. The device may reboot after certain configuration changes.
Configuration properties to update
object (AccessPointConfig) Information about the access point that the ESP hosts when enabled, or when connecting to other AP fails | |
object (DefaultConfig) Default settings for WLED device after power-up | |
object (DmxConfig) DMX configuration settings (only included in some WLED builds) | |
object (EthernetConfig) Ethernet configuration settings | |
object (HardwareConfig) Hardware configuration settings | |
object (DeviceIdentification) Device identification and naming configuration | |
object (InterfaceConfig) Interface configuration settings for various protocols and services | |
object (LightConfig) Light configuration settings | |
object (NetworkConfig) Network configuration settings | |
object (AnalogClock) Analog clock overlay configuration | |
object (OtaConfig) Over-The-Air (OTA) update configuration | |
object (RemoteConfig) Remote control configuration | |
object (TimersConfig) Timer and countdown configuration | |
object (WifiConfig) WiFi configuration settings for WLED device |
{- "id": {
- "name": "New-WLED-Name"
}
}
{- "id": {
- "name": "New-WLED-Name"
}, - "def": {
- "ps": 2,
- "on": true,
- "bri": 200
}
}
Retrieve all essential WLED device information in a single comprehensive request. This is the most complete endpoint, containing device state, information, available effects, and palette names all in one response.
This endpoint is ideal for: - Initial application setup and discovery - Getting a complete snapshot of device capabilities - Reducing the number of API calls needed for full device status
Response contains: - state
: Complete current device state (same as /json/state) - info
: Complete device information (same as /json/info) - effects
: Array of effect names (same as /json/eff) - palettes
: Array of palette names (same as /json/pal)
Note: For detailed palette color data, use /json/palx
. For effect metadata, use /json/fxda
. This endpoint provides names and basic information only.
curl --request GET \ --url http://{host}/json
{- "state": {
- "on": true,
- "bri": 128,
- "transition": 7,
- "ps": -1,
- "pl": -1,
- "mainseg": 0,
- "seg": [
- {
- "id": 0,
- "start": 0,
- "stop": 30,
- "len": 30,
- "on": true,
- "bri": 255,
- "col": [
- [
- 255,
- 160,
- 0
], - [
- 0,
- 0,
- 0
], - [
- 0,
- 0,
- 0
]
], - "fx": 0,
- "sx": 128,
- "ix": 128,
- "pal": 0,
- "sel": true,
- "rev": false,
- "mi": false
}
], - "nl": {
- "on": false,
- "dur": 60,
- "mode": 1,
- "tbri": 5,
- "rem": -1
}, - "udpn": {
- "send": false,
- "recv": true,
- "sgrp": 1,
- "rgrp": 1
}
}, - "info": {
- "ver": "0.14.0",
- "vid": 2310130,
- "leds": {
- "count": 30,
- "pwr": 0,
- "fps": 42,
- "maxpwr": 0,
- "maxseg": 32,
- "lc": 1
}, - "name": "WLED",
- "udpport": 21324,
- "live": false,
- "liveseg": -1,
- "fxcount": 187,
- "palcount": 71,
- "wifi": {
- "bssid": "FC:EC:DA:A4:C4:77",
- "rssi": -60,
- "signal": 80,
- "channel": 1
}, - "fs": {
- "u": 12,
- "t": 983,
- "pmt": 0
}, - "ndc": 0,
- "arch": "esp32",
- "core": "v3.3.6-16-gcc5440f6a2",
- "freeheap": 200300,
- "uptime": 6,
- "time": "1970-1-1, 00:00:06",
- "opt": 79,
- "brand": "WLED",
- "product": "FOSS",
- "mac": "a842e38d9828",
- "ip": "192.168.1.40"
}, - "effects": [
- "Solid",
- "Blink",
- "Breathe",
- "Wipe",
- "Wipe Random",
- "Random Colors",
- "Sweep",
- "Dynamic",
- "Colorloop",
- "Rainbow"
], - "palettes": [
- "Default",
- "* Random Cycle",
- "* Color 1",
- "* Colors 1&2",
- "* Color Gradient",
- "Party",
- "Cloud",
- "Lava",
- "Ocean",
- "Forest"
]
}
Retrieve both the current device state and device information in a single request. This endpoint combines the responses from /json/state
and /json/info
into one JSON object for efficiency.
The response contains: - state
: Current device state (brightness, effects, segments, etc.) - info
: Device information (version, hardware, capabilities, etc.)
#!/bin/bash # Get combined WLED device state and info curl -X GET "http://192.168.1.100/json/si" \ -H "Accept: application/json" \ -H "Content-Type: application/json"
{- "state": {
- "on": true,
- "bri": 128,
- "transition": 7,
- "ps": -1,
- "pl": -1,
- "mainseg": 0,
- "seg": [
- {
- "id": 0,
- "start": 0,
- "stop": 30,
- "len": 30,
- "on": true,
- "bri": 255,
- "col": [
- [
- 255,
- 160,
- 0
], - [
- 0,
- 0,
- 0
], - [
- 0,
- 0,
- 0
]
], - "fx": 0,
- "sx": 128,
- "ix": 128,
- "pal": 0,
- "sel": true,
- "rev": false,
- "mi": false
}
], - "nl": {
- "on": false,
- "dur": 60,
- "mode": 1,
- "tbri": 5,
- "rem": -1
}, - "udpn": {
- "send": false,
- "recv": true,
- "sgrp": 1,
- "rgrp": 1
}
}, - "info": {
- "ver": "0.14.0",
- "vid": 2310130,
- "leds": {
- "count": 30,
- "pwr": 0,
- "fps": 42,
- "maxpwr": 0,
- "maxseg": 32,
- "lc": 1
}, - "name": "WLED",
- "udpport": 21324,
- "live": false,
- "liveseg": -1,
- "fxcount": 187,
- "palcount": 71,
- "wifi": {
- "bssid": "FC:EC:DA:A4:C4:77",
- "rssi": -60,
- "signal": 80,
- "channel": 1
}, - "fs": {
- "u": 12,
- "t": 983,
- "pmt": 0
}, - "ndc": 0,
- "arch": "esp32",
- "core": "v3.3.6-16-gcc5440f6a2",
- "freeheap": 200300,
- "uptime": 6,
- "time": "1970-1-1, 00:00:06",
- "opt": 79,
- "brand": "WLED",
- "product": "FOSS",
- "mac": "a842e38d9828",
- "ip": "192.168.1.40"
}
}
Retrieves comprehensive information about the WLED device including:
curl --request GET \ --url http://{host}/json/info
{- "ver": "0.14.0",
- "vid": 2310130,
- "leds": {
- "count": 6,
- "pwr": 0,
- "fps": 5,
- "maxpwr": 0,
- "maxseg": 32,
- "seglc": [
- 1
], - "lc": 1
}, - "name": "WLED",
- "udpport": 21324,
- "live": false,
- "liveseg": -1,
- "fxcount": 187,
- "palcount": 71,
- "wifi": {
- "bssid": "FC:EC:DA:A4:C4:77",
- "rssi": -60,
- "signal": 80,
- "channel": 1
}, - "fs": {
- "u": 12,
- "t": 983,
- "pmt": 0
}, - "ndc": 0,
- "platform": {
- "arch": "esp32",
- "core": "v3.3.6-16-gcc5440f6a2",
- "clock": 240,
- "flash": 4,
- "opt": 79
}, - "freeheap": 200300,
- "uptime": 6,
- "time": "1970-1-1, 00:00:06",
- "brand": "WLED",
- "product": "FOSS",
- "mac": "a842e38d9828",
- "ip": "192.168.1.40"
}
Retrieve all essential WLED device information in a single comprehensive request. This is the most complete endpoint, containing device state, information, available effects, and palette names all in one response.
This endpoint is ideal for: - Initial application setup and discovery - Getting a complete snapshot of device capabilities - Reducing the number of API calls needed for full device status
Response contains: - state
: Complete current device state (same as /json/state) - info
: Complete device information (same as /json/info) - effects
: Array of effect names (same as /json/eff) - palettes
: Array of palette names (same as /json/pal)
Note: For detailed palette color data, use /json/palx
. For effect metadata, use /json/fxda
. This endpoint provides names and basic information only.
curl --request GET \ --url http://{host}/json
{- "state": {
- "on": true,
- "bri": 128,
- "transition": 7,
- "ps": -1,
- "pl": -1,
- "mainseg": 0,
- "seg": [
- {
- "id": 0,
- "start": 0,
- "stop": 30,
- "len": 30,
- "on": true,
- "bri": 255,
- "col": [
- [
- 255,
- 160,
- 0
], - [
- 0,
- 0,
- 0
], - [
- 0,
- 0,
- 0
]
], - "fx": 0,
- "sx": 128,
- "ix": 128,
- "pal": 0,
- "sel": true,
- "rev": false,
- "mi": false
}
], - "nl": {
- "on": false,
- "dur": 60,
- "mode": 1,
- "tbri": 5,
- "rem": -1
}, - "udpn": {
- "send": false,
- "recv": true,
- "sgrp": 1,
- "rgrp": 1
}
}, - "info": {
- "ver": "0.14.0",
- "vid": 2310130,
- "leds": {
- "count": 30,
- "pwr": 0,
- "fps": 42,
- "maxpwr": 0,
- "maxseg": 32,
- "lc": 1
}, - "name": "WLED",
- "udpport": 21324,
- "live": false,
- "liveseg": -1,
- "fxcount": 187,
- "palcount": 71,
- "wifi": {
- "bssid": "FC:EC:DA:A4:C4:77",
- "rssi": -60,
- "signal": 80,
- "channel": 1
}, - "fs": {
- "u": 12,
- "t": 983,
- "pmt": 0
}, - "ndc": 0,
- "arch": "esp32",
- "core": "v3.3.6-16-gcc5440f6a2",
- "freeheap": 200300,
- "uptime": 6,
- "time": "1970-1-1, 00:00:06",
- "opt": 79,
- "brand": "WLED",
- "product": "FOSS",
- "mac": "a842e38d9828",
- "ip": "192.168.1.40"
}, - "effects": [
- "Solid",
- "Blink",
- "Breathe",
- "Wipe",
- "Wipe Random",
- "Random Colors",
- "Sweep",
- "Dynamic",
- "Colorloop",
- "Rainbow"
], - "palettes": [
- "Default",
- "* Random Cycle",
- "* Color 1",
- "* Colors 1&2",
- "* Color Gradient",
- "Party",
- "Cloud",
- "Lava",
- "Ocean",
- "Forest"
]
}
Returns a list of all available effects in WLED. The index of each effect in the array corresponds to the effect ID used in segment configurations.
curl --request GET \ --url http://{host}/json/eff
[- "Solid",
- "Blink",
- "Breathe",
- "Wipe",
- "Wipe Random",
- "Random Colors",
- "Sweep",
- "Dynamic",
- "Colorloop",
- "Rainbow"
]
Retrieve metadata for all available effects. Returns an array of metadata strings where each string contains parameter information for the corresponding effect. The metadata includes: - Effect parameter ranges and defaults - Custom slider configurations - Effect option settings - Visual behavior hints Each metadata string is extracted from the effect definition after the '@' character. Empty strings indicate effects with no additional metadata. Note: The array index corresponds to the effect ID used in segment configurations.
curl --request GET \ --url http://{host}/json/fxda
[- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "sx=60,ix=128,1d;!,;;!,;1,2,3,4,5,6,7,8",
- "!,,,160;!,,,164;;m12=1",
- "sx=60,ix=128,1d;!,;;!,;1,2,3,4,5,6,7,8",
- "",
- "",
- "sx=60,ix=128,1d;!,;;!,;1,2,3,4,5,6,7,8",
- "",
- "",
- "sx=60,ix=128,1d;!,;;!,;1,2,3,4,5,6,7,8",
- ""
]
Returns a list of all available color palettes in WLED. The index of each palette in the array corresponds to the palette ID used in segment configurations. The list includes both built-in palettes and custom palettes.
curl --request GET \ --url http://{host}/json/pal
[- "Default",
- "* Random Cycle",
- "* Color 1",
- "* Colors 1&2",
- "* Color Gradient",
- "Party",
- "Cloud",
- "Lava",
- "Ocean",
- "Forest"
]
Retrieve detailed palette data with full color information in a paginated format. Unlike /json/pal
which returns only palette names, this endpoint provides the actual color data for each palette, including RGB values and special color references.
Pagination: Due to memory constraints (especially on ESP8266), palette data is split into pages. ESP8266 devices return 5 palettes per page, while ESP32 devices return 8 palettes per page.
Color Data Format: - RGB colors: Arrays of [position, red, green, blue]
values (0-255) - Segment colors: Strings "c1", "c2", "c3" referring to current segment colors - Random colors: String "r" for random color generation
Palette Types: - Built-in palettes (gradient definitions) - FastLED standard palettes - Custom user-defined palettes
page | integer >= 0 Default: 0 Page number to retrieve (0-based). If not specified, defaults to page 0. The maximum page number is returned in the response |
# Get first page of palette data curl --request GET \ --url "http://{host}/json/palx" # Get specific page of palette data curl --request GET \ --url "http://{host}/json/palx?page=1"
{- "m": 3,
- "p": {
- "0": [
- [
- 0,
- 194,
- 15,
- 120
], - [
- 51,
- 255,
- 0,
- 0
], - [
- 102,
- 255,
- 160,
- 0
], - [
- 153,
- 255,
- 255,
- 0
], - [
- 204,
- 0,
- 255,
- 0
], - [
- 255,
- 0,
- 255,
- 255
]
], - "1": [
- "r",
- "r",
- "r",
- "r"
], - "2": [
- "c1"
], - "3": [
- "c1",
- "c1",
- "c2",
- "c2"
], - "4": [
- "c3",
- "c2",
- "c1"
]
}
}
Returns a list of WLED nodes discovered on the local network using mDNS/DNS-SD. Discovery records include device name, type, IP address, and version information.
curl --request GET \ --url http://{host}/json/nodes
{- "nodes": [
- {
- "name": "WLED-Kitchen",
- "type": 32,
- "ip": "192.168.1.50",
- "age": 0,
- "vid": 230224
}, - {
- "name": "WLED-Living",
- "type": 82,
- "ip": "192.168.1.51",
- "age": 1,
- "vid": 230224
}
]
}
Performs a scan for available WiFi networks in range. Returns network details including SSID, signal strength, and encryption type. Note: Scanning may temporarily interrupt LED output.
curl --request GET \ --url http://{host}/json/net
{- "networks": [
- {
- "ssid": "MyWiFi",
- "rssi": -65,
- "bssid": "00:11:22:33:44:55",
- "channel": 6,
- "enc": "WIFI_AUTH_WPA2_PSK"
}, - {
- "ssid": "GuestWiFi",
- "rssi": -72,
- "bssid": "AA:BB:CC:DD:EE:FF",
- "channel": 11,
- "enc": "WIFI_AUTH_OPEN"
}
]
}
WARNING: This endpoint is incomplete and not recommended for use. The JSON streaming implementation is inefficient and may cause performance issues. For real-time LED control, use the DDP (Distributed Display Protocol) instead.
See: https://github.com/Aircoookie/WLED/wiki/UDP-Realtime-Control
{- "leds": [
- "#FF0000",
- "#00FF00"
], - "n": 2
}