curl --request POST \
--url https://api.goenhance.ai/api/v1/audio/generations \
--header 'Content-Type: application/json' \
--data '
{
"model": "cadence-instrumental",
"style": "Lofi hip hop, mellow piano, soft drums, vinyl crackle, 80 BPM",
"duration": 60
}
'import requests
url = "https://api.goenhance.ai/api/v1/audio/generations"
payload = {
"model": "cadence-instrumental",
"style": "Lofi hip hop, mellow piano, soft drums, vinyl crackle, 80 BPM",
"duration": 60
}
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-instrumental',
style: 'Lofi hip hop, mellow piano, soft drums, vinyl crackle, 80 BPM',
duration: 60
})
};
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-instrumental',
'style' => 'Lofi hip hop, mellow piano, soft drums, vinyl crackle, 80 BPM',
'duration' => 60
]),
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-instrumental\",\n \"style\": \"Lofi hip hop, mellow piano, soft drums, vinyl crackle, 80 BPM\",\n \"duration\": 60\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-instrumental\",\n \"style\": \"Lofi hip hop, mellow piano, soft drums, vinyl crackle, 80 BPM\",\n \"duration\": 60\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-instrumental\",\n \"style\": \"Lofi hip hop, mellow piano, soft drums, vinyl crackle, 80 BPM\",\n \"duration\": 60\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"msg": "Success",
"data": {
"img_uuid": "c12b656c-747a-44fd-9c80-add79b0c52d5",
"cost": 1.2
}
}Cadence Instrumental
Generate music without vocals from a style description.
- The track is exactly
durationseconds long (10 to 360) and fades out over the last 3 seconds.durationis the billed length. - Words describing vocals in
styleare ignored. Vocals are strongly suppressed but not guaranteed to be completely absent. - Generation takes about as long as the requested length.
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-instrumental",
"style": "Lofi hip hop, mellow piano, soft drums, vinyl crackle, 80 BPM",
"duration": 60
}
'import requests
url = "https://api.goenhance.ai/api/v1/audio/generations"
payload = {
"model": "cadence-instrumental",
"style": "Lofi hip hop, mellow piano, soft drums, vinyl crackle, 80 BPM",
"duration": 60
}
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-instrumental',
style: 'Lofi hip hop, mellow piano, soft drums, vinyl crackle, 80 BPM',
duration: 60
})
};
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-instrumental',
'style' => 'Lofi hip hop, mellow piano, soft drums, vinyl crackle, 80 BPM',
'duration' => 60
]),
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-instrumental\",\n \"style\": \"Lofi hip hop, mellow piano, soft drums, vinyl crackle, 80 BPM\",\n \"duration\": 60\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-instrumental\",\n \"style\": \"Lofi hip hop, mellow piano, soft drums, vinyl crackle, 80 BPM\",\n \"duration\": 60\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-instrumental\",\n \"style\": \"Lofi hip hop, mellow piano, soft drums, vinyl crackle, 80 BPM\",\n \"duration\": 60\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"msg": "Success",
"data": {
"img_uuid": "c12b656c-747a-44fd-9c80-add79b0c52d5",
"cost": 1.2
}
}Headers
Body
Model name. Must be cadence-instrumental.
cadence-instrumental 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.
1000Required. Length of the track in seconds, 10 to 360. This is the billed length.
10 <= x <= 360Optional. 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"
