Suno V6 General Agreements and Task Inquiry
curl --request GET \
--url https://api.apimart.ai/v1/music/tasks/{task_id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.apimart.ai/v1/music/tasks/{task_id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.apimart.ai/v1/music/tasks/{task_id}', 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.apimart.ai/v1/music/tasks/{task_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.apimart.ai/v1/music/tasks/{task_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.apimart.ai/v1/music/tasks/{task_id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apimart.ai/v1/music/tasks/{task_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {
"id": "task_01M24YMN4EV04M84R5QYM77R1E",
"status": "completed",
"progress": 100,
"created": 1789041600,
"cost": 0.12,
"credits_cost": 1.2,
"result": {
"music": [
{
"audio_id": "example-track-id",
"status": "complete",
"title": "follow the lights",
"lyrics": "[Verse]\nthe late wind blows over familiar streets",
"tags": "pop, acoustic",
"display_tags": "Pop, Acoustic",
"negative_tags": "harsh vocals",
"style_weight": 0.7,
"weirdness_constraint": 0,
"audio_weight": 0.4,
"duration": 119.8,
"audio_url": "https://example.com/result.mp3",
"image_url": "https://example.com/cover.jpg",
"image_large_url": "https://example.com/cover-large.jpg"
}
]
}
}
}
{
"code": 200,
"data": {
"id": "task_01M24YMN4EV04M84R5QYM77R1E",
"status": "failed",
"progress": 0,
"cost": 0,
"credits_cost": 0,
"error": {
"message": "task failure reason",
"type": "task_failed",
"code": "task_failed",
"param": ""
}
}
}
Suno
Suno V6 General Agreements and Task Inquiry
Suno V6 version selection, custom models, asynchronous task lifecycle, source track reference and result structure
GET
/
v1
/
music
/
tasks
/
{task_id}
Suno V6 General Agreements and Task Inquiry
curl --request GET \
--url https://api.apimart.ai/v1/music/tasks/{task_id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.apimart.ai/v1/music/tasks/{task_id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.apimart.ai/v1/music/tasks/{task_id}', 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.apimart.ai/v1/music/tasks/{task_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.apimart.ai/v1/music/tasks/{task_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.apimart.ai/v1/music/tasks/{task_id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apimart.ai/v1/music/tasks/{task_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {
"id": "task_01M24YMN4EV04M84R5QYM77R1E",
"status": "completed",
"progress": 100,
"created": 1789041600,
"cost": 0.12,
"credits_cost": 1.2,
"result": {
"music": [
{
"audio_id": "example-track-id",
"status": "complete",
"title": "follow the lights",
"lyrics": "[Verse]\nthe late wind blows over familiar streets",
"tags": "pop, acoustic",
"display_tags": "Pop, Acoustic",
"negative_tags": "harsh vocals",
"style_weight": 0.7,
"weirdness_constraint": 0,
"audio_weight": 0.4,
"duration": 119.8,
"audio_url": "https://example.com/result.mp3",
"image_url": "https://example.com/cover.jpg",
"image_large_url": "https://example.com/cover-large.jpg"
}
]
}
}
}
{
"code": 200,
"data": {
"id": "task_01M24YMN4EV04M84R5QYM77R1E",
"status": "failed",
"progress": 0,
"cost": 0,
"credits_cost": 0,
"error": {
"message": "task failure reason",
"type": "task_failed",
"code": "task_failed",
"param": ""
}
}
}
All Suno generation, editing, and tool interfaces use asynchronous tasks: obtain
task_id after submitting an operation, then query results through this page interface.Authentication
string
required
Bearer Token authentication:
Authorization: Bearer <YOUR_API_KEY>.V6 version and model selection
Public models support the following versions:v6v6-wildv6-mini
version or the custom_model_id returned by a model-creation task. Editing operations that support versions default to v6 when version is omitted. A public version and custom_model_id cannot be sent together.
custom: true selects custom-lyrics mode, while custom_model_id selects a trained custom model. They are different concepts. Custom-lyrics mode does not automatically switch to custom-model pricing.General V6 Generation Options
List the following fields only when specific endpoints are provided:| Field | Description |
|---|---|
variety | Style variation: off / normal / high / extra / max |
max_mode | Max mode, default false; when supported, billed at 2× the standard price |
audio_format | mp3 / m4a / wav |
duration / duration_s | Target generation duration, an integer from 10 to 360 seconds; supported only by specified generation operations |
max_mode: false to every operation. variety and Max mode are independent, so choosing variety: "max" does not enable Max billing.
text and weight limits
| content | field | limit |
|---|---|---|
| Inspiration description | prompt (main generation) / gpt_description (operation endpoints) | Up to 3,000 characters |
| Lyrics | prompt (custom mode) | Up to 5,000 characters |
| Style | style (main generation) / tags (operation endpoints) | Up to 1,000 characters |
| Title | title | Up to 80 characters |
| Weights | style_weight / weirdness / audio_weight | 0–1; numeric 0 is valid |
weirdness; weirdness_constraint is a compatibility alias. The main generation still uses weirdness_constraint. Text length is calculated in Unicode characters.
Reference source track
Based on existing works:task_id:API Mart task ID for the output audio track.audio_index: The original position in the source task query response ofdata.result.music[], starting from 1 by default, and can be1.
All new requests use
task_id + audio_index to reference the source audio track and cannot be replaced by audio_id, music_id, or audio_url. If a resolved task is not found or an index out of bounds occurs, 400 will be returned.Submit response
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01M24YMN4EV04M84R5QYM77R1E"
}
]
}
data[0].task_id. submitted simply indicates that the task has been accepted, not that there is already final audio or other products.
Query task
GET /v1/music/tasks/{task_id}
You can append ?language=zh to get applicable failure message translations. This parameter does not change the language of the song or lyrics.
string
required
The task ID returned by the submission interface.
data.status becomes completed or failed. You can continue using the same task ID after page refresh; do not automatically resend paid POST requests due to network timeout.
query response
integer
response status code.
object
Task information.
Show Properties
Show Properties
string
Platform task ID.
string
pending / processing / completed / failed / unknown.number
Task progress, usually 0–100. Whether it is completed should be based on
status.number
Creation time, Unix seconds.
number
Estimated processing time in seconds, for reference only and not a countdown guarantee.
number
Amount of money (USD).
number
The task consumption points value. Please display the interface return value directly.
object
Result after completion, the structure varies with different operations.
object
Failure message, common fields are
message / type / code / param.{
"code": 200,
"data": {
"id": "task_01M24YMN4EV04M84R5QYM77R1E",
"status": "completed",
"progress": 100,
"created": 1789041600,
"cost": 0.12,
"credits_cost": 1.2,
"result": {
"music": [
{
"audio_id": "example-track-id",
"status": "complete",
"title": "follow the lights",
"lyrics": "[Verse]\nthe late wind blows over familiar streets",
"tags": "pop, acoustic",
"display_tags": "Pop, Acoustic",
"negative_tags": "harsh vocals",
"style_weight": 0.7,
"weirdness_constraint": 0,
"audio_weight": 0.4,
"duration": 119.8,
"audio_url": "https://example.com/result.mp3",
"image_url": "https://example.com/cover.jpg",
"image_large_url": "https://example.com/cover-large.jpg"
}
]
}
}
}
{
"code": 200,
"data": {
"id": "task_01M24YMN4EV04M84R5QYM77R1E",
"status": "failed",
"progress": 0,
"cost": 0,
"credits_cost": 0,
"error": {
"message": "task failure reason",
"type": "task_failed",
"code": "task_failed",
"param": ""
}
}
}
result processing
- Music-related results are typically found at
data.result.music[], but different operations such as downloads, lyrics, MIDI, Persona, and custom models have their own result structures. durationis the actual duration and may contain decimals; input target duration does not guarantee exact match with final product.- The weight return value
0is a valid value and cannot be hidden due to JavaScript’s falsy judgment. audio_urldoes not guarantee the use of.mp3suffix, please play or download using the actual URL returned by the interface.status="unknown"Keep the task ID and allow manual refreshing while not automatically creating new tasks.
AbortController can stop browser requests and polling, but it does not cancel the server-side task. There is currently no endpoint for canceling a submitted Suno task.