Upload an audio file
curl --request POST \
--url https://upload.fineshare.com/api/uploadaudiofile/{uuid} \
--header 'Authorization: <authorization>' \
--header 'Changer-Type: <changer-type>' \
--header 'Content-Type: multipart/form-data' \
--form audioFile='@example-file'import requests
url = "https://upload.fineshare.com/api/uploadaudiofile/{uuid}"
files = { "audioFile": ("example-file", open("example-file", "rb")) }
headers = {
"Authorization": "<authorization>",
"Changer-Type": "<changer-type>"
}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('audioFile', '<string>');
const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Changer-Type': '<changer-type>'}
};
options.body = form;
fetch('https://upload.fineshare.com/api/uploadaudiofile/{uuid}', 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://upload.fineshare.com/api/uploadaudiofile/{uuid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audioFile\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Changer-Type: <changer-type>",
"Content-Type: multipart/form-data"
],
]);
$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://upload.fineshare.com/api/uploadaudiofile/{uuid}"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audioFile\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Changer-Type", "<changer-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://upload.fineshare.com/api/uploadaudiofile/{uuid}")
.header("Authorization", "<authorization>")
.header("Changer-Type", "<changer-type>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audioFile\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://upload.fineshare.com/api/uploadaudiofile/{uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Changer-Type"] = '<changer-type>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audioFile\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"message": "Audio file uploaded successfully.",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}{
"error": "Invalid input parameters.",
"details": "The 'audioFile' field is required."
}{
"error": "Invalid input parameters.",
"details": "The 'audioFile' field is required."
}{
"error": "Invalid input parameters.",
"details": "The 'audioFile' field is required."
}Endpoint Online Voice Changer
Setp 2: Submit Audio File
POST
/
api
/
uploadaudiofile
/
{uuid}
Upload an audio file
curl --request POST \
--url https://upload.fineshare.com/api/uploadaudiofile/{uuid} \
--header 'Authorization: <authorization>' \
--header 'Changer-Type: <changer-type>' \
--header 'Content-Type: multipart/form-data' \
--form audioFile='@example-file'import requests
url = "https://upload.fineshare.com/api/uploadaudiofile/{uuid}"
files = { "audioFile": ("example-file", open("example-file", "rb")) }
headers = {
"Authorization": "<authorization>",
"Changer-Type": "<changer-type>"
}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('audioFile', '<string>');
const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Changer-Type': '<changer-type>'}
};
options.body = form;
fetch('https://upload.fineshare.com/api/uploadaudiofile/{uuid}', 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://upload.fineshare.com/api/uploadaudiofile/{uuid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audioFile\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Changer-Type: <changer-type>",
"Content-Type: multipart/form-data"
],
]);
$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://upload.fineshare.com/api/uploadaudiofile/{uuid}"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audioFile\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Changer-Type", "<changer-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://upload.fineshare.com/api/uploadaudiofile/{uuid}")
.header("Authorization", "<authorization>")
.header("Changer-Type", "<changer-type>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audioFile\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://upload.fineshare.com/api/uploadaudiofile/{uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Changer-Type"] = '<changer-type>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audioFile\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"message": "Audio file uploaded successfully.",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}{
"error": "Invalid input parameters.",
"details": "The 'audioFile' field is required."
}{
"error": "Invalid input parameters.",
"details": "The 'audioFile' field is required."
}{
"error": "Invalid input parameters.",
"details": "The 'audioFile' field is required."
}Headers
Bearer token for authorization.
The type value returned in the step 1.
Path Parameters
The task_id returned in the step 1.
Body
multipart/form-data
The audio file to upload.
⌘I