Classes

DailyRoomSipParams

Configuration for SIP (Session Initiation Protocol) parameters.

display_name
string
default: "sw-sip-dialin"

Display name for the SIP endpoint

video
boolean
default: false

Whether video is enabled for SIP

sip_mode
string
default: "dial-in"

SIP connection mode

num_endpoints
integer
default: 1

Number of SIP endpoints

from pipecat.transports.services.helpers.daily_rest import DailyRoomSipParams

sip_params = DailyRoomSipParams(
    display_name="conference-line",
    video=True,
    num_endpoints=2
)

DailyRoomProperties

Properties that configure a Daily room’s behavior and features.

exp
float
default: "current_time + 5 minutes"

Room expiration time as Unix timestamp

enable_chat
boolean
default: false

Whether chat is enabled in the room

enable_emoji_reactions
boolean
default: false

Whether emoji reactions are enabled

eject_at_room_exp
boolean
default: true

Whether to eject participants when room expires

enable_dialout
boolean

Whether dial-out is enabled

sip
DailyRoomSipParams

SIP configuration parameters

sip_uri
dict

SIP URI configuration

import time
from pipecat.transports.services.helpers.daily_rest import (
    DailyRoomProperties,
    DailyRoomSipParams,
)

properties = DailyRoomProperties(
    exp=time.time() + 3600,  # 1 hour from now
    enable_chat=True,
    enable_emoji_reactions=True,
    sip=DailyRoomSipParams(display_name="conference")
)

DailyRoomParams

Parameters for creating a new Daily room.

name
string

Room name (if not provided, one will be generated)

privacy
string
default: "public"

Room privacy setting (“private” or “public”)

properties
DailyRoomProperties

Room configuration properties

import time
from pipecat.transports.services.helpers.daily_rest import (
    DailyRoomParams,
    DailyRoomProperties,
)

params = DailyRoomParams(
    name="team-meeting",
    privacy="private",
    properties=DailyRoomProperties(
        enable_chat=True,
        exp=time.time() + 7200  # 2 hours from now
    )
)

DailyRoomObject

Response object representing a Daily room.

id
string

Unique room identifier

name
string

Room name

api_created
boolean

Whether the room was created via API

privacy
string

Room privacy setting

url
string

Complete room URL

created_at
string

Room creation timestamp

config
DailyRoomProperties

Room configuration

from pipecat.transports.services.helpers.daily_rest import (
    DailyRoomObject,
    DailyRoomProperties,
)

# Example of what a DailyRoomObject looks like when received
room = DailyRoomObject(
    id="abc123",
    name="team-meeting",
    api_created=True,
    privacy="private",
    url="https://your-domain.daily.co/team-meeting",
    created_at="2024-01-20T10:00:00.000Z",
    config=DailyRoomProperties(
        enable_chat=True,
        exp=1705743600
    )
)

Initialize DailyRESTHelper

Create a new instance of the Daily REST helper.

daily_api_key
string
required

Your Daily API key

daily_api_url
string
default: "https://api.daily.co/v1"

The Daily API base URL

aiohttp_session
aiohttp.ClientSession
required

An aiohttp client session for making HTTP requests

helper = DailyRESTHelper(
    daily_api_key="your-api-key",
    aiohttp_session=session
)

Create Room

Creates a new Daily room with specified parameters.

params
DailyRoomParams
required

Room configuration parameters including name, privacy, and properties

# Create a room that expires in 1 hour
params = DailyRoomParams(
    name="my-room",
    privacy="private",
    properties=DailyRoomProperties(
        exp=time.time() + 3600,
        enable_chat=True
    )
)
room = await helper.create_room(params)
print(f"Room URL: {room.url}")

Get Room From URL

Retrieves room information using a Daily room URL.

room_url
string
required

The complete Daily room URL

room = await helper.get_room_from_url("https://your-domain.daily.co/my-room")
print(f"Room name: {room.name}")

Get Token

Generates a meeting token for a specific room.

room_url
string
required

The complete Daily room URL

expiry_time
float
default: "3600"

Token expiration time in seconds

owner
bool
default: "True"

Whether the token should have owner privileges

token = await helper.get_token(
    room_url="https://your-domain.daily.co/my-room",
    expiry_time=1800,  # 30 minutes
    owner=False
)
print(f"Meeting token: {token}")

Delete Room By URL

Deletes a room using its URL.

room_url
string
required

The complete Daily room URL

success = await helper.delete_room_by_url("https://your-domain.daily.co/my-room")
if success:
    print("Room deleted successfully")

Delete Room By Name

Deletes a room using its name.

room_name
string
required

The name of the Daily room

success = await helper.delete_room_by_name("my-room")
if success:
    print("Room deleted successfully")

Get Name From URL

Extracts the room name from a Daily room URL.

room_url
string
required

The complete Daily room URL

room_name = helper.get_name_from_url("https://your-domain.daily.co/my-room")
print(f"Room name: {room_name}")  # Outputs: "my-room"