curl --request POST \
--url https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/complete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"parts": [
{
"part_number": 5000,
"etag": "<string>"
}
]
}
'import requests
url = "https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/complete"
payload = { "parts": [
{
"part_number": 5000,
"etag": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({parts: [{part_number: 5000, etag: '<string>'}]})
};
fetch('https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/complete', 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}/complete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'parts' => [
[
'part_number' => 5000,
'etag' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/complete"
payload := strings.NewReader("{\n \"parts\": [\n {\n \"part_number\": 5000,\n \"etag\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/complete")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"parts\": [\n {\n \"part_number\": 5000,\n \"etag\": \"<string>\"\n }\n ]\n}")
.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}/complete")
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"] = 'application/json'
request.body = "{\n \"parts\": [\n {\n \"part_number\": 5000,\n \"etag\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"status": "<string>",
"filename": "<string>",
"extension": "<string>",
"size_bytes": 123,
"created_at": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"channel_count": 123,
"channel_mode": "<string>",
"speakers": [
{
"index": 123,
"label": "<string>"
}
],
"failure_reason": "<string>"
}{
"detail": "Parts [3] are missing from S3 or have a different ETag. Re-upload them and complete again."
}{
"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='failed')."
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Complete Voice Clip Upload
Assemble the uploaded parts, mark the upload uploaded, and queue it for analysis.
Safe to call twice — an upload already past uploading is returned unchanged rather
than re-completed against a multipart upload S3 has already discarded.
curl --request POST \
--url https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/complete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"parts": [
{
"part_number": 5000,
"etag": "<string>"
}
]
}
'import requests
url = "https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/complete"
payload = { "parts": [
{
"part_number": 5000,
"etag": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({parts: [{part_number: 5000, etag: '<string>'}]})
};
fetch('https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/complete', 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}/complete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'parts' => [
[
'part_number' => 5000,
'etag' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/complete"
payload := strings.NewReader("{\n \"parts\": [\n {\n \"part_number\": 5000,\n \"etag\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/complete")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"parts\": [\n {\n \"part_number\": 5000,\n \"etag\": \"<string>\"\n }\n ]\n}")
.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}/complete")
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"] = 'application/json'
request.body = "{\n \"parts\": [\n {\n \"part_number\": 5000,\n \"etag\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"status": "<string>",
"filename": "<string>",
"extension": "<string>",
"size_bytes": 123,
"created_at": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"channel_count": 123,
"channel_mode": "<string>",
"speakers": [
{
"index": 123,
"label": "<string>"
}
],
"failure_reason": "<string>"
}{
"detail": "Parts [3] are missing from S3 or have a different ETag. Re-upload them and complete again."
}{
"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='failed')."
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Use Tuner API key (tr_api_...) or user session token. Find your API key in Workspace Settings > API Keys.
Path Parameters
Tuner's internal numeric ID for the agent.
Workspace ID. Find this in Workspace > General Settings.
Body
Input schema for finishing a multipart upload.
The ETags come from the client because it -- not the backend -- is what received S3's
response to each part PUT. They are cross-checked against list_parts before the
upload is assembled; see VoiceClipUploadService.complete.
Show child attributes
Show child attributes
Response
Successful Response
Status read model for one upload -- the modal polls this at every later stage.
Show child attributes
Show child attributes