Skip to main content
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"
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

call_id
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"

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
Content-Type
string
Audio format — typically audio/ogg or audio/mpeg
Content-Length
integer
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"
    }
  ]
}