Suno V6 공통 규칙 및 작업 조회
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 공통 규칙 및 작업 조회
Suno V6 버전 선택, 커스텀 모델, 비동기 작업 수명 주기, 소스 트랙 참조 및 결과 구조
GET
/
v1
/
music
/
tasks
/
{task_id}
Suno V6 공통 규칙 및 작업 조회
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 생성, 편집 및 도구 API는 비동기 작업을 사용합니다. 작업 제출 후
task_id를 받고 이 페이지의 API로 결과를 조회합니다.인증
string
필수
Bearer Token 인증:
Authorization: Bearer <YOUR_API_KEY>.V6 버전 및 모델 선택
공개 모델은 다음 버전을 지원합니다.v6v6-wildv6-mini
version 또는 모델 생성 작업이 반환한 custom_model_id 중 하나가 필요합니다. 버전을 지원하는 편집 작업은 version 생략 시 v6를 사용합니다. 공개 version과 custom_model_id는 함께 보낼 수 없습니다.
custom: true는 커스텀 가사 모드를, custom_model_id는 학습된 커스텀 모델을 선택합니다. 둘은 다른 개념이며 커스텀 가사 모드가 자동으로 커스텀 모델 요금으로 바뀌지는 않습니다.V6 공통 생성 옵션
다음 필드는 개별 엔드포인트에 명시된 경우에만 보내세요.| 필드 | 설명 |
|---|---|
variety | 스타일 변화: off / normal / high / extra / max |
max_mode | Max 모드, 기본값 false. 지원되는 경우 일반 가격의 2배로 과금 |
audio_format | mp3 / m4a / wav |
duration / duration_s | 목표 생성 길이, 10~360초 정수. 지정된 생성 작업에서만 지원 |
max_mode: false를 보내지 마세요. variety와 Max 모드는 독립적이므로 variety: "max"를 선택해도 Max 과금이 활성화되지 않습니다.
텍스트 및 가중치 제한
| 내용 | 필드 | 제한 |
|---|---|---|
| 영감 설명 | prompt(기본 생성) / gpt_description(작업 엔드포인트) | 최대 3,000자 |
| 가사 | prompt(커스텀 모드) | 최대 5,000자 |
| 스타일 | style(기본 생성) / tags(작업 엔드포인트) | 최대 1,000자 |
| 제목 | title | 최대 80자 |
| 가중치 | style_weight / weirdness / audio_weight | 0~1, 숫자 0도 유효 |
weirdness를 사용하고 weirdness_constraint는 호환 별칭입니다. 기본 생성은 계속 weirdness_constraint를 사용합니다. 텍스트 길이는 Unicode 문자 수로 계산합니다.
참조 소스 트랙
기존 작품 기반 작업:task_id: 출력 오디오 트랙의 API Mart 작업 ID.audio_index: 소스 작업 조회 응답의data.result.music[]내 원래 위치입니다. 1부터 시작하며 기본값은1입니다.
새 요청은
task_id + audio_index로 소스 트랙을 참조하며 audio_id, music_id, audio_url로 대체할 수 없습니다. 소스 작업을 찾지 못하거나 인덱스가 범위를 벗어나면 400이 반환됩니다.제출 응답
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01M24YMN4EV04M84R5QYM77R1E"
}
]
}
data[0].task_id에서 작업 ID를 읽습니다. submitted는 작업이 접수되었다는 뜻일 뿐 최종 오디오나 다른 결과물이 이미 있다는 의미는 아닙니다.
작업 조회
GET /v1/music/tasks/{task_id}
?language=zh를 붙이면 지원되는 실패 메시지 번역을 받을 수 있습니다. 이 파라미터는 곡이나 가사의 언어를 바꾸지 않습니다.
string
필수
제출 API가 반환한 작업 ID.
data.status가 completed 또는 failed가 될 때까지 5~10초마다 조회하는 것을 권장합니다. 페이지를 새로고침한 뒤에도 같은 작업 ID를 사용할 수 있습니다. 네트워크 시간 초과 때문에 유료 POST 요청을 자동 재전송하지 마세요.
조회 응답
integer
응답 상태 코드.
object
작업 정보.
표시 속성
표시 속성
string
플랫폼 작업 ID.
string
pending / processing / completed / failed / unknown.number
작업 진행률, 보통 0~100. 완료 여부는
status로 판단하세요.number
생성 시간, Unix 초.
number
예상 처리 시간(초). 참고값이며 카운트다운을 보장하지 않습니다.
number
금액(USD).
number
작업이 사용한 포인트 값입니다. API 반환값을 그대로 표시하세요.
object
완료 후 결과이며 구조는 작업마다 다릅니다.
object
실패 메시지. 일반 필드는
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": ""
}
}
}
결과 처리
- 음악 관련 결과는 보통
data.result.music[]에 있지만 다운로드, 가사, MIDI, Persona, 커스텀 모델 등은 각기 다른 결과 구조를 사용합니다. duration은 실제 길이이며 소수일 수 있습니다. 입력한 목표 길이와 최종 결과가 정확히 일치한다고 보장되지 않습니다.- 가중치 반환값
0은 유효합니다. JavaScript의 falsy 판정 때문에 숨기지 마세요. audio_url이.mp3로 끝난다고 보장되지 않습니다. API가 반환한 실제 URL로 재생하거나 다운로드하세요.status="unknown"이면 작업 ID를 유지하고 수동 새로고침을 허용하되 새 작업을 자동 생성하지 마세요.
AbortController는 브라우저 요청과 폴링을 중단할 수 있지만 서버 작업은 취소하지 않습니다. 현재 제출된 Suno 작업을 취소하는 API는 없습니다.