Authentication is optional. Enable it through the Authentication guide if you need shared secrets or delegated JWT validation.
SDK examples assume you have already instantiated a
client (see the SDK guides for setup) and are showing only the method call relevant to each endpoint.GET / – health check
- Purpose: returns
{ "status": "ok" }when the server and dependencies are alive. - Status codes: always
200 OKwhen the Axum router is reachable. - Usage: liveness/readiness probes and smoke tests after deployments.
- curl
- Node SDK
- Python SDK
GET /voices – provider catalog
Response schema mirrors each provider’s capabilities, including languages, sample rates, and optional tags. Use the payload to drive voice pickers inside your product.
- curl
- Node SDK
- Python SDK
POST /speak – one-shot synthesis
- Request: JSON body plus optional auth via
Authorizationheader orapi_keyquery parameter. - Response:
200 OKwith rawaudio/pcmbytes plusx-audio-formatandx-sample-rateresponse headers. - Errors:
400whentextis empty,500for provider failures or missing credentials.
- curl
- Node SDK
- Python SDK
POST /livekit/token – participant tokens
Returns:
When authentication is enabled, this endpoint creates the room if it doesn’t exist and sets
metadata.auth_id for tenant isolation.
- Errors:
400when any field is empty,403when the room exists with a different tenant’sauth_id,500when LiveKit credentials are misconfigured. - Typical flow: once a WebSocket session advertises LiveKit settings in the
configmessage, call this REST endpoint from your control plane to mint attendee tokens.
- curl
- Node SDK
- Python SDK
GET /recording/{stream_id} – download session audio
Recording files live at
{recording_s3_prefix}/{stream_id}/audio.ogg when livekit.enable_recording=true and storage credentials are set.
- curl
- Node SDK
- Python SDK
POST /sip/call – initiate SIP call
The optional
sip object allows overriding global SIP configuration on a per-request basis. This is useful when you need to use different SIP providers or credentials for specific calls.
- Request: JSON body plus optional auth via
Authorizationheader orapi_keyquery parameter. - Response:
200 OKwith call status, room name, participant identity, participant ID, and SIP call ID. - Errors:
400when phone number is invalid or required fields are empty,404when room exists with a different tenant’sauth_id,500when LiveKit is not configured, outbound address is missing, or call fails.
+1234567890), national format (07123456789), or internal extensions (1234).
See the API reference for detailed schema information.
- curl
- Node SDK
- Python SDK
Cache-aware behavior
/speakreuses cached synthesis when both thetextandtts_confighash match a previous request and caching is enabled.- Cache assets live under
CACHE_PATH; mount a persistent volume in production if you want to avoid cold starts. - Clear server caches when rotating provider credentials or when you change voice defaults that affect TTS hashes.