curl --request POST \
--url https://api.protoface.com/v1/sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"avatar_id": "av_stock_001",
"transport": {
"room_name": "demo-room",
"type": "livekit",
"url": "wss://my-app.livekit.cloud",
"worker_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
}
'import requests
url = "https://api.protoface.com/v1/sessions"
payload = {
"avatar_id": "av_stock_001",
"transport": {
"room_name": "demo-room",
"type": "livekit",
"url": "wss://my-app.livekit.cloud",
"worker_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
avatar_id: 'av_stock_001',
transport: {
room_name: 'demo-room',
type: 'livekit',
url: 'wss://my-app.livekit.cloud',
worker_token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
}
})
};
fetch('https://api.protoface.com/v1/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"avatar_id": "av_stock_001",
"billing_surface": "api",
"created_at": "2026-05-25T19:00:00.123Z",
"first_frame_at": "2026-05-25T19:00:02.001Z",
"id": "sess_01HXY5K8E7QYG3X8Z6N9R7S0VR",
"idle_timeout_seconds": 30,
"max_duration_seconds": 600,
"metadata": {
"customer_session_id": "abc123"
},
"object": "session",
"quality": "standard",
"started_at": "2026-05-25T19:00:01.456Z",
"status": "running",
"transport": {
"audio_source": "data_stream",
"room_name": "demo-room",
"type": "livekit",
"url": "wss://my-app.livekit.cloud"
},
"usage": {
"billable_seconds": 12,
"frames": 300
}
}{
"error": {
"code": "transport.unsupported",
"message": "transport.type=pipecat is not supported",
"param": "transport.type",
"request_id": "req_01HXY5K8E7QYG3X8Z6N9R7S0VR",
"type": "invalid_request"
}
}{
"error": {
"code": "transport.unsupported",
"message": "transport.type=pipecat is not supported",
"param": "transport.type",
"request_id": "req_01HXY5K8E7QYG3X8Z6N9R7S0VR",
"type": "invalid_request"
}
}{
"error": {
"code": "transport.unsupported",
"message": "transport.type=pipecat is not supported",
"param": "transport.type",
"request_id": "req_01HXY5K8E7QYG3X8Z6N9R7S0VR",
"type": "invalid_request"
}
}{
"error": {
"code": "transport.unsupported",
"message": "transport.type=pipecat is not supported",
"param": "transport.type",
"request_id": "req_01HXY5K8E7QYG3X8Z6N9R7S0VR",
"type": "invalid_request"
}
}{
"error": {
"code": "transport.unsupported",
"message": "transport.type=pipecat is not supported",
"param": "transport.type",
"request_id": "req_01HXY5K8E7QYG3X8Z6N9R7S0VR",
"type": "invalid_request"
}
}{
"error": {
"code": "transport.unsupported",
"message": "transport.type=pipecat is not supported",
"param": "transport.type",
"request_id": "req_01HXY5K8E7QYG3X8Z6N9R7S0VR",
"type": "invalid_request"
}
}{
"error": {
"code": "transport.unsupported",
"message": "transport.type=pipecat is not supported",
"param": "transport.type",
"request_id": "req_01HXY5K8E7QYG3X8Z6N9R7S0VR",
"type": "invalid_request"
}
}Create a session
Allocate a worker and begin a realtime avatar session.
Returns immediately with status: queued; poll GET /v1/sessions/{id} (or wait for the session.first_frame webhook) to see the worker pick the job up. Sessions count against your plan’s concurrency cap; a 503 response with code=at_capacity and a Retry-After header means there are no free workers right now.
curl --request POST \
--url https://api.protoface.com/v1/sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"avatar_id": "av_stock_001",
"transport": {
"room_name": "demo-room",
"type": "livekit",
"url": "wss://my-app.livekit.cloud",
"worker_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
}
'import requests
url = "https://api.protoface.com/v1/sessions"
payload = {
"avatar_id": "av_stock_001",
"transport": {
"room_name": "demo-room",
"type": "livekit",
"url": "wss://my-app.livekit.cloud",
"worker_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
avatar_id: 'av_stock_001',
transport: {
room_name: 'demo-room',
type: 'livekit',
url: 'wss://my-app.livekit.cloud',
worker_token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
}
})
};
fetch('https://api.protoface.com/v1/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"avatar_id": "av_stock_001",
"billing_surface": "api",
"created_at": "2026-05-25T19:00:00.123Z",
"first_frame_at": "2026-05-25T19:00:02.001Z",
"id": "sess_01HXY5K8E7QYG3X8Z6N9R7S0VR",
"idle_timeout_seconds": 30,
"max_duration_seconds": 600,
"metadata": {
"customer_session_id": "abc123"
},
"object": "session",
"quality": "standard",
"started_at": "2026-05-25T19:00:01.456Z",
"status": "running",
"transport": {
"audio_source": "data_stream",
"room_name": "demo-room",
"type": "livekit",
"url": "wss://my-app.livekit.cloud"
},
"usage": {
"billable_seconds": 12,
"frames": 300
}
}{
"error": {
"code": "transport.unsupported",
"message": "transport.type=pipecat is not supported",
"param": "transport.type",
"request_id": "req_01HXY5K8E7QYG3X8Z6N9R7S0VR",
"type": "invalid_request"
}
}{
"error": {
"code": "transport.unsupported",
"message": "transport.type=pipecat is not supported",
"param": "transport.type",
"request_id": "req_01HXY5K8E7QYG3X8Z6N9R7S0VR",
"type": "invalid_request"
}
}{
"error": {
"code": "transport.unsupported",
"message": "transport.type=pipecat is not supported",
"param": "transport.type",
"request_id": "req_01HXY5K8E7QYG3X8Z6N9R7S0VR",
"type": "invalid_request"
}
}{
"error": {
"code": "transport.unsupported",
"message": "transport.type=pipecat is not supported",
"param": "transport.type",
"request_id": "req_01HXY5K8E7QYG3X8Z6N9R7S0VR",
"type": "invalid_request"
}
}{
"error": {
"code": "transport.unsupported",
"message": "transport.type=pipecat is not supported",
"param": "transport.type",
"request_id": "req_01HXY5K8E7QYG3X8Z6N9R7S0VR",
"type": "invalid_request"
}
}{
"error": {
"code": "transport.unsupported",
"message": "transport.type=pipecat is not supported",
"param": "transport.type",
"request_id": "req_01HXY5K8E7QYG3X8Z6N9R7S0VR",
"type": "invalid_request"
}
}{
"error": {
"code": "transport.unsupported",
"message": "transport.type=pipecat is not supported",
"param": "transport.type",
"request_id": "req_01HXY5K8E7QYG3X8Z6N9R7S0VR",
"type": "invalid_request"
}
}Authorizations
Live API key minted in the dashboard. Pass as Authorization: Bearer sk_live_…. Keys are scoped to a single environment (staging / prod).
Headers
1 - 255Body
Request body for POST /v1/sessions.
Stable av_… avatar id. Must reference a platform stock avatar or customer avatar the caller's API key can access.
Discriminated union of transport configs, keyed by type.
- LiveKitTransportConfig
- WebSocketTransportConfig
- PipecatTransportConfig
Show child attributes
Show child attributes
{
"audio_source": "data_stream",
"room_name": "demo-room",
"type": "livekit",
"url": "wss://my-app.livekit.cloud",
"worker_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
End the session automatically after this many seconds without received audio. Only applies to transports that observe inbound audio; ignored otherwise. In LiveKit track mode, every received audio frame, including silence, resets this timeout.
1 <= x <= 600Optional customer-requested hard ceiling on session duration. The API clamps this to the caller's plan limit and returns the effective value on the Session resource.
1 <= x <= 3600Customer-owned free-form JSON, <= 8 KB. Keys prefixed with _avatar. are managed by Protoface.
Show child attributes
Show child attributes
Quality tier; drives the billing multiplier.
mock, lite, standard, pro Response
Successful Response
Public session resource — what GET /v1/sessions/{id} returns.
sess_… prefixed ULID.
Show child attributes
Show child attributes
Output quality tier.
mock, lite, standard, pro Public session lifecycle.
Terminal states are ended, failed, canceled. ending is the
graceful-drain state while a worker finishes publishing in-flight frames.
created, queued, starting, running, ending, ended, failed, canceled BYO LiveKit transport.
The customer owns the room and mints worker_token; we never touch
their LiveKit API key or secret. The worker publishes
protoface-avatar video and protoface-avatar-audio output tracks.
In track mode, call the lk.clear_buffer RPC for barge-in after
stopping or clearing the upstream audio publisher.
- LiveKitTransportConfig
- WebSocketTransportConfig
- PipecatTransportConfig
Show child attributes
Show child attributes
{
"audio_source": "data_stream",
"room_name": "demo-room",
"type": "livekit",
"url": "wss://my-app.livekit.cloud"
}
Service that created the session. Use this to group usage reporting.
api, playground, embed, share, public_demo, pipecat, agora, video_generation Populated when Session.status == failed.
Show child attributes
Show child attributes
Set on session.first_frame.
"session"Set when worker emits session.starting.
Live usage counters embedded in the Session resource.
Eventually-consistent — lags the latest worker heartbeat by up to
one interval. Canonical billing data lives in UsageEvent.
Show child attributes
Show child attributes

