canonical: https://jentic.com/apis/lifx.com/lifx

# LIFX HTTP API

Jentic publishes the only available OpenAPI specification for LIFX HTTP API, keeping it validated and agent-ready. The LIFX HTTP API controls Wi-Fi-connected LIFX smart bulbs, strips, and panels using a flexible selector syntax that targets individual lights, groups, locations, or scenes. Six endpoints cover state queries, state changes, multi-selector batch updates, delta adjustments, on/off toggling, and breathe color effects. Authentication uses an LIFX personal access token issued from the cloud account portal.

## For AI agents

Control LIFX smart bulbs and groups with state changes, toggles, and breathe effects across 6 bearer-authenticated endpoints.

## Scope

Does not handle non-LIFX smart-home devices, security cameras, or HVAC control - use for LIFX Wi-Fi bulb and strip control only.

## Capabilities

- Set color, brightness, and power state on a single bulb or group of LIFX lights using selector syntax
- Apply different states to multiple LIFX selectors in a single batched request
- Toggle LIFX lights on or off based on their current group state
- Run a breathe effect that fades between two LIFX colors over a configurable cycle
- Apply a delta adjustment to current LIFX bulb state for relative brightness or hue changes
- List LIFX bulbs visible to the authenticated account filtered by selector

## Use cases

### Smart Home Routines

Build morning, evening, and away routines that change LIFX bulb color, brightness, and power state on schedule. The `/lights/{selector}/state` endpoint accepts color, brightness, duration, and power in a single call so transitions feel smooth. Setup takes under an hour with a personal access token.

Example prompt: Set selector 'group:Bedroom' to color 'kelvin:2700' at brightness 0.4 over 30 seconds at 7am

### Notification Light Cues

Use LIFX bulbs as ambient notification cues - flash red for an incident, breathe green for a build success, dim white for focus mode. The breathe effect endpoint supports two-color fades with configurable period, cycles, and persistence. Pairs with monitoring tools to surface system state in physical space.

Example prompt: Trigger a breathe effect on selector 'label:status' with red and white, period 2 seconds, 3 cycles

### Multi-Room Scene Activation

Apply different states to multiple LIFX selectors at once with the `/lights/states` endpoint, enabling whole-home scenes like 'movie night' that change living-room, kitchen, and hallway lights with one request. Useful for voice-assistant integrations and scene managers.

Example prompt: Set selector 'group:LivingRoom' to dim warm white and selector 'group:Kitchen' to off in a single batched request

### AI Agent Lighting Assistant

An AI agent uses Jentic to discover the LIFX state and breathe operations by intent and applies lighting changes in response to natural-language prompts. The agent never holds the raw token; Jentic injects credentials per execution, keeping the LIFX account isolated from the agent's prompt context.

Example prompt: Search Jentic for 'set LIFX bulb color', load the `/lights/{selector}/state` schema, and execute it for selector 'all' with color 'blue' brightness 0.5

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/lights/{selector}` | List lights matching a selector |
| PUT | `/lights/{selector}/state` | Set state for lights matching a selector |
| PUT | `/lights/states` | Set different states across multiple selectors |
| POST | `/lights/{selector}/state/delta` | Apply a delta adjustment to current state |
| POST | `/lights/{selector}/toggle` | Toggle lights on or off |
| POST | `/lights/{selector}/breathe` | Run a breathe color-fade effect |

## Key resources

- **Lights** — Query and control LIFX bulbs via selector - state, toggle, breathe, and delta operations

## Why Jentic

- **Setup:** Wiring the LIFX HTTP API by hand means setting its bearer app token, learning the selector syntax that targets bulbs and groups, and calling api.lifx.com yourself. Through Jentic you install once, import the LIFX HTTP API from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** LIFX puts the selector in the URL path (`/lights/{selector}/state`, /toggle, /breathe), so a rule can pin your agent to one light or group: it acts only on that selector. You choose the operations it may call, so effects like breathe are not included unless you add them.
- **Credential handling:** Your LIFX bearer token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'turn off all my LIFX lights' or 'set a bulb to warm white', and Jentic returns the matching LIFX operation with its selector and state schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Twitter API v2** — Trigger LIFX color changes from Twitter mentions or hashtags
- **Spotify Web API** — Sync LIFX colors to currently playing Spotify track mood or genre
- **HubSpot Account Info** — Flash LIFX bulbs when a high-value HubSpot deal moves stage

## FAQ

### Why is there no official OpenAPI spec for LIFX HTTP API?

LIFX does not publish a maintained OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call the LIFX HTTP API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the LIFX HTTP API use?

LIFX uses HTTP bearer authentication with a personal access token issued from the LIFX cloud account portal. Jentic stores the token in your Jentic One instance and injects it on each request - the raw token never appears in the agent's context.

### Can I control multiple LIFX bulbs in a single request?

Yes. PUT `/lights/states` accepts an array of selector-and-state pairs, so an agent can set different colors and brightness levels across rooms in one batched call. PUT `/lights/{selector}/state` can also target groups using selectors like 'group:Kitchen' or 'all'.

### What are the rate limits for the LIFX HTTP API?

LIFX limits cloud requests to roughly 60 per minute per token. Sustained traffic above that returns HTTP 429. For low-latency lighting, prefer the on-LAN local protocol over the HTTP API.

### How do I run a breathe effect through Jentic?

Run pip install jentic, then search Jentic with 'breathe effect on LIFX lights' to retrieve the `/lights/{selector}/breathe` operation. Execute it with from_color, color, period, and cycles; Jentic handles the bearer token.

### Is the LIFX HTTP API free?

Yes. The LIFX HTTP API is free for owners of LIFX hardware. No subscription is required - only a personal access token tied to the LIFX account that owns the bulbs.

### Can I limit what my agent is allowed to do with the LIFX HTTP API?

Yes. Because you run Jentic One yourself, your own rules decide which LIFX operations and credentials the agent may use. LIFX carries the target in the selector portion of the URL path, so a rule can pin the agent to a single bulb or group like 'group:Kitchen' and it will act only on that selector. You also choose which operations it can call, so state changes, toggles, deltas, or the breathe effect are each available only if you grant them.
