Redial API Documentation
Version: v1
Overview
The Redial API is an end-to-end solution for placing AI-powered phone calls.
Without it, developers would have to build and maintain three separate services to integrate AI calling into their products:
- An async WebSocket service for the OpenAI Realtime Audio API,
- A WebSocket handler for Twilio or another telephony provider, and
- A robust, fault-tolerant scheduling system to coordinate these calls.
Redial eliminates these complexities by combining all three services into a single, synchronous API. This significantly reduces development overhead and infrastructure cost.
With Redial, you can easily schedule, manage, and retrieve the results of AI phone calls through a simple API interface.
Base URL
https://api.redialapi.com/v1/
Authentication
All requests must include a Bearer token in the Authorization
header.
Authorization: Bearer YOUR_API_KEY
Response Format
All responses are returned in JSON format.
1. Schedule a Call
Endpoint: POST /call/schedule
Request Body
{
"who_to_call": "string", // Phone number to call
"when": 1714070400, // Epoch time in seconds, or 0 to place the call ASAP
"model": "gpt-4o-realtime-preview", // or "gpt-4o-mini-realtime-preview"
"instructions": "string", // Instructions for the model
"custom_llm_config": { // Optional: LLM-specific settings
"voice": "alloy",
"turn_detection": false
}
}
Note: custom_llm_config
aligns with OpenAI’s realtime audio API settings.
Response
{
"event_id": "string",
"status": "scheduled", // or "error_scheduling"
"error": null
}
2. Cancel a Call
Endpoint: POST /call/cancel
Request Body
{
"event_id": "string"
}
Response
{
"success": true // or false
}
3. Check Status of a Call
Endpoint: GET /call/status
Query Parameters
?event_id=string
Response
{
"status": "completed" // or no_response, cancelled, scheduled, error
}
4. Get Transcript of a Call
Endpoint: GET /call/transcript
Query Parameters
?event_id=string
Response
{
"status": "completed", // or other status codes
"transcript": "...."
}
Status Codes
Code | Meaning |
---|---|
200 | OK – Successfully processed |
400 | Bad Request – Missing/invalid params |
401 | Unauthorized – Missing/invalid token |
404 | Not Found – Resource not found |
500 | Internal Server Error |
Code Examples
Python (requests)
import time
import requests
one_minute_from_now = int(time.time()) + 60
url = "https://api.redialapi.com/v1/call/schedule"
headers = {
"Authorization": "Bearer YOUR_REDIAL_API_KEY",
"Content-Type": "application/json"
}
data = {
"who_to_call": "+1234567890",
"when": one_minute_from_now,
"model": "gpt-4o-realtime-preview",
"instructions": "Find the earliest availability."
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
cURL
curl -X POST https://api.redialapi.com/v1/call/schedule \
-H "Authorization: Bearer YOUR_REDIAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"who_to_call": "+1234567890",
"when": 1714070400,
"model": "gpt-4o-realtime-preview",
"instructions": "Find the earliest availability.",
"custom_llm_config": {
"voice": "coral",
"turn_detection": {
"type": "server_vad",
"threshold": 0.5,
"prefix_padding_ms": 250,
"silence_duration_ms": 300
}
}
}'
JavaScript (fetch)
const oneMinuteFromNow = Math.floor(Date.now() / 1000) + 60;
fetch("https://api.redialapi.com/v1/call/schedule", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_REDIAL_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
who_to_call: "+1234567890",
when: oneMinuteFromNow,
model: "gpt-4o-realtime-preview",
instructions: "Find the earliest availability."
})
})
.then(res => res.json())
.then(console.log);