Calls
Create and manage voice calls
Create a voice call session with your agent.
Supports multiple connection types:
webrtc - For browser-based voice calls
twilio - For Twilio telephony connections (default)
telnyx - For Telnyx telephony provider
plivo - For Plivo telephony provider
websocket - For custom WebSocket integrations (requires inputSampleRate and outputSampleRate)
Returns a WebSocket URL for the voice connection.
WebSocket Protocol (websocket connection type only)
The WebSocket connection carries:
Binary frames: PCM s16le audio data
Text frames: JSON messages (see schemas below)
Supported Messages
Client Tool Execution:
client_tool_invocation- Received when agent invokes a client toolclient_tool_result- Send your tool execution response
Call Status:
call_started- Received when call is readystate- Received on agent state changes (idle, listening, thinking, speaking)
Important: When you receive a client_tool_invocation, you must respond with client_tool_result using the same invocationId value.
API key for authentication
The ID of the agent to use for this call
The connection type for the call. Use 'webrtc' for browser-based calls
twilioPossible values: Call created successfully
Call created successfully
Create a voice call session with inline configuration (no predefined agent required).
This endpoint enables stateless integration where you pass configuration and tools directly in each request. Perfect for:
SIP/telephony integrations where config varies per call
Dynamic agent behavior without managing agent records
Testing different configurations without creating agents
External systems that manage their own agent logic
Unlike /calls/create which requires a predefined agent, this endpoint accepts:
systemPrompt - Agent behavior and personality
voice - Voice ID to use
language - Primary language
selectedTools - Tools in temporaryTool format (optional)
model, temperature, firstSpeaker - Optional overrides
WebSocket Protocol (websocket connection type only)
The WebSocket connection carries:
Binary frames: PCM s16le audio data
Text frames: JSON messages (see schemas below)
Received Messages (Server → Client)
call_started- Call is initialized and readystate- Agent state changes (idle, listening, thinking, speaking)client_tool_invocation- Agent invokes a client tool
Sent Messages (Client → Server)
client_tool_result- Response to tool invocation (must use same invocationId)hang_up- Gracefully end the call
Important: When you receive a client_tool_invocation, you must respond with client_tool_result using the same invocationId value within 2-3 seconds.
Tool Format
Tools must be provided in the temporaryTool format:
HTTP Tool Example:
Client Tool Example:
SIP Integration Notes
When using connectionType: websocket for SIP/telephony integration:
Set
inputSampleRateandoutputSampleRateto match your SIP system (typically 8000 for G.711)Audio format is PCM s16le (16-bit) - you must transcode from G.711 ulaw if needed
Use client tools for call control since they execute via the same WebSocket as audio
HTTP tools work but require your SIP system to handle callbacks
API key for authentication
Request body for creating a stateless inline call without a predefined agent. Pass configuration and tools directly in the request.
The system prompt that defines the agent's behavior and personality
You are a helpful customer service assistant for Acme Corp.Voice ID to use for the agent (e.g., "Mark", "Jessica")
MarkPrimary language for the conversation (BCP-47 language code)
enAI model to use
fixie-ai/ultravox-qwen3-32b-previewExample: fixie-ai/ultravox-qwen3-32b-previewTemperature for AI responses (0.0 to 1.0)
0Who speaks first when the call starts
agentPossible values: Whether to record the call
trueThe connection type for the call
twilioPossible values: Call created successfully
Bad request - missing or invalid parameters
Payment required - insufficient balance
Server error
Initiate an outbound call to a phone number using your agent.
You must provide either:
fromNumberId- The ID of your configured phone number (get from /numbers endpoint)fromNumber- The raw phone number to call from (must be configured in your account)
The call will be initiated immediately through Twilio using your configured credentials. Billing will be charged at €0.20 per minute upon call completion.
API key for authentication
The ID of the agent to use for this call
The phone number to call (E.164 format, e.g., +1234567890)
The ID of your configured phone number to call from (get from /numbers endpoint)
The raw phone number to call from (must be configured in your account). Use either this or fromNumberId
Call initiated successfully
Bad request - missing or invalid parameters
Payment required - insufficient balance
Agent or phone number not found
Last updated