curl --request POST \
--url https://api.goenhance.ai/api/v1/audio/generations \
--header 'Content-Type: application/json' \
--data '
{
"model": "cadence-voice-cover",
"audio_url": "https://example.com/original-song.mp3",
"reference_audio_url": "https://example.com/my-voice.wav",
"pitch_shift": -12
}
'import requests
url = "https://api.goenhance.ai/api/v1/audio/generations"
payload = {
"model": "cadence-voice-cover",
"audio_url": "https://example.com/original-song.mp3",
"reference_audio_url": "https://example.com/my-voice.wav",
"pitch_shift": -12
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'cadence-voice-cover',
audio_url: 'https://example.com/original-song.mp3',
reference_audio_url: 'https://example.com/my-voice.wav',
pitch_shift: -12
})
};
fetch('https://api.goenhance.ai/api/v1/audio/generations', 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.goenhance.ai/api/v1/audio/generations",
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([
'model' => 'cadence-voice-cover',
'audio_url' => 'https://example.com/original-song.mp3',
'reference_audio_url' => 'https://example.com/my-voice.wav',
'pitch_shift' => -12
]),
CURLOPT_HTTPHEADER => [
"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.goenhance.ai/api/v1/audio/generations"
payload := strings.NewReader("{\n \"model\": \"cadence-voice-cover\",\n \"audio_url\": \"https://example.com/original-song.mp3\",\n \"reference_audio_url\": \"https://example.com/my-voice.wav\",\n \"pitch_shift\": -12\n}")
req, _ := http.NewRequest("POST", url, payload)
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.goenhance.ai/api/v1/audio/generations")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"cadence-voice-cover\",\n \"audio_url\": \"https://example.com/original-song.mp3\",\n \"reference_audio_url\": \"https://example.com/my-voice.wav\",\n \"pitch_shift\": -12\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goenhance.ai/api/v1/audio/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"cadence-voice-cover\",\n \"audio_url\": \"https://example.com/original-song.mp3\",\n \"reference_audio_url\": \"https://example.com/my-voice.wav\",\n \"pitch_shift\": -12\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"msg": "Success",
"data": {
"img_uuid": "c12b656c-747a-44fd-9c80-add79b0c52d5",
"cost": 0.86
}
}Cadence Voice Cover
Convert the vocals of a song to the voice in a short reference clip. The melody, lyrics and accompaniment stay the same: the lead vocal is separated, converted to the reference voice, and mixed back with the original accompaniment.
reference_audio_url: at least 3 seconds of one clear voice; 5 to 25 seconds of dry vocal (no music, little reverb) works best. Longer clips are cut to about 25 seconds at a pause.pitch_shiftmoves only the vocal by whole semitones: use-12when a song sung by a female voice is converted to a male voice,12for the reverse. Shifts other than whole octaves may clash with the accompaniment.- The result is as long as the original song, which is also the billed length.
- Only use voices you own or have permission to use.
Pricing: 0.02 tokens ($0.0004) per second of audio, rounded up to the whole second.
| Option | Tokens | USD |
|---|---|---|
| Per second of audio | 0.02 | $0.0004 |
Result: one json item { "type": "audio", "value": "https://...mp3" } (a .wav link when output_format is wav), 48 kHz stereo. Result links expire (see link_expired_at).
curl --request POST \
--url https://api.goenhance.ai/api/v1/audio/generations \
--header 'Content-Type: application/json' \
--data '
{
"model": "cadence-voice-cover",
"audio_url": "https://example.com/original-song.mp3",
"reference_audio_url": "https://example.com/my-voice.wav",
"pitch_shift": -12
}
'import requests
url = "https://api.goenhance.ai/api/v1/audio/generations"
payload = {
"model": "cadence-voice-cover",
"audio_url": "https://example.com/original-song.mp3",
"reference_audio_url": "https://example.com/my-voice.wav",
"pitch_shift": -12
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'cadence-voice-cover',
audio_url: 'https://example.com/original-song.mp3',
reference_audio_url: 'https://example.com/my-voice.wav',
pitch_shift: -12
})
};
fetch('https://api.goenhance.ai/api/v1/audio/generations', 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.goenhance.ai/api/v1/audio/generations",
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([
'model' => 'cadence-voice-cover',
'audio_url' => 'https://example.com/original-song.mp3',
'reference_audio_url' => 'https://example.com/my-voice.wav',
'pitch_shift' => -12
]),
CURLOPT_HTTPHEADER => [
"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.goenhance.ai/api/v1/audio/generations"
payload := strings.NewReader("{\n \"model\": \"cadence-voice-cover\",\n \"audio_url\": \"https://example.com/original-song.mp3\",\n \"reference_audio_url\": \"https://example.com/my-voice.wav\",\n \"pitch_shift\": -12\n}")
req, _ := http.NewRequest("POST", url, payload)
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.goenhance.ai/api/v1/audio/generations")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"cadence-voice-cover\",\n \"audio_url\": \"https://example.com/original-song.mp3\",\n \"reference_audio_url\": \"https://example.com/my-voice.wav\",\n \"pitch_shift\": -12\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goenhance.ai/api/v1/audio/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"cadence-voice-cover\",\n \"audio_url\": \"https://example.com/original-song.mp3\",\n \"reference_audio_url\": \"https://example.com/my-voice.wav\",\n \"pitch_shift\": -12\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"msg": "Success",
"data": {
"img_uuid": "c12b656c-747a-44fd-9c80-add79b0c52d5",
"cost": 0.86
}
}Headers
Body
Model name. Must be cadence-voice-cover.
cadence-voice-cover The original song. A public https:// link to an audio file (mp3, m4a, wav, flac, ogg; a video link uses its audio track), 5 to 360 seconds, up to 20 MB. mp3 or m4a is recommended: a full 6-minute song fits, while wav over about 1 minute 50 seconds or flac over about 3.5 minutes exceeds the limit. Its length is measured before the task is accepted and is the billed length.
The target voice. A public https:// link to an audio file, at least 3 seconds of one clear voice, up to 20 MB.
Optional. Shift the converted vocal by this many semitones, -12 to 12. Accompaniment is not shifted.
-12 <= x <= 12mp3 (320 kbps, default) or wav (16-bit). 48 kHz stereo.
mp3, wav Optional. A publicly accessible HTTPS URL. When the task status changes (processing / success / failed), GoEnhance sends a POST request to this URL. The request body is identical to the response of GET /api/v1/jobs/detail. If your server does not respond with HTTP 200, the notification is retried up to 3 times, with a 3-second timeout per attempt.
"https://your-server.com/goenhance/callback"
