curl --request GET \
--url https://api.pyai.com/v1/omni/calls/{call_id}/recording \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pyai.com/v1/omni/calls/{call_id}/recording"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pyai.com/v1/omni/calls/{call_id}/recording', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pyai.com/v1/omni/calls/{call_id}/recording",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pyai.com/v1/omni/calls/{call_id}/recording"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pyai.com/v1/omni/calls/{call_id}/recording")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pyai.com/v1/omni/calls/{call_id}/recording")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "omni.call.recording",
"call_id": "ocl_7Hk2Qm9Zs4Wp8Lc3Nv6R",
"url": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "<string>",
"detail": "<string>",
"request_id": "<string>"
}Download an Omni call recording
Fetch the call’s audio recording, when one exists (recording is off by default). Requires omni:read.
By default the endpoint streams audio bytes from the tenant-scoped PyAI resource (Content-Type reflects the stored format, e.g. audio/wav). Pass ?response=url to receive the canonical authenticated PyAI resource URL as JSON. Storage locations, raw recording URLs, and internal source identifiers are never returned.
404 if there is no recording for the call.
curl --request GET \
--url https://api.pyai.com/v1/omni/calls/{call_id}/recording \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pyai.com/v1/omni/calls/{call_id}/recording"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pyai.com/v1/omni/calls/{call_id}/recording', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pyai.com/v1/omni/calls/{call_id}/recording",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pyai.com/v1/omni/calls/{call_id}/recording"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pyai.com/v1/omni/calls/{call_id}/recording")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pyai.com/v1/omni/calls/{call_id}/recording")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "omni.call.recording",
"call_id": "ocl_7Hk2Qm9Zs4Wp8Lc3Nv6R",
"url": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "<string>",
"detail": "<string>",
"request_id": "<string>"
}Authorizations
Use Authorization: Bearer pyai_live_... (or pyai_test_...).
Path Parameters
Stable opaque PyAI-owned call identifier. Use it unchanged across every Omni call sub-resource.
^ocl_[A-Za-z0-9]{20}$"ocl_7Hk2Qm9Zs4Wp8Lc3Nv6R"
Query Parameters
Set to url to return the canonical authenticated PyAI recording resource as JSON.
url Response
The canonical PyAI resource as JSON (?response=url), or the audio bytes streamed inline.