utils

LiveKit REST Helpers.

Methods that wrap the LiveKit API for room management.

class pipecat.transports.livekit.utils.LiveKitRESTHelper(*, api_key: str, api_secret: str, api_url: str = 'https://your-livekit-host.com', aiohttp_session: ClientSession)[source]

Bases: object

Helper class for interacting with LiveKit’s REST API.

Provides methods for managing LiveKit rooms.

__init__(*, api_key: str, api_secret: str, api_url: str = 'https://your-livekit-host.com', aiohttp_session: ClientSession)[source]

Initialize the LiveKit REST helper.

Parameters:
  • api_key – Your LiveKit API key.

  • api_secret – Your LiveKit API secret.

  • api_url – LiveKit server URL (e.g. “https://your-livekit-host.com”).

  • aiohttp_session – Async HTTP session for making requests.

async delete_room_by_name(room_name: str) bool[source]

Delete a LiveKit room by name.

This will forcibly disconnect all participants currently in the room.

Parameters:

room_name – Name of the room to delete.

Returns:

True if deletion was successful.

Raises:

Exception – If deletion fails.