Skip to main content
Create a session

Authorizations

Authorization
string
header
required

Live API key minted in the dashboard. Pass as Authorization: Bearer sk_live_…. Keys are scoped to a single environment (staging / prod).

Headers

X-Protoface-Session-Grant
string | null
Idempotency-Key
string | null
Required string length: 1 - 255

Body

application/json

Request body for POST /v1/sessions.

avatar_id
string
required

Stable av_… avatar id. Must reference a platform stock avatar or customer avatar the caller's API key can access.

transport
LiveKitTransportConfig · object
required

Discriminated union of transport configs, keyed by type.

Example:
idle_timeout_seconds
integer
default:30

End the session automatically after this many seconds without received audio. Only applies to transports that observe inbound audio; ignored otherwise.

Required range: 1 <= x <= 600
max_duration_seconds
integer | null

Optional 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.

Required range: 1 <= x <= 3600
metadata
object

Customer-owned free-form JSON, <= 8 KB. Keys prefixed with _avatar. are managed by Protoface.

quality
enum<string>
default:standard

Quality tier; drives the billing multiplier.

Available options:
mock,
lite,
standard,
pro

Response

Successful Response

Public session resource — what GET /v1/sessions/{id} returns.

avatar_id
string
required
created_at
string<date-time>
required
id
string
required

sess_… prefixed ULID.

idle_timeout_seconds
integer
required
max_duration_seconds
integer
required
metadata
object
required
quality
enum<string>
required

Output quality tier.

Available options:
mock,
lite,
standard,
pro
status
enum<string>
required

Public session lifecycle.

Terminal states are ended, failed, canceled. ending is the graceful-drain state while a worker finishes publishing in-flight frames.

Available options:
created,
queued,
starting,
running,
ending,
ended,
failed,
canceled
transport
LiveKitTransportConfig · object
required

BYO LiveKit transport.

The customer owns the room and mints worker_token; we never touch their LiveKit API key or secret.

Example:
billing_surface
enum<string>
default:api

Service that created the session. Use this to group usage reporting.

Available options:
api,
playground,
embed,
share,
public_demo,
pipecat,
video_generation
ended_at
string<date-time> | null
failed_at
string<date-time> | null
failure
SessionFailure · object | null

Populated when Session.status == failed.

first_frame_at
string<date-time> | null

Set on session.first_frame.

object
string
default:session
Allowed value: "session"
started_at
string<date-time> | null

Set when worker emits session.starting.

usage
SessionUsage · object

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.