Recovery Audio
curl --request POST \
--url https://apibox.erweima.ai/api/v1/suno/recovery \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sunoTaskId": "5c79****be8e",
"callBackUrl": "https://api.example.com/callback"
}
'import requests
url = "https://apibox.erweima.ai/api/v1/suno/recovery"
payload = {
"sunoTaskId": "5c79****be8e",
"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({sunoTaskId: '5c79****be8e', callBackUrl: 'https://api.example.com/callback'})
};
fetch('https://apibox.erweima.ai/api/v1/suno/recovery', 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/suno/recovery",
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([
'sunoTaskId' => '5c79****be8e',
'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/suno/recovery"
payload := strings.NewReader("{\n \"sunoTaskId\": \"5c79****be8e\",\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/suno/recovery")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sunoTaskId\": \"5c79****be8e\",\n \"callBackUrl\": \"https://api.example.com/callback\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apibox.erweima.ai/api/v1/suno/recovery")
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 \"sunoTaskId\": \"5c79****be8e\",\n \"callBackUrl\": \"https://api.example.com/callback\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "success",
"data": {
"task_id": "dc19****18b3"
}
}Generate Music
Recovery Audio
Recover playable audio links for an existing music generation task.
POST
/
api
/
v1
/
suno
/
recovery
Recovery Audio
curl --request POST \
--url https://apibox.erweima.ai/api/v1/suno/recovery \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sunoTaskId": "5c79****be8e",
"callBackUrl": "https://api.example.com/callback"
}
'import requests
url = "https://apibox.erweima.ai/api/v1/suno/recovery"
payload = {
"sunoTaskId": "5c79****be8e",
"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({sunoTaskId: '5c79****be8e', callBackUrl: 'https://api.example.com/callback'})
};
fetch('https://apibox.erweima.ai/api/v1/suno/recovery', 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/suno/recovery",
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([
'sunoTaskId' => '5c79****be8e',
'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/suno/recovery"
payload := strings.NewReader("{\n \"sunoTaskId\": \"5c79****be8e\",\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/suno/recovery")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sunoTaskId\": \"5c79****be8e\",\n \"callBackUrl\": \"https://api.example.com/callback\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apibox.erweima.ai/api/v1/suno/recovery")
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 \"sunoTaskId\": \"5c79****be8e\",\n \"callBackUrl\": \"https://api.example.com/callback\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "success",
"data": {
"task_id": "dc19****18b3"
}
}Used to recover playable audio links for a music generation task that has already completed. Submit the
The task level
sunoTaskId of the original task and the service regenerates accessible audio URLs for every track that belongs to it.
🚀 User Guide
- Suno’s original links are only valid for a limited period of time. Once they expire, the audio can no longer be played or downloaded from those URLs.
- Submit the
sunoTaskIdof the original music generation task — all tracks of that task are recovered together. - This endpoint only creates the task: it returns a recovery
task_idimmediately and the recovery itself runs asynchronously. - The result is pushed to
callBackUrlwhen the task finishes, and can also be read by polling Get Recovery Audio Details.
source_audio_url is deprecated.source_audio_url in the generation responses and callbacks points to Suno’s original file. That link expires after a period of time and is no longer maintained, so it must not be stored for long-term use. Call this endpoint to obtain a fresh playable link instead.📌 Usage Scenarios
- 🔗 Restoring playback for songs that were generated a long time ago
- 📦 Refreshing audio links before archiving or migrating your own library
- 🛠️ Repairing broken audio URLs reported by your end users
⚠️ Notes
sunoTaskIdin the request body is the music generation task ID (for example the one returned by Generate Music), not the ID returned by this endpoint.- The
task_idin the response is the recovery task ID and is only accepted by Get Recovery Audio Details. callBackUrlis required. The recovery result is pushed to it once the task finishes.- Creating the task successfully does not guarantee that every track can be recovered — check the final result for the per-track
status.
📩 Callback
Once the recovery task finishes, aPOST request is sent to callBackUrl:
{
"code": 200,
"msg": "success",
"task_id": "bbbb****0f7b",
"data": [
{
"id": "3bc3****48fc",
"audio_url": "https://example.com/****.m4a",
"title": "Sunrise Love",
"status": "success",
"error": ""
}
]
}
code is 200 when at least one track was recovered, and 500 when all of them failed. The order of data matches the tracks of the original task.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 original music generation task whose audio links need to be recovered.
Example:
"5c79****be8e"
Callback URL notified when the recovery task finishes. The recovery result is pushed to this address.
Example:
"https://api.example.com/callback"
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
Available options:
200, 400, 401, 404, 405, 413, 429, 430, 455, 500 Example:
200
Error message when code != 200
Example:
"success"
Show child attributes
Show child attributes
