# CALL_ID=your_call_id
# API_KEY=your_api_key
# Download the audio file
curl -H "X-API-Key:$API_KEY" "https://api.vaanivoice.ai/api/stream/$CALL_ID" -o recording.ogg
# Check headers only (no download)
curl -sI -H "X-API-Key:$API_KEY" "https://api.vaanivoice.ai/api/stream/$CALL_ID"
const CALL_ID = "outbound-1776774443-863aa698";
const API_KEY = "your_api_key";
const response = await fetch(
`https://api.vaanivoice.ai/api/stream/${CALL_ID}`,
{
method: "GET",
headers: {
"X-API-Key": API_KEY,
},
}
);
// Use as audio source
const blob = await response.blob();
const url = URL.createObjectURL(blob);
const audio = new Audio(url);
audio.play();
import requests
CALL_ID = "outbound-1776774443-863aa698"
API_KEY = "your_api_key"
headers = {
"X-API-Key": API_KEY
}
response = requests.get(
f"https://api.vaanivoice.ai/api/stream/{CALL_ID}",
headers=headers,
stream=True
)
with open("recording.ogg", "wb") as f:
for chunk in response.iter_content(chunk_size=8192):
f.write(chunk)
HTTP/1.1 200 OK
content-type: audio/ogg
content-length: 1083518
Calls
Stream Audio
Stream the audio recording of a call
GET
/
api
/
stream
/
{call_id}
# CALL_ID=your_call_id
# API_KEY=your_api_key
# Download the audio file
curl -H "X-API-Key:$API_KEY" "https://api.vaanivoice.ai/api/stream/$CALL_ID" -o recording.ogg
# Check headers only (no download)
curl -sI -H "X-API-Key:$API_KEY" "https://api.vaanivoice.ai/api/stream/$CALL_ID"
const CALL_ID = "outbound-1776774443-863aa698";
const API_KEY = "your_api_key";
const response = await fetch(
`https://api.vaanivoice.ai/api/stream/${CALL_ID}`,
{
method: "GET",
headers: {
"X-API-Key": API_KEY,
},
}
);
// Use as audio source
const blob = await response.blob();
const url = URL.createObjectURL(blob);
const audio = new Audio(url);
audio.play();
import requests
CALL_ID = "outbound-1776774443-863aa698"
API_KEY = "your_api_key"
headers = {
"X-API-Key": API_KEY
}
response = requests.get(
f"https://api.vaanivoice.ai/api/stream/{CALL_ID}",
headers=headers,
stream=True
)
with open("recording.ogg", "wb") as f:
for chunk in response.iter_content(chunk_size=8192):
f.write(chunk)
HTTP/1.1 200 OK
content-type: audio/ogg
content-length: 1083518
Stream Audio
Stream the audio recording of a call. Returns a binary audio file (audio/ogg or audio/mpeg).
Parameters
string
required
The unique call ID (e.g.,
outbound-1776774443-863aa698)Request Example
# CALL_ID=your_call_id
# API_KEY=your_api_key
# Download the audio file
curl -H "X-API-Key:$API_KEY" "https://api.vaanivoice.ai/api/stream/$CALL_ID" -o recording.ogg
# Check headers only (no download)
curl -sI -H "X-API-Key:$API_KEY" "https://api.vaanivoice.ai/api/stream/$CALL_ID"
const CALL_ID = "outbound-1776774443-863aa698";
const API_KEY = "your_api_key";
const response = await fetch(
`https://api.vaanivoice.ai/api/stream/${CALL_ID}`,
{
method: "GET",
headers: {
"X-API-Key": API_KEY,
},
}
);
// Use as audio source
const blob = await response.blob();
const url = URL.createObjectURL(blob);
const audio = new Audio(url);
audio.play();
import requests
CALL_ID = "outbound-1776774443-863aa698"
API_KEY = "your_api_key"
headers = {
"X-API-Key": API_KEY
}
response = requests.get(
f"https://api.vaanivoice.ai/api/stream/{CALL_ID}",
headers=headers,
stream=True
)
with open("recording.ogg", "wb") as f:
for chunk in response.iter_content(chunk_size=8192):
f.write(chunk)
Response
Success Response (200)
Returns a binary audio stream. The response is not JSON — it is the raw audio file.HTTP/1.1 200 OK
content-type: audio/ogg
content-length: 1083518
string
Audio format — typically
audio/ogg or audio/mpeginteger
Size of the audio file in bytes
The response is a binary audio stream, not JSON. Use the
-o flag with curl to save it to a file, or use the URL directly in an HTML <audio> tag for playback.Not Found (404)
Returned when the recording has not been generated yet (e.g., call is still in progress or too short).{
"status_code": 404,
"error": "Not Found",
"message": "Audio file not found",
"code": "NOT_FOUND"
}
Validation Error (422)
{
"detail": [
{
"loc": ["path", "call_id"],
"msg": "field required",
"type": "value_error.missing"
}
]
}

