Skip to main content
POST
/
v1
/
sessions
curl -X POST https://api.kallglot.com/v1/sessions \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: unique-request-12345" \
  -d '{
    "mode": "bidirectional_translation",
    "source_language": "de",
    "target_language": "en",
    "provider": {
      "type": "twilio",
      "phone_number": "+14155551234"
    },
    "recording": {
      "enabled": true,
      "channels": "dual"
    },
    "metadata": {
      "customer_id": "cust_123",
      "ticket_id": "ticket_456"
    }
  }'
{
  "id": "sess_01HXYZ123456789",
  "object": "session",
  "status": "created",
  "mode": "bidirectional_translation",
  "source_language": "de",
  "target_language": "en",
  "stream": {
    "url": "wss://stream.kallglot.com/v1/sessions/sess_01HXYZ123456789/connect",
    "token": "kst_live_xxxxxxxxxxxxxxxx",
    "expires_at": "2026-03-26T12:00:00Z"
  },
  "provider": {
    "type": "twilio",
    "phone_number": "+14155551234",
    "status": "pending"
  },
  "recording": {
    "enabled": true,
    "channels": "dual"
  },
  "metadata": {
    "customer_id": "cust_123",
    "ticket_id": "ticket_456"
  },
  "created_at": "2026-03-26T11:00:00Z"
}
Create a new session to start real-time voice processing. The session establishes a WebSocket connection for streaming audio and receiving transcripts/translations.

Request Body

mode
string
required
The session mode. One of:
  • bidirectional_translation - Both parties hear translated speech
  • assistive_translation - Agent hears original, customer hears translation
  • ai_agent - AI-powered voice agent handles the conversation
  • help_chat_voice - Voice-enabled help desk assistant
source_language
string
required
The primary input language code (e.g., de, fr, en). See Languages for supported codes.
target_language
string
required
The output language code for translations.
provider
object
Telephony provider configuration. Required for phone-based sessions.
ai_agent
object
AI agent configuration. Required when mode is ai_agent.
recording
object
Recording configuration.
transcription
object
Transcription configuration.
webhook_url
string
URL to receive session events via webhook. Overrides organization-level webhook settings.
metadata
object
Arbitrary key-value pairs to attach to the session. Max 50 keys, 500 chars per value.

Response

id
string
Unique session identifier (e.g., sess_01HXYZ123456789).
object
string
Always session.
status
string
Session status: created, connecting, active, ended.
mode
string
The session mode.
source_language
string
Input language code.
target_language
string
Output language code.
stream
object
WebSocket connection details.
provider
object
Provider connection details if configured.
created_at
string
Creation timestamp (ISO 8601).
curl -X POST https://api.kallglot.com/v1/sessions \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: unique-request-12345" \
  -d '{
    "mode": "bidirectional_translation",
    "source_language": "de",
    "target_language": "en",
    "provider": {
      "type": "twilio",
      "phone_number": "+14155551234"
    },
    "recording": {
      "enabled": true,
      "channels": "dual"
    },
    "metadata": {
      "customer_id": "cust_123",
      "ticket_id": "ticket_456"
    }
  }'
{
  "id": "sess_01HXYZ123456789",
  "object": "session",
  "status": "created",
  "mode": "bidirectional_translation",
  "source_language": "de",
  "target_language": "en",
  "stream": {
    "url": "wss://stream.kallglot.com/v1/sessions/sess_01HXYZ123456789/connect",
    "token": "kst_live_xxxxxxxxxxxxxxxx",
    "expires_at": "2026-03-26T12:00:00Z"
  },
  "provider": {
    "type": "twilio",
    "phone_number": "+14155551234",
    "status": "pending"
  },
  "recording": {
    "enabled": true,
    "channels": "dual"
  },
  "metadata": {
    "customer_id": "cust_123",
    "ticket_id": "ticket_456"
  },
  "created_at": "2026-03-26T11:00:00Z"
}