curl --request POST \
--url https://api.goenhance.ai/api/v1/audio/generations \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"model": "cadence-cover",
"audio_url": "https://example.com/original-song.mp3",
"style": "Bossa nova, soft female vocal, nylon guitar, light percussion",
"lyrics": "[Verse]\nMoonlight on the window pane\nI write your name again\n\n[Chorus]\nWhen the wind comes from the sea\nYou'll come back to me"
}
EOFimport requests
url = "https://api.goenhance.ai/api/v1/audio/generations"
payload = {
"model": "cadence-cover",
"audio_url": "https://example.com/original-song.mp3",
"style": "Bossa nova, soft female vocal, nylon guitar, light percussion",
"lyrics": "[Verse]
Moonlight on the window pane
I write your name again
[Chorus]
When the wind comes from the sea
You'll come back to me"
}
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-cover',
audio_url: 'https://example.com/original-song.mp3',
style: 'Bossa nova, soft female vocal, nylon guitar, light percussion',
lyrics: '[Verse]\nMoonlight on the window pane\nI write your name again\n\n[Chorus]\nWhen the wind comes from the sea\nYou\'ll come back to me'
})
};
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-cover',
'audio_url' => 'https://example.com/original-song.mp3',
'style' => 'Bossa nova, soft female vocal, nylon guitar, light percussion',
'lyrics' => '[Verse]
Moonlight on the window pane
I write your name again
[Chorus]
When the wind comes from the sea
You\'ll come back to me'
]),
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-cover\",\n \"audio_url\": \"https://example.com/original-song.mp3\",\n \"style\": \"Bossa nova, soft female vocal, nylon guitar, light percussion\",\n \"lyrics\": \"[Verse]\\nMoonlight on the window pane\\nI write your name again\\n\\n[Chorus]\\nWhen the wind comes from the sea\\nYou'll come back to me\"\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-cover\",\n \"audio_url\": \"https://example.com/original-song.mp3\",\n \"style\": \"Bossa nova, soft female vocal, nylon guitar, light percussion\",\n \"lyrics\": \"[Verse]\\nMoonlight on the window pane\\nI write your name again\\n\\n[Chorus]\\nWhen the wind comes from the sea\\nYou'll come back to me\"\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-cover\",\n \"audio_url\": \"https://example.com/original-song.mp3\",\n \"style\": \"Bossa nova, soft female vocal, nylon guitar, light percussion\",\n \"lyrics\": \"[Verse]\\nMoonlight on the window pane\\nI write your name again\\n\\n[Chorus]\\nWhen the wind comes from the sea\\nYou'll come back to me\"\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 Cover
Cover an existing song: the lead melody of audio_url is kept, and your lyrics are sung over a new arrangement in the style you describe.
- The song needs a clear lead vocal melody. To keep the original lyrics, paste them into
lyrics. - The cover follows the length of the original song, which is also the billed length.
- The cover stays in the key of the original: a style asking for a male voice over a song sung in a female range still sings in that range.
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 @- <<EOF
{
"model": "cadence-cover",
"audio_url": "https://example.com/original-song.mp3",
"style": "Bossa nova, soft female vocal, nylon guitar, light percussion",
"lyrics": "[Verse]\nMoonlight on the window pane\nI write your name again\n\n[Chorus]\nWhen the wind comes from the sea\nYou'll come back to me"
}
EOFimport requests
url = "https://api.goenhance.ai/api/v1/audio/generations"
payload = {
"model": "cadence-cover",
"audio_url": "https://example.com/original-song.mp3",
"style": "Bossa nova, soft female vocal, nylon guitar, light percussion",
"lyrics": "[Verse]
Moonlight on the window pane
I write your name again
[Chorus]
When the wind comes from the sea
You'll come back to me"
}
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-cover',
audio_url: 'https://example.com/original-song.mp3',
style: 'Bossa nova, soft female vocal, nylon guitar, light percussion',
lyrics: '[Verse]\nMoonlight on the window pane\nI write your name again\n\n[Chorus]\nWhen the wind comes from the sea\nYou\'ll come back to me'
})
};
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-cover',
'audio_url' => 'https://example.com/original-song.mp3',
'style' => 'Bossa nova, soft female vocal, nylon guitar, light percussion',
'lyrics' => '[Verse]
Moonlight on the window pane
I write your name again
[Chorus]
When the wind comes from the sea
You\'ll come back to me'
]),
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-cover\",\n \"audio_url\": \"https://example.com/original-song.mp3\",\n \"style\": \"Bossa nova, soft female vocal, nylon guitar, light percussion\",\n \"lyrics\": \"[Verse]\\nMoonlight on the window pane\\nI write your name again\\n\\n[Chorus]\\nWhen the wind comes from the sea\\nYou'll come back to me\"\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-cover\",\n \"audio_url\": \"https://example.com/original-song.mp3\",\n \"style\": \"Bossa nova, soft female vocal, nylon guitar, light percussion\",\n \"lyrics\": \"[Verse]\\nMoonlight on the window pane\\nI write your name again\\n\\n[Chorus]\\nWhen the wind comes from the sea\\nYou'll come back to me\"\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-cover\",\n \"audio_url\": \"https://example.com/original-song.mp3\",\n \"style\": \"Bossa nova, soft female vocal, nylon guitar, light percussion\",\n \"lyrics\": \"[Verse]\\nMoonlight on the window pane\\nI write your name again\\n\\n[Chorus]\\nWhen the wind comes from the sea\\nYou'll come back to me\"\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-cover.
cadence-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.
Describe the music: language, genre, instruments, vocal, mood and tempo, comma-separated works best, e.g. Mandarin pop, warm female vocal, piano, strings, 90 BPM, emotional. Max 1000 characters.
1000Lyrics to sing over the original melody, with \n between lines. Section tags such as [Verse] and [Chorus] are recommended. Max 4000 characters.
4000Optional. The same seed and inputs give the same result. Random when omitted.
0 <= x <= 2147483647mp3 (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"
