Get Voice Clip Upload Parts
curl --request GET \
--url https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/parts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/parts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/parts', 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.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/parts",
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.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/parts"
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.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/parts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/parts")
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{
"upload_id": 123,
"part_size_bytes": 123,
"expires_at": "2023-11-07T05:31:56Z",
"uploaded_part_numbers": [
123
],
"parts": [
{
"part_number": 2,
"url": "<string>"
}
]
}{
"detail": "Not authenticated"
}{
"detail": "User does not have access to workspace 42"
}{
"detail": "Voice clip upload with ID 9 not found"
}{
"detail": "Voice clip upload 9 has no upload in progress (status='uploaded')."
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": "Audio uploads are not available in this environment."
}Replay Testing
Get Voice Clip Upload Parts
Resume an interrupted upload.
Returns which parts have already been uploaded and fresh URLs for the rest, so you don’t need to restart from the first part.
GET
/
api
/
v1
/
workspaces
/
{workspace_id}
/
agents
/
{agent_id}
/
voice-clip-uploads
/
{voice_clip_upload_id}
/
parts
Get Voice Clip Upload Parts
curl --request GET \
--url https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/parts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/parts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/parts', 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.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/parts",
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.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/parts"
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.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/parts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/parts")
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{
"upload_id": 123,
"part_size_bytes": 123,
"expires_at": "2023-11-07T05:31:56Z",
"uploaded_part_numbers": [
123
],
"parts": [
{
"part_number": 2,
"url": "<string>"
}
]
}{
"detail": "Not authenticated"
}{
"detail": "User does not have access to workspace 42"
}{
"detail": "Voice clip upload with ID 9 not found"
}{
"detail": "Voice clip upload 9 has no upload in progress (status='uploaded')."
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": "Audio uploads are not available in this environment."
}Authorizations
Use Tuner API key (tr_api_...) or user session token. Find your API key in Workspace Settings > API Keys.
Path Parameters
ID of the voice clip upload
Tuner's internal numeric ID for the agent.
Workspace ID. Find this in Workspace > General Settings.
Response
Successful Response
Progress of an interrupted upload, with fresh URLs for the remaining parts.
Voice clip upload ID.
Size of each part in bytes.
When the part URLs expire.
Numbers of the parts already uploaded.
Fresh presigned URLs for the parts still missing.
Show child attributes
Show child attributes