Create new dub
curl --request POST \
--url https://api.voicedub.ai/v1/me/dubs \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"voiceId": "123e4567-e89b-12d3-a456-426614174001",
"link": "https://example.com/audio.mp3",
"pitchShift": 0,
"separate": true
}
'import requests
url = "https://api.voicedub.ai/v1/me/dubs"
payload = {
"voiceId": "123e4567-e89b-12d3-a456-426614174001",
"link": "https://example.com/audio.mp3",
"pitchShift": 0,
"separate": True
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
voiceId: '123e4567-e89b-12d3-a456-426614174001',
link: 'https://example.com/audio.mp3',
pitchShift: 0,
separate: true
})
};
fetch('https://api.voicedub.ai/v1/me/dubs', 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.voicedub.ai/v1/me/dubs",
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([
'voiceId' => '123e4567-e89b-12d3-a456-426614174001',
'link' => 'https://example.com/audio.mp3',
'pitchShift' => 0,
'separate' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.voicedub.ai/v1/me/dubs"
payload := strings.NewReader("{\n \"voiceId\": \"123e4567-e89b-12d3-a456-426614174001\",\n \"link\": \"https://example.com/audio.mp3\",\n \"pitchShift\": 0,\n \"separate\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.voicedub.ai/v1/me/dubs")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"voiceId\": \"123e4567-e89b-12d3-a456-426614174001\",\n \"link\": \"https://example.com/audio.mp3\",\n \"pitchShift\": 0,\n \"separate\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voicedub.ai/v1/me/dubs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"voiceId\": \"123e4567-e89b-12d3-a456-426614174001\",\n \"link\": \"https://example.com/audio.mp3\",\n \"pitchShift\": 0,\n \"separate\": true\n}"
response = http.request(request)
puts response.read_body{
"dub": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"voiceId": "123e4567-e89b-12d3-a456-426614174001",
"link": "https://example.com/audio.mp3",
"separate": true,
"status": "new",
"inputDuration": null,
"inputSource": "upload",
"pitchShift": 0,
"errorCode": null,
"errorMessage": null,
"apiCreditsUsed": 0,
"apiCreditsLeft": null,
"completedAt": null,
"createdAt": "2024-01-15T10:00:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z",
"dubUrl": null,
"requiredCredits": null
},
"uploadUrl": "https://s3.amazonaws.com/bucket/uploads/123e4567-e89b-12d3-a456-426614174000?X-Amz-Signature=..."
}{
"code": "voice_not_found",
"message": "Voice not found or not accessible"
}Dubs
Create new dub
Create a new dub by providing a voice ID and either a link or uploading audio. Returns upload URL if no link provided. Dubs are currently limited to 30 minutes.
POST
/
v1
/
me
/
dubs
Create new dub
curl --request POST \
--url https://api.voicedub.ai/v1/me/dubs \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"voiceId": "123e4567-e89b-12d3-a456-426614174001",
"link": "https://example.com/audio.mp3",
"pitchShift": 0,
"separate": true
}
'import requests
url = "https://api.voicedub.ai/v1/me/dubs"
payload = {
"voiceId": "123e4567-e89b-12d3-a456-426614174001",
"link": "https://example.com/audio.mp3",
"pitchShift": 0,
"separate": True
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
voiceId: '123e4567-e89b-12d3-a456-426614174001',
link: 'https://example.com/audio.mp3',
pitchShift: 0,
separate: true
})
};
fetch('https://api.voicedub.ai/v1/me/dubs', 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.voicedub.ai/v1/me/dubs",
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([
'voiceId' => '123e4567-e89b-12d3-a456-426614174001',
'link' => 'https://example.com/audio.mp3',
'pitchShift' => 0,
'separate' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.voicedub.ai/v1/me/dubs"
payload := strings.NewReader("{\n \"voiceId\": \"123e4567-e89b-12d3-a456-426614174001\",\n \"link\": \"https://example.com/audio.mp3\",\n \"pitchShift\": 0,\n \"separate\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.voicedub.ai/v1/me/dubs")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"voiceId\": \"123e4567-e89b-12d3-a456-426614174001\",\n \"link\": \"https://example.com/audio.mp3\",\n \"pitchShift\": 0,\n \"separate\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voicedub.ai/v1/me/dubs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"voiceId\": \"123e4567-e89b-12d3-a456-426614174001\",\n \"link\": \"https://example.com/audio.mp3\",\n \"pitchShift\": 0,\n \"separate\": true\n}"
response = http.request(request)
puts response.read_body{
"dub": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"voiceId": "123e4567-e89b-12d3-a456-426614174001",
"link": "https://example.com/audio.mp3",
"separate": true,
"status": "new",
"inputDuration": null,
"inputSource": "upload",
"pitchShift": 0,
"errorCode": null,
"errorMessage": null,
"apiCreditsUsed": 0,
"apiCreditsLeft": null,
"completedAt": null,
"createdAt": "2024-01-15T10:00:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z",
"dubUrl": null,
"requiredCredits": null
},
"uploadUrl": "https://s3.amazonaws.com/bucket/uploads/123e4567-e89b-12d3-a456-426614174000?X-Amz-Signature=..."
}{
"code": "voice_not_found",
"message": "Voice not found or not accessible"
}Authorizations
API key in the format: "Api-Key "
Body
application/json
UUID of the voice model to use for dubbing
Example:
"123e4567-e89b-12d3-a456-426614174001"
URL of audio/video to dub (alternative to file upload)
Example:
"https://example.com/audio.mp3"
Pitch shift in semitones (-24 to +24)
Required range:
-24 <= x <= 24Example:
0
Whether to separate vocals from backing track
Example:
true
⌘I