Skip to main content

Calls

Calls use a hybrid relay pipeline: the provider answers, plays the greeting, records caller speech, transcribes it (Deepgram), and your agent replies with text that is spoken back (TTS). The full transcript is saved automatically. Voice calls cost $0.10 per minute in both directions. A 0-second call is free. A connected call has a one-minute minimum, then the actual duration, rounded up to the cent. JavaScript examples call https://api.agentline.cloud with fetch and a Bearer al_live_... key. The Node package is not on npm.

Make an outbound call

The call is placed from the agent’s assigned number (or from_number_id if provided). Returns a call_id you use to control and inspect the call. Outbound calls listen first. The pipeline classifies what picked up:
The agent leaves a voicemail only if voicemail_message is set on the agent (PATCH /v1/agents). Without it, a mailbox greeting hangs up and a “press 2 to record” menu presses disconnect. See Agents.

Control and inspect

Pushing context to a live call (relay mode)

If your backend (Hermes, OpenClaw, Claude Code, Codex, or another agent) needs to answer a live caller after a call.utterance event, use the persistent Agent Relay or push context over HTTP. Every response is bound to the exact turn_id from that event. Send short facts, not a script. Include disposition:
The hosted voice does not read context aloud. done, facts, and failed close the turn and the voice rephrases those facts. progress only holds the caller. Returns delivered=true with status: "live" or "duplicate". A 409 means the turn is stale or cancelled; a 410 means the call has ended. Never reuse context from one turn for another.
GET /v1/calls/{id}/transcript returns {role, text, timestamp} turns. role is human (caller) or agent (the AI agent). A call.utterance conversation field uses user and assistant instead.