Skip to main content

Introduction

The Agentic AI REST API allows you to programmatically initiate calls, list active calls, and end calls. This API is ideal for integrating voice AI capabilities into your own applications or workflows.

Base URL

All API endpoints are relative to your server’s base URL:
http://localhost:8080/api
Or in production with ngrok:
https://your-ngrok-url.ngrok.io/api

Authentication

The current version of the REST API does not require authentication. If you’re deploying to production, consider implementing authentication middleware or using a reverse proxy with authentication.
For production deployments, always implement proper authentication and authorization to prevent unauthorized access to your API endpoints.

Available Endpoints

Initiate Call

Start a new outbound call with a custom prompt

List Calls

Get all currently active calls

End Call

Terminate an active call

Health Check

Check server health and active call count

Health Check

Before using the API, you can verify the server is running:
curl http://localhost:8080/health
Response:
{
  "status": "healthy",
  "active_calls": 2
}

Error Handling

All endpoints return JSON responses. Successful operations typically include a success: true field, while errors include success: false with an error field describing the issue. Error Response Example:
{
  "success": false,
  "error": "Missing 'to' phone number"
}

Rate Limits

There are currently no enforced rate limits, but be mindful of:
  • Twilio API rate limits
  • Gemini API rate limits
  • Your server’s capacity to handle concurrent calls

Next Steps

Initiate Your First Call

Learn how to start a call with the POST /api/call endpoint

Monitor Active Calls

Track all calls in progress

Build docs developers (and LLMs) love