# stream.toggle

Source: https://docs.lightair.app/developers/remote-api/stream.toggle

> Goes live when not live, and ends the stream when live.

JSON-RPC 2.0 method of Lightair's Remote API (ws://localhost:4455/rpc). Group: Outputs. It changes what viewers see or hear. Script plugins need the `outputs.control` permission.

As [stream.start](/developers/remote-api/stream.start) and [stream.stop](/developers/remote-api/stream.stop). An AI agent connected over MCP asks the person first, unless **AI agents may go live without asking** is on in **Settings › Remote API**. Other clients aren't asked.

## Parameters

None.

## Result

| Name | Type | Required | Description |
|---|---|---|---|
| `active` | `boolean` | no | Whether it's live now. |

## Errors

As stream.start when it goes live.

## Events

- `stream.state`
- `output.changed`

## Related

- [stream.start](https://docs.lightair.app/developers/remote-api/stream.start.md)
- [stream.stop](https://docs.lightair.app/developers/remote-api/stream.stop.md)
