Documentation Index Fetch the complete documentation index at: https://developer.kallglot.com/llms.txt
Use this file to discover all available pages before exploring further.
Create a new session to start real-time voice processing. The session establishes a WebSocket connection for streaming audio and receiving transcripts/translations.
Do not send a top-level provider object on create. Specify telephony with routing only (for example routing.phone_number or routing.connection_id). A top-level provider string on the response indicates the resolved carrier (twilio, telnyx, sip, etc.) and must not be confused with request fields.
Request Body
The session mode:
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
Language code for Party A (e.g., en, es, de). Optional - if omitted, language is auto-detected.
Language code for Party B (e.g., en, es, de). Optional - if omitted, language is auto-detected.
Telephony routing. Omit to use your organization’s default route. Exactly one routing method should be supplied (phone number, SIP, connection, or inherited default). Kallglot-managed phone number in E.164 format (e.g., +14155551234). Implies phone-number routing.
Set to sip for SIP trunk calls (see SIP Integration ). For managed numbers or connection_id, omit type and use phone_number or connection_id alone. Optional SIP payload when type is sip. Example: { "sip": { "from_uri": "sip:alice@example.com" } }. SIP From URI when known at creation time.
Map of arbitrary SIP X- headers attached to the dialog.
Optional call direction hint: inbound or outbound.
Optional audio transport hints (encoding, sample rate, channels). Omit unless your telephony path needs non-default values. Sample rate in Hz (default 8000).
Encoding hint such as mulaw (default).
Audio channels (default 1).
Voice synthesis hints for translated audio. Kallglot voice identifier.
TTS stability (0–1, default 0.5).
Similarity boost (0–1, default 0.75).
Playback speed multiplier (0.5–2, default 1).
Recording mix mode (default dual_channel).
When true, recording downloads require a granted consent state.
Current consent state such as granted, denied, or not_required.
Only for ai_agent mode. Omit for translation modes.Agent id from GET /v1/agents (for example agt_01HXYZ). Configure prompts and tools via the Agents API—sessions only reference an agent.
Optional per-session overrides allowed by your organization policy.
Custom key-value pairs to attach to the session (e.g., {"customer_id": "123"}).
Response
Session identifier (e.g., sess_01HXYZ123456789).
created, active, or ended.
Echoed field on the session object. You do not need to set or interpret it for a standard integration.
Resolved source language. null if using auto-detection.
Resolved target language. null if using auto-detection.
WebSocket connection details. WebSocket URL for real-time streaming.
Authentication token for the WebSocket.
Token expiration (ISO 8601).
Response only — resolved telephony carrier: twilio, telnyx, sip, or webrtc when applicable. This is not a request field; select routes with routing on create.
Phone number for this session (if applicable).
Optional linked telephony reference when present (id, object, provider, and provider-specific identifiers such as carrier call IDs).
Show recording properties
Whether recording is enabled.
Whether explicit consent is required before playback.
Custom metadata attached to the session.
Creation timestamp (ISO 8601).
Samples below: The minimal cURL uses default org routing (no routing in the body). The second cURL adds routing.phone_number to match Quick Start . For production, send Idempotency-Key on every create (see Idempotency ).
cURL (auto-detect)
cURL (explicit languages + managed number)
Python
JavaScript
Ruby
Go
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: $( uuidgen )" \
-d '{"mode": "bidirectional_translation"}'
201 Auto-detect
201 Explicit languages
401 Unauthorized
402 Payment Required
422 Validation Error
{
"id" : "sess_01HXYZ123456789" ,
"object" : "session" ,
"status" : "created" ,
"mode" : "bidirectional_translation" ,
"provider" : "twilio" ,
"phone_number" : "+14155551234" ,
"source_language" : null ,
"target_language" : null ,
"stream" : {
"url" : "wss://api.kallglot.com/v1/sessions/sess_01HXYZ123456789/connect" ,
"token" : "kst_live_xxxxxxxxxxxxxxxx" ,
"expires_at" : "2026-03-26T12:00:00Z"
},
"recording" : {
"enabled" : false
},
"metadata" : null ,
"created_at" : "2026-03-26T11:00:00Z"
}