Generate Custom Music
curl --request POST \
--url https://api.wav.com/api/public/v2/MusicAI \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"music_style": "Lo-fi",
"lyrics": "<string>",
"make_instrumental": false,
"vocal_only": false,
"title": "My Generated Track",
"gender": "female",
"voice_id": "e1cb7380-e3db-433a-b186-a996d7545986",
"generate_album_cover": false,
"lyrics_timestamps": false,
"model": "v7",
"webhook_url": "https://example.com/my-webhook"
}
'import requests
url = "https://api.wav.com/api/public/v2/MusicAI"
payload = {
"prompt": "<string>",
"music_style": "Lo-fi",
"lyrics": "<string>",
"make_instrumental": False,
"vocal_only": False,
"title": "My Generated Track",
"gender": "female",
"voice_id": "e1cb7380-e3db-433a-b186-a996d7545986",
"generate_album_cover": False,
"lyrics_timestamps": False,
"model": "v7",
"webhook_url": "https://example.com/my-webhook"
}
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({
prompt: '<string>',
music_style: 'Lo-fi',
lyrics: '<string>',
make_instrumental: false,
vocal_only: false,
title: 'My Generated Track',
gender: 'female',
voice_id: 'e1cb7380-e3db-433a-b186-a996d7545986',
generate_album_cover: false,
lyrics_timestamps: false,
model: 'v7',
webhook_url: 'https://example.com/my-webhook'
})
};
fetch('https://api.wav.com/api/public/v2/MusicAI', 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.wav.com/api/public/v2/MusicAI",
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([
'prompt' => '<string>',
'music_style' => 'Lo-fi',
'lyrics' => '<string>',
'make_instrumental' => false,
'vocal_only' => false,
'title' => 'My Generated Track',
'gender' => 'female',
'voice_id' => 'e1cb7380-e3db-433a-b186-a996d7545986',
'generate_album_cover' => false,
'lyrics_timestamps' => false,
'model' => 'v7',
'webhook_url' => 'https://example.com/my-webhook'
]),
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.wav.com/api/public/v2/MusicAI"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"music_style\": \"Lo-fi\",\n \"lyrics\": \"<string>\",\n \"make_instrumental\": false,\n \"vocal_only\": false,\n \"title\": \"My Generated Track\",\n \"gender\": \"female\",\n \"voice_id\": \"e1cb7380-e3db-433a-b186-a996d7545986\",\n \"generate_album_cover\": false,\n \"lyrics_timestamps\": false,\n \"model\": \"v7\",\n \"webhook_url\": \"https://example.com/my-webhook\"\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.wav.com/api/public/v2/MusicAI")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"music_style\": \"Lo-fi\",\n \"lyrics\": \"<string>\",\n \"make_instrumental\": false,\n \"vocal_only\": false,\n \"title\": \"My Generated Track\",\n \"gender\": \"female\",\n \"voice_id\": \"e1cb7380-e3db-433a-b186-a996d7545986\",\n \"generate_album_cover\": false,\n \"lyrics_timestamps\": false,\n \"model\": \"v7\",\n \"webhook_url\": \"https://example.com/my-webhook\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wav.com/api/public/v2/MusicAI")
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 \"prompt\": \"<string>\",\n \"music_style\": \"Lo-fi\",\n \"lyrics\": \"<string>\",\n \"make_instrumental\": false,\n \"vocal_only\": false,\n \"title\": \"My Generated Track\",\n \"gender\": \"female\",\n \"voice_id\": \"e1cb7380-e3db-433a-b186-a996d7545986\",\n \"generate_album_cover\": false,\n \"lyrics_timestamps\": false,\n \"model\": \"v7\",\n \"webhook_url\": \"https://example.com/my-webhook\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Message published to queue",
"task_id": "50c04348-7077-5ffd-a407-55f031db20ef",
"eta": 154,
"conversion_id_1": "5a2c6385-e2e1-5531-a530-aab3ff040a3c",
"conversion_id_2": "e3c65d75-d1fd-549c-9e63-4b303a01cd23",
"is_flagged": false,
"reason": "",
"credit_estimate": 0.06
}{
"success": false,
"message": "Insufficient credit balance"
}{
"success": false,
"message": "Internal Server Error"
}Sample Request Endpoints
Sample Conversion Request
Create music powered by AI using just a prompt, lyrics, or a defined music style.
POST
/
v2
/
MusicAI
Generate Custom Music
curl --request POST \
--url https://api.wav.com/api/public/v2/MusicAI \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"music_style": "Lo-fi",
"lyrics": "<string>",
"make_instrumental": false,
"vocal_only": false,
"title": "My Generated Track",
"gender": "female",
"voice_id": "e1cb7380-e3db-433a-b186-a996d7545986",
"generate_album_cover": false,
"lyrics_timestamps": false,
"model": "v7",
"webhook_url": "https://example.com/my-webhook"
}
'import requests
url = "https://api.wav.com/api/public/v2/MusicAI"
payload = {
"prompt": "<string>",
"music_style": "Lo-fi",
"lyrics": "<string>",
"make_instrumental": False,
"vocal_only": False,
"title": "My Generated Track",
"gender": "female",
"voice_id": "e1cb7380-e3db-433a-b186-a996d7545986",
"generate_album_cover": False,
"lyrics_timestamps": False,
"model": "v7",
"webhook_url": "https://example.com/my-webhook"
}
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({
prompt: '<string>',
music_style: 'Lo-fi',
lyrics: '<string>',
make_instrumental: false,
vocal_only: false,
title: 'My Generated Track',
gender: 'female',
voice_id: 'e1cb7380-e3db-433a-b186-a996d7545986',
generate_album_cover: false,
lyrics_timestamps: false,
model: 'v7',
webhook_url: 'https://example.com/my-webhook'
})
};
fetch('https://api.wav.com/api/public/v2/MusicAI', 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.wav.com/api/public/v2/MusicAI",
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([
'prompt' => '<string>',
'music_style' => 'Lo-fi',
'lyrics' => '<string>',
'make_instrumental' => false,
'vocal_only' => false,
'title' => 'My Generated Track',
'gender' => 'female',
'voice_id' => 'e1cb7380-e3db-433a-b186-a996d7545986',
'generate_album_cover' => false,
'lyrics_timestamps' => false,
'model' => 'v7',
'webhook_url' => 'https://example.com/my-webhook'
]),
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.wav.com/api/public/v2/MusicAI"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"music_style\": \"Lo-fi\",\n \"lyrics\": \"<string>\",\n \"make_instrumental\": false,\n \"vocal_only\": false,\n \"title\": \"My Generated Track\",\n \"gender\": \"female\",\n \"voice_id\": \"e1cb7380-e3db-433a-b186-a996d7545986\",\n \"generate_album_cover\": false,\n \"lyrics_timestamps\": false,\n \"model\": \"v7\",\n \"webhook_url\": \"https://example.com/my-webhook\"\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.wav.com/api/public/v2/MusicAI")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"music_style\": \"Lo-fi\",\n \"lyrics\": \"<string>\",\n \"make_instrumental\": false,\n \"vocal_only\": false,\n \"title\": \"My Generated Track\",\n \"gender\": \"female\",\n \"voice_id\": \"e1cb7380-e3db-433a-b186-a996d7545986\",\n \"generate_album_cover\": false,\n \"lyrics_timestamps\": false,\n \"model\": \"v7\",\n \"webhook_url\": \"https://example.com/my-webhook\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wav.com/api/public/v2/MusicAI")
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 \"prompt\": \"<string>\",\n \"music_style\": \"Lo-fi\",\n \"lyrics\": \"<string>\",\n \"make_instrumental\": false,\n \"vocal_only\": false,\n \"title\": \"My Generated Track\",\n \"gender\": \"female\",\n \"voice_id\": \"e1cb7380-e3db-433a-b186-a996d7545986\",\n \"generate_album_cover\": false,\n \"lyrics_timestamps\": false,\n \"model\": \"v7\",\n \"webhook_url\": \"https://example.com/my-webhook\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Message published to queue",
"task_id": "50c04348-7077-5ffd-a407-55f031db20ef",
"eta": 154,
"conversion_id_1": "5a2c6385-e2e1-5531-a530-aab3ff040a3c",
"conversion_id_2": "e3c65d75-d1fd-549c-9e63-4b303a01cd23",
"is_flagged": false,
"reason": "",
"credit_estimate": 0.06
}{
"success": false,
"message": "Insufficient credit balance"
}{
"success": false,
"message": "Internal Server Error"
}Authorizations
Body
application/json
A natural language prompt for music generation. Keep it under 300 characters. Be clear and descriptive for better results.
Style of music to generate (e.g., Rock, Pop)
Example:
"Lo-fi"
Custom lyrics for the generated music
Whether to make the music instrumental
Whether to generate only vocals of output audio
Title of the generated music track
Example:
"My Generated Track"
Gender of the voice model
Example:
"female"
Voice model to convert generated audio
Example:
"e1cb7380-e3db-433a-b186-a996d7545986"
Whether to generate an album cover for the generated audio
Whether to generate timestamps for the lyrics
Model version to use for generation
Available options:
v6, v6-pro, v7, v7-pro Example:
"v7"
URL for callback upon completion
Example:
"https://example.com/my-webhook"
⌘I

