Upload one party recording
curl --request POST \
--url https://api.pyai.com/auth/interpretation-recordings/{recording_id}/audio \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: audio/wav' \
--data '<string>'import requests
url = "https://api.pyai.com/auth/interpretation-recordings/{recording_id}/audio"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "audio/wav"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'audio/wav'},
body: '<string>'
};
fetch('https://api.pyai.com/auth/interpretation-recordings/{recording_id}/audio', 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/auth/interpretation-recordings/{recording_id}/audio",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "<string>",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: audio/wav"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pyai.com/auth/interpretation-recordings/{recording_id}/audio"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "audio/wav")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pyai.com/auth/interpretation-recordings/{recording_id}/audio")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "audio/wav")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pyai.com/auth/interpretation-recordings/{recording_id}/audio")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'audio/wav'
request.body = "<string>"
response = http.request(request)
puts response.read_body{
"title": "<string>",
"status": 123,
"type": "<string>",
"detail": "<string>",
"request_id": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "invalid_request_error",
"param": "<string>"
}
}Interpretation
Upload one party recording
Use only the write-only upload_capability returned by archive creation, not your API key. Upload an immutable stereo 16 kHz PCM16 WAV: left original speech, right translated speech sent to this party. party-v1 requires both perspectives before complete. Maximum 38,400,044 bytes per file. Retry identical bytes on 429 with Retry-After; changed bytes conflict. The capability is record-bound, expires in 20 minutes and cannot read recordings.
POST
/
auth
/
interpretation-recordings
/
{recording_id}
/
audio
Upload one party recording
curl --request POST \
--url https://api.pyai.com/auth/interpretation-recordings/{recording_id}/audio \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: audio/wav' \
--data '<string>'import requests
url = "https://api.pyai.com/auth/interpretation-recordings/{recording_id}/audio"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "audio/wav"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'audio/wav'},
body: '<string>'
};
fetch('https://api.pyai.com/auth/interpretation-recordings/{recording_id}/audio', 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/auth/interpretation-recordings/{recording_id}/audio",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "<string>",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: audio/wav"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pyai.com/auth/interpretation-recordings/{recording_id}/audio"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "audio/wav")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pyai.com/auth/interpretation-recordings/{recording_id}/audio")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "audio/wav")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pyai.com/auth/interpretation-recordings/{recording_id}/audio")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'audio/wav'
request.body = "<string>"
response = http.request(request)
puts response.read_body{
"title": "<string>",
"status": 123,
"type": "<string>",
"detail": "<string>",
"request_id": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "invalid_request_error",
"param": "<string>"
}
}Authorizations
Short-lived write-only upload_capability returned by POST /v1/audio/interpretations/recordings. Never use it for reads.
Path Parameters
Query Parameters
Available options:
customer, agent Body
audio/wav
The body is of type file.
Response
Immutable audio received