LiveKit Agent API

Repository API Documentation

This API powers outbound voice calls through LiveKit. Use it to create SIP calls, control agent behavior, and capture call telemetry. The examples here reflect the current implementation in this repository.

Base URL: https://your-domain.example Content-Type: application/json Auth: X-API-Key (optional)

Authentication

If DISPATCH_API_KEY is configured, send it as an X-API-Key header or Authorization: Bearer token. Otherwise, the API is open in trusted environments.

curl -X POST https://your-domain.example/api/calls \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_KEY" \
  -d '{"systemPrompt":"..."}'
            

Quickstart flow

  1. POST /api/calls with the call configuration.
  2. Use the returned callId for follow-up actions.
  3. Optionally hang up via /api/calls/{callId}/hangup.

Queueing is automatic when capacity is exceeded. The response will indicate queued: true when the call is delayed.