curl --request POST \
--url https://apibox.erweima.ai/api/v1/generate/add-instrumental \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"uploadUrl": "https://example.com/music.mp3",
"title": "Relaxing Piano",
"negativeTags": "Heavy Metal, Aggressive Drums",
"tags": "Relaxing Piano, Ambient, Peaceful",
"callBackUrl": "https://api.example.com/callback",
"vocalGender": "m",
"styleWeight": 0.61,
"weirdnessConstraint": 0.72,
"audioWeight": 0.65,
"model": "V4_5PLUS"
}
'import requests
url = "https://apibox.erweima.ai/api/v1/generate/add-instrumental"
payload = {
"uploadUrl": "https://example.com/music.mp3",
"title": "Relaxing Piano",
"negativeTags": "Heavy Metal, Aggressive Drums",
"tags": "Relaxing Piano, Ambient, Peaceful",
"callBackUrl": "https://api.example.com/callback",
"vocalGender": "m",
"styleWeight": 0.61,
"weirdnessConstraint": 0.72,
"audioWeight": 0.65,
"model": "V4_5PLUS"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
uploadUrl: 'https://example.com/music.mp3',
title: 'Relaxing Piano',
negativeTags: 'Heavy Metal, Aggressive Drums',
tags: 'Relaxing Piano, Ambient, Peaceful',
callBackUrl: 'https://api.example.com/callback',
vocalGender: 'm',
styleWeight: 0.61,
weirdnessConstraint: 0.72,
audioWeight: 0.65,
model: 'V4_5PLUS'
})
};
fetch('https://apibox.erweima.ai/api/v1/generate/add-instrumental', 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://apibox.erweima.ai/api/v1/generate/add-instrumental",
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([
'uploadUrl' => 'https://example.com/music.mp3',
'title' => 'Relaxing Piano',
'negativeTags' => 'Heavy Metal, Aggressive Drums',
'tags' => 'Relaxing Piano, Ambient, Peaceful',
'callBackUrl' => 'https://api.example.com/callback',
'vocalGender' => 'm',
'styleWeight' => 0.61,
'weirdnessConstraint' => 0.72,
'audioWeight' => 0.65,
'model' => 'V4_5PLUS'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://apibox.erweima.ai/api/v1/generate/add-instrumental"
payload := strings.NewReader("{\n \"uploadUrl\": \"https://example.com/music.mp3\",\n \"title\": \"Relaxing Piano\",\n \"negativeTags\": \"Heavy Metal, Aggressive Drums\",\n \"tags\": \"Relaxing Piano, Ambient, Peaceful\",\n \"callBackUrl\": \"https://api.example.com/callback\",\n \"vocalGender\": \"m\",\n \"styleWeight\": 0.61,\n \"weirdnessConstraint\": 0.72,\n \"audioWeight\": 0.65,\n \"model\": \"V4_5PLUS\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://apibox.erweima.ai/api/v1/generate/add-instrumental")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"uploadUrl\": \"https://example.com/music.mp3\",\n \"title\": \"Relaxing Piano\",\n \"negativeTags\": \"Heavy Metal, Aggressive Drums\",\n \"tags\": \"Relaxing Piano, Ambient, Peaceful\",\n \"callBackUrl\": \"https://api.example.com/callback\",\n \"vocalGender\": \"m\",\n \"styleWeight\": 0.61,\n \"weirdnessConstraint\": 0.72,\n \"audioWeight\": 0.65,\n \"model\": \"V4_5PLUS\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apibox.erweima.ai/api/v1/generate/add-instrumental")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"uploadUrl\": \"https://example.com/music.mp3\",\n \"title\": \"Relaxing Piano\",\n \"negativeTags\": \"Heavy Metal, Aggressive Drums\",\n \"tags\": \"Relaxing Piano, Ambient, Peaceful\",\n \"callBackUrl\": \"https://api.example.com/callback\",\n \"vocalGender\": \"m\",\n \"styleWeight\": 0.61,\n \"weirdnessConstraint\": 0.72,\n \"audioWeight\": 0.65,\n \"model\": \"V4_5PLUS\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "success",
"data": {
"taskId": "5c79****be8e"
}
}Add Instrumental
This endpoint generates a musical accompaniment tailored to an uploaded audio file — typically a vocal stem or melody track. It helps users instantly flesh out their vocal ideas with high-quality backing music, all without needing a producer.
curl --request POST \
--url https://apibox.erweima.ai/api/v1/generate/add-instrumental \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"uploadUrl": "https://example.com/music.mp3",
"title": "Relaxing Piano",
"negativeTags": "Heavy Metal, Aggressive Drums",
"tags": "Relaxing Piano, Ambient, Peaceful",
"callBackUrl": "https://api.example.com/callback",
"vocalGender": "m",
"styleWeight": 0.61,
"weirdnessConstraint": 0.72,
"audioWeight": 0.65,
"model": "V4_5PLUS"
}
'import requests
url = "https://apibox.erweima.ai/api/v1/generate/add-instrumental"
payload = {
"uploadUrl": "https://example.com/music.mp3",
"title": "Relaxing Piano",
"negativeTags": "Heavy Metal, Aggressive Drums",
"tags": "Relaxing Piano, Ambient, Peaceful",
"callBackUrl": "https://api.example.com/callback",
"vocalGender": "m",
"styleWeight": 0.61,
"weirdnessConstraint": 0.72,
"audioWeight": 0.65,
"model": "V4_5PLUS"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
uploadUrl: 'https://example.com/music.mp3',
title: 'Relaxing Piano',
negativeTags: 'Heavy Metal, Aggressive Drums',
tags: 'Relaxing Piano, Ambient, Peaceful',
callBackUrl: 'https://api.example.com/callback',
vocalGender: 'm',
styleWeight: 0.61,
weirdnessConstraint: 0.72,
audioWeight: 0.65,
model: 'V4_5PLUS'
})
};
fetch('https://apibox.erweima.ai/api/v1/generate/add-instrumental', 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://apibox.erweima.ai/api/v1/generate/add-instrumental",
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([
'uploadUrl' => 'https://example.com/music.mp3',
'title' => 'Relaxing Piano',
'negativeTags' => 'Heavy Metal, Aggressive Drums',
'tags' => 'Relaxing Piano, Ambient, Peaceful',
'callBackUrl' => 'https://api.example.com/callback',
'vocalGender' => 'm',
'styleWeight' => 0.61,
'weirdnessConstraint' => 0.72,
'audioWeight' => 0.65,
'model' => 'V4_5PLUS'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://apibox.erweima.ai/api/v1/generate/add-instrumental"
payload := strings.NewReader("{\n \"uploadUrl\": \"https://example.com/music.mp3\",\n \"title\": \"Relaxing Piano\",\n \"negativeTags\": \"Heavy Metal, Aggressive Drums\",\n \"tags\": \"Relaxing Piano, Ambient, Peaceful\",\n \"callBackUrl\": \"https://api.example.com/callback\",\n \"vocalGender\": \"m\",\n \"styleWeight\": 0.61,\n \"weirdnessConstraint\": 0.72,\n \"audioWeight\": 0.65,\n \"model\": \"V4_5PLUS\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://apibox.erweima.ai/api/v1/generate/add-instrumental")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"uploadUrl\": \"https://example.com/music.mp3\",\n \"title\": \"Relaxing Piano\",\n \"negativeTags\": \"Heavy Metal, Aggressive Drums\",\n \"tags\": \"Relaxing Piano, Ambient, Peaceful\",\n \"callBackUrl\": \"https://api.example.com/callback\",\n \"vocalGender\": \"m\",\n \"styleWeight\": 0.61,\n \"weirdnessConstraint\": 0.72,\n \"audioWeight\": 0.65,\n \"model\": \"V4_5PLUS\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apibox.erweima.ai/api/v1/generate/add-instrumental")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"uploadUrl\": \"https://example.com/music.mp3\",\n \"title\": \"Relaxing Piano\",\n \"negativeTags\": \"Heavy Metal, Aggressive Drums\",\n \"tags\": \"Relaxing Piano, Ambient, Peaceful\",\n \"callBackUrl\": \"https://api.example.com/callback\",\n \"vocalGender\": \"m\",\n \"styleWeight\": 0.61,\n \"weirdnessConstraint\": 0.72,\n \"audioWeight\": 0.65,\n \"model\": \"V4_5PLUS\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "success",
"data": {
"taskId": "5c79****be8e"
}
}Key Capabilities
- Accepts uploadUrl of an existing audio file (usually vocals or stems).
- Supports fine-grained customization via parameters such as:
- tags and negativeTags (musical style controls)
- styleWeight, audioWeight, weirdnessConstraint (stylistic & creative blending)
- vocalGender, title, callBackUrl for metadata & workflow control .
- Returns a taskId for tracking, and results are retained for 14 days. Callback workflow includes three stages: text, first, and complete .
Typical Use Cases
- Singers or melody writers who want instant fuller arrangements around their vocal inputs.
- Applications like karaoke platforms, demo-generation tools, or co-creation interfaces that allow users to experiment with accompaniment styles easily.
Parameter Details
- Required fields:
uploadUrl,title,negativeTags,tags,callBackUrl - Upload URL: Must be a valid, publicly accessible audio file URL
- Title: Used as the title for the generated instrumental track
- Tags: Describe the desired style, mood, and instruments for the instrumental track
- Negative Tags: Music styles or traits to exclude from the generated instrumental
Optional parameters
- vocalGender (string): Preferred vocal gender for any vocal elements. Allowed values:
m(male),f(female) - styleWeight (number): Style adherence weight in range 0–1 (recommended two decimals)
- weirdnessConstraint (number): Creativity/novelty constraint in range 0–1 (recommended two decimals)
- audioWeight (number): Relative weight of audio consistency in range 0–1 (recommended two decimals)
- model (string): Model version used for generation. Allowed values:
V4_5PLUS(default),V5,V5_5
Developer Notes
- Callback process has three stages:
text(text generation),first(first track complete),complete(all tracks complete) - In some cases,
textandfirststages may be skipped, directly returningcomplete - See Add Instrumental Callbacks for detailed callback format
- Monitor task progress using Get Music Generation Details
Authorizations
🔑 API Authentication
All endpoints require authentication using Bearer Token.
Get API Key
- Visit the API Key Management Page to obtain your API Key
Usage
Add to request headers:
Authorization: Bearer YOUR_API_KEY
⚠️ Note:
- Keep your API Key secure and do not share it with others
- If you suspect your API Key has been compromised, reset it immediately from the management page
Body
The URL of the uploaded music file to add instrumental to.
- Required.
- Must be a valid audio file URL accessible by the system.
- The uploaded audio should be in a supported format (MP3, WAV, etc.).
"https://example.com/music.mp3"
The title of the music track.
- Required.
- This will be used as the title for the generated instrumental track.
"Relaxing Piano"
Music styles or traits to exclude from the generated instrumental.
- Required.
- Use to avoid specific styles or instruments in the instrumental version.
Example: "Heavy Metal, Aggressive Drums"
"Heavy Metal, Aggressive Drums"
Music style and characteristics for the instrumental.
- Required.
- Describe the desired style, mood, and instruments for the instrumental track.
Example: "Relaxing Piano, Ambient, Peaceful"
"Relaxing Piano, Ambient, Peaceful"
The URL to receive task completion notifications when instrumental generation is complete. The callback process has three stages: text (text generation), first (first track complete), complete (all tracks complete). Note: In some cases, text and first stages may be skipped, directly returning complete.
- For detailed callback format and implementation guide, see Add Instrumental Callbacks
- Alternatively, you can use the Get Music Generation Details interface to poll task status
"https://api.example.com/callback"
Preferred vocal gender for any vocal elements. Optional. Allowed values: 'm' (male), 'f' (female).
m, f "m"
Style adherence weight. Optional. Range: 0-1. Two decimal places recommended.
0 <= x <= 1Must be a multiple of 0.010.61
Creativity/novelty constraint. Optional. Range: 0-1. Two decimal places recommended.
0 <= x <= 1Must be a multiple of 0.010.72
Relative weight of audio consistency versus other controls. Optional. Range: 0-1. Two decimal places recommended.
0 <= x <= 1Must be a multiple of 0.010.65
Model version to use for generation. Optional. Default: V4_5PLUS.
V4_5PLUS, V5, V5_5 "V4_5PLUS"
Callbacks
Response
Request successful
Status Codes
- ✅ 200 - Request successful
- ⚠️ 400 - Invalid parameters
- ⚠️ 401 - Unauthorized access
- ⚠️ 404 - Invalid request method or path
- ⚠️ 405 - Rate limit exceeded
- ⚠️ 413 - Theme or prompt too long
- ⚠️ 429 - Insufficient credits
- ⚠️ 430 - Your call frequency is too high. Please try again later.
- ⚠️ 455 - System maintenance
- ❌ 500 - Server error
200, 400, 401, 404, 405, 413, 429, 430, 455, 500 200
Error message when code != 200
"success"
Show child attributes
Show child attributes
