Skip to main content

Quickstart: Voice Calls

Give your AI agent a real phone number, send yourself an SMS, then place the first voice call to a number you control.

Prerequisites

  • An Anima API key from console.useanima.sh
  • Python 3.10+ or Node.js 18+
  • An existing agent_id
  • Phone access for SMS
  • Voice access for outbound calls
  • Consent to contact the destination number
If you are testing for the first time, use your own phone number as the destination.

Python

Node.js / TypeScript

Environment Variables

You can also configure via environment variables instead of passing options directly:

Handle Inbound Calls

To react after calls complete, set up a webhook endpoint and subscribe to call.ended. Inbound real-time call control happens over the voice WebSocket.

Real-Time Call Events (WebSocket)

Monitor and control calls in real time over the voice WebSocket:

What’s Next?