v1

latestOpenAPI 3.0.02026-07-26242779.3 KB

Start a service instance

post/{agentName}/start

Path parameters

agentNamestring required

Name of the agent to start

Request body

createDailyRoomboolean

Whether to create a Daily room for the service instance

dailyRoomPropertiesobject

Optional configuration for the Daily room. Only used when createDailyRoom is true.

See Daily API documentation for supported properties.

dailyMeetingTokenPropertiesobject

Optional configuration for the Daily meeting token. Only used when createDailyRoom is true.

See Daily API documentation for supported properties.

enableDefaultIceServersboolean

Whether to use the default STUN/TURN ICE servers provided by Pipecat Cloud.

transport'daily' | 'webrtc' | 'websocket'

Explicitly specify which transport the bot should use.

bodyobject

Arbitrary user data / configuration object to pass to the service instance. Accessible as the first parameter of the bot method or custom entry point. Maximum size: 1 MB for transport: "daily" or "webrtc", 4 KB for "websocket". For transport: "websocket", the body is returned in the response's body field base64-encoded; the service must be deployed with websocket_auth = "token" to use this encoding convenience. See the Starting Sessions docs for details.

Example request

{
  "createDailyRoom": true,
  "dailyRoomProperties": {
    "enable_recording": "cloud"
  },
  "dailyMeetingTokenProperties": {
    "is_owner": true,
    "start_cloud_recording": true
  },
  "enableDefaultIceServers": true,
  "transport": "webrtc",
  "body": {
    "foo": "bar"
  }
}

Response

Service started successfully

tokenstring

HMAC session token for WebSocket authentication (only when transport is "websocket")

wsUrlstring

WebSocket URL to connect to (only when transport is "websocket")

bodystring

Base64-encoded JSON body for the bot (only when transport is "websocket" and the request included a body). Append to wsUrl as a ?body= query parameter when connecting.

dailyRoomstring

URL of the created Daily room (if createDailyRoom was set to true)

dailyTokenstring

Token to access the Daily room (if createDailyRoom was set to true)

sessionIdstring

Session ID for the created session

Example response

{
  "token": "eyJzaCI6Im15LWFnZW50Lm15LW9yZyIsImV4cCI6MTcxMjgwMDAwMCwibm9uY2UiOiJhYmMxMjMifQ.dGVzdC1zaWduYXR1cmU",
  "wsUrl": "wss://us-west.api.pipecat.daily.co/ws/generic/my-agent.my-org",
  "body": "eyJjYWxsZXJfaWQiOiJhYmMxMjMifQ==",
  "dailyRoom": "https://cloud-354b1860310a444ba0f528b6a2f467c4.daily.co/qZbK9nyXCDCmQ0zDDZta",
  "dailyToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "sessionId": "639f91d8-d511-4677-a83b-bd7564d5d92f",
  "iceConfig": {
    "iceServers": [
      {
        "urls": [
          "stun:stun.cloudflare.com:3478",
          "turn:turn.cloudflare.com:3478?transport=udp",
          "turn:turn.cloudflare.com:3478?transport=tcp",
          "turns:turn.cloudflare.com:5349?transport=tcp"
        ],
        "username": "g061f2543c0c7aab7d4b087ad407709...",
        "credential": "e6330e0a539d4cfe9cf9f01b9eb2f..."
      }
    ]
  }
}