Convert to WAV Format
curl --request POST \
--url https://apibox.erweima.ai/api/v1/wav/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"taskId": "5c79****be8e",
"audioId": "e231****-****-****-****-****8cadc7dc",
"callBackUrl": "https://api.example.com/callback"
}
'import requests
url = "https://apibox.erweima.ai/api/v1/wav/generate"
payload = {
"taskId": "5c79****be8e",
"audioId": "e231****-****-****-****-****8cadc7dc",
"callBackUrl": "https://api.example.com/callback"
}
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({
taskId: '5c79****be8e',
audioId: 'e231****-****-****-****-****8cadc7dc',
callBackUrl: 'https://api.example.com/callback'
})
};
fetch('https://apibox.erweima.ai/api/v1/wav/generate', 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/wav/generate",
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([
'taskId' => '5c79****be8e',
'audioId' => 'e231****-****-****-****-****8cadc7dc',
'callBackUrl' => 'https://api.example.com/callback'
]),
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/wav/generate"
payload := strings.NewReader("{\n \"taskId\": \"5c79****be8e\",\n \"audioId\": \"e231****-****-****-****-****8cadc7dc\",\n \"callBackUrl\": \"https://api.example.com/callback\"\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/wav/generate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"taskId\": \"5c79****be8e\",\n \"audioId\": \"e231****-****-****-****-****8cadc7dc\",\n \"callBackUrl\": \"https://api.example.com/callback\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apibox.erweima.ai/api/v1/wav/generate")
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 \"taskId\": \"5c79****be8e\",\n \"audioId\": \"e231****-****-****-****-****8cadc7dc\",\n \"callBackUrl\": \"https://api.example.com/callback\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "success",
"data": {
"taskId": "5c79****be8e"
}
}WAV Conversion
Convert to WAV Format
Convert existing music tracks to high-quality WAV format.
POST
/
api
/
v1
/
wav
/
generate
Convert to WAV Format
curl --request POST \
--url https://apibox.erweima.ai/api/v1/wav/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"taskId": "5c79****be8e",
"audioId": "e231****-****-****-****-****8cadc7dc",
"callBackUrl": "https://api.example.com/callback"
}
'import requests
url = "https://apibox.erweima.ai/api/v1/wav/generate"
payload = {
"taskId": "5c79****be8e",
"audioId": "e231****-****-****-****-****8cadc7dc",
"callBackUrl": "https://api.example.com/callback"
}
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({
taskId: '5c79****be8e',
audioId: 'e231****-****-****-****-****8cadc7dc',
callBackUrl: 'https://api.example.com/callback'
})
};
fetch('https://apibox.erweima.ai/api/v1/wav/generate', 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/wav/generate",
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([
'taskId' => '5c79****be8e',
'audioId' => 'e231****-****-****-****-****8cadc7dc',
'callBackUrl' => 'https://api.example.com/callback'
]),
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/wav/generate"
payload := strings.NewReader("{\n \"taskId\": \"5c79****be8e\",\n \"audioId\": \"e231****-****-****-****-****8cadc7dc\",\n \"callBackUrl\": \"https://api.example.com/callback\"\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/wav/generate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"taskId\": \"5c79****be8e\",\n \"audioId\": \"e231****-****-****-****-****8cadc7dc\",\n \"callBackUrl\": \"https://api.example.com/callback\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apibox.erweima.ai/api/v1/wav/generate")
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 \"taskId\": \"5c79****be8e\",\n \"audioId\": \"e231****-****-****-****-****8cadc7dc\",\n \"callBackUrl\": \"https://api.example.com/callback\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "success",
"data": {
"taskId": "5c79****be8e"
}
}Usage Guide
- Provide either taskId or audioId to identify the source track
- WAV format is ideal for professional audio editing and production
- The conversion preserves full audio quality
Developer Notes
- Generated WAV files are retained for 15 days
- WAV files are significantly larger than MP3 files
- This format is recommended for further audio processing or professional use
- Callback provides a single download URL when conversion is complete
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
application/json
The task ID of the music generation task.
Example:
"5c79****be8e"
The audio ID of the specific track to convert.
- Providing the specific
audioIdensures the exact track is converted, especially when a task has multiple tracks.
Example:
"e231****-****-****-****-****8cadc7dc"
The URL to receive WAV conversion completion notification.
- Required.
- The callback includes a single download URL for the converted WAV file.
- For detailed callback format and implementation guide, see WAV Format Conversion Callbacks
- Alternatively, you can use the Get WAV Conversion Details interface to poll task status
Example:
"https://api.example.com/callback"
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
- ⚠️ 409 - Conflict - WAV record already exists
- ⚠️ 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
Available options:
200, 400, 401, 404, 405, 409, 413, 429, 430, 455, 500 Error message when code != 200
Example:
"success"
Show child attributes
Show child attributes
