Suno Music Generation
curl --request POST \
--url https://octopusx.ai/suno/submit/{action} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": "<string>",
"prompt": "<string>",
"tags": "<string>",
"title": "<string>",
"mv": "<string>",
"continue_clip_id": "<string>"
}
'import requests
url = "https://octopusx.ai/suno/submit/{action}"
payload = {
"action": "<string>",
"prompt": "<string>",
"tags": "<string>",
"title": "<string>",
"mv": "<string>",
"continue_clip_id": "<string>"
}
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({
action: '<string>',
prompt: '<string>',
tags: '<string>',
title: '<string>',
mv: '<string>',
continue_clip_id: '<string>'
})
};
fetch('https://octopusx.ai/suno/submit/{action}', 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://octopusx.ai/suno/submit/{action}",
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([
'action' => '<string>',
'prompt' => '<string>',
'tags' => '<string>',
'title' => '<string>',
'mv' => '<string>',
'continue_clip_id' => '<string>'
]),
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://octopusx.ai/suno/submit/{action}"
payload := strings.NewReader("{\n \"action\": \"<string>\",\n \"prompt\": \"<string>\",\n \"tags\": \"<string>\",\n \"title\": \"<string>\",\n \"mv\": \"<string>\",\n \"continue_clip_id\": \"<string>\"\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://octopusx.ai/suno/submit/{action}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"action\": \"<string>\",\n \"prompt\": \"<string>\",\n \"tags\": \"<string>\",\n \"title\": \"<string>\",\n \"mv\": \"<string>\",\n \"continue_clip_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://octopusx.ai/suno/submit/{action}")
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 \"action\": \"<string>\",\n \"prompt\": \"<string>\",\n \"tags\": \"<string>\",\n \"title\": \"<string>\",\n \"mv\": \"<string>\",\n \"continue_clip_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": "success",
"message": "",
"data": "task-suno-abc123"
}
{
"code": "success",
"message": "",
"data": {
"task_id": "task-suno-abc123",
"status": "SUCCESS",
"progress": "100%",
"result_url": "https://.../audio/abc123.mp3"
}
}
{
"code": "task_not_exist",
"message": "task_not_exist",
"data": null
}
Suno Music Generation
Use the /suno/* routes to submit asynchronous music tasks, and query lyrics or audio generation results.
POST
https://octopusx.ai
/
suno
/
submit
/
{action}
Suno Music Generation
curl --request POST \
--url https://octopusx.ai/suno/submit/{action} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": "<string>",
"prompt": "<string>",
"tags": "<string>",
"title": "<string>",
"mv": "<string>",
"continue_clip_id": "<string>"
}
'import requests
url = "https://octopusx.ai/suno/submit/{action}"
payload = {
"action": "<string>",
"prompt": "<string>",
"tags": "<string>",
"title": "<string>",
"mv": "<string>",
"continue_clip_id": "<string>"
}
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({
action: '<string>',
prompt: '<string>',
tags: '<string>',
title: '<string>',
mv: '<string>',
continue_clip_id: '<string>'
})
};
fetch('https://octopusx.ai/suno/submit/{action}', 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://octopusx.ai/suno/submit/{action}",
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([
'action' => '<string>',
'prompt' => '<string>',
'tags' => '<string>',
'title' => '<string>',
'mv' => '<string>',
'continue_clip_id' => '<string>'
]),
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://octopusx.ai/suno/submit/{action}"
payload := strings.NewReader("{\n \"action\": \"<string>\",\n \"prompt\": \"<string>\",\n \"tags\": \"<string>\",\n \"title\": \"<string>\",\n \"mv\": \"<string>\",\n \"continue_clip_id\": \"<string>\"\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://octopusx.ai/suno/submit/{action}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"action\": \"<string>\",\n \"prompt\": \"<string>\",\n \"tags\": \"<string>\",\n \"title\": \"<string>\",\n \"mv\": \"<string>\",\n \"continue_clip_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://octopusx.ai/suno/submit/{action}")
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 \"action\": \"<string>\",\n \"prompt\": \"<string>\",\n \"tags\": \"<string>\",\n \"title\": \"<string>\",\n \"mv\": \"<string>\",\n \"continue_clip_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": "success",
"message": "",
"data": "task-suno-abc123"
}
{
"code": "success",
"message": "",
"data": {
"task_id": "task-suno-abc123",
"status": "SUCCESS",
"progress": "100%",
"result_url": "https://.../audio/abc123.mp3"
}
}
{
"code": "task_not_exist",
"message": "task_not_exist",
"data": null
}
Suno Music Generation
The Suno routes use a separate asynchronous task protocol; both submission and querying do not go through/v1/audio/*.
- One entry point covers automatic composition, lyric generation, and custom-lyric music generation.
- Asynchronous processing mode; a task ID is returned after submission.
- Supports single-task queries and batch queries.
- Query results are wrapped with
code,message, anddata.
Route List
| Method | Path | Description |
|---|---|---|
POST | /suno/submit/{action} | Submit a music task |
GET | /suno/fetch/{id} | Query a single task |
POST | /suno/fetch | Batch query |
Authentication
Authorization: Bearer YOUR_API_KEY
Path Parameters
The operation type. Common values are
music, lyrics, and custom.Body
In
music mode, this indicates the music description; in custom mode, it is usually the lyrics content directly.Style tags, separated by commas.
Song title.
Model version, such as
chirp-v3-5 or chirp-v4.The clip ID used when continuing an existing music segment.
Request Example
curl -X POST https://octopusx.ai/suno/submit/music \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A catchy pop song about a summer night by the sea",
"tags": "pop, summer, beach",
"title": "Summer Night by the Sea",
"mv": "chirp-v3-5"
}'
Response Example
{
"code": "success",
"message": "",
"data": "task-suno-abc123"
}
{
"code": "success",
"message": "",
"data": {
"task_id": "task-suno-abc123",
"status": "SUCCESS",
"progress": "100%",
"result_url": "https://.../audio/abc123.mp3"
}
}
{
"code": "task_not_exist",
"message": "task_not_exist",
"data": null
}
Use Cases
Automatic Composition
curl -X POST https://octopusx.ai/suno/submit/music \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "An electronic pop track suitable for the opening of a product launch event",
"tags": "electronic, upbeat"
}'
Batch Query
curl -X POST https://octopusx.ai/suno/fetch \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"ids": ["task-suno-abc123", "task-suno-def456"]
}'
Related APIs
⌘I