生成音乐
curl --request POST \
--url https://api.maxapi.ai/suno/v1/v3.0/music \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"custom_mode": true,
"input": {
"prompt": "[Verse]\nTesla riding\nBatteries flying\nElon Musk\nHe's got the future on his mind\nSolar panels shining\nRockets reaching for the skies\nInnovation's flowing\nHe's the tech wizard of our times\n\n[Verse]\nNeuralink connecting minds\nAI running wild\nMars colonization\nHe's making it his style\nFrom PayPal he came and shook the world with his touch\nElon Musk\nThe eccentric genius\nHe's too much\n\n[Chorus]\nElon Musk\nHe's the man with electric dreams\nChanging the world with his technology schemes\nFrom PayPal to SpaceX\nHe's a force to be seen\nElectric cars and rockets\nHe's living the dream",
"title": "Electric Dreams",
"tags": "epic reggae",
"continue_at": 0,
"continue_clip_id": ""
}
}
EOFimport requests
url = "https://api.maxapi.ai/suno/v1/v3.0/music"
payload = {
"custom_mode": True,
"input": {
"prompt": "[Verse]
Tesla riding
Batteries flying
Elon Musk
He's got the future on his mind
Solar panels shining
Rockets reaching for the skies
Innovation's flowing
He's the tech wizard of our times
[Verse]
Neuralink connecting minds
AI running wild
Mars colonization
He's making it his style
From PayPal he came and shook the world with his touch
Elon Musk
The eccentric genius
He's too much
[Chorus]
Elon Musk
He's the man with electric dreams
Changing the world with his technology schemes
From PayPal to SpaceX
He's a force to be seen
Electric cars and rockets
He's living the dream",
"title": "Electric Dreams",
"tags": "epic reggae",
"continue_at": 0,
"continue_clip_id": ""
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
custom_mode: true,
input: {
prompt: '[Verse]\nTesla riding\nBatteries flying\nElon Musk\nHe\'s got the future on his mind\nSolar panels shining\nRockets reaching for the skies\nInnovation\'s flowing\nHe\'s the tech wizard of our times\n\n[Verse]\nNeuralink connecting minds\nAI running wild\nMars colonization\nHe\'s making it his style\nFrom PayPal he came and shook the world with his touch\nElon Musk\nThe eccentric genius\nHe\'s too much\n\n[Chorus]\nElon Musk\nHe\'s the man with electric dreams\nChanging the world with his technology schemes\nFrom PayPal to SpaceX\nHe\'s a force to be seen\nElectric cars and rockets\nHe\'s living the dream',
title: 'Electric Dreams',
tags: 'epic reggae',
continue_at: 0,
continue_clip_id: ''
}
})
};
fetch('https://api.maxapi.ai/suno/v1/v3.0/music', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.maxapi.ai/suno/v1/v3.0/music"
payload := strings.NewReader("{\n \"custom_mode\": true,\n \"input\": {\n \"prompt\": \"[Verse]\\nTesla riding\\nBatteries flying\\nElon Musk\\nHe's got the future on his mind\\nSolar panels shining\\nRockets reaching for the skies\\nInnovation's flowing\\nHe's the tech wizard of our times\\n\\n[Verse]\\nNeuralink connecting minds\\nAI running wild\\nMars colonization\\nHe's making it his style\\nFrom PayPal he came and shook the world with his touch\\nElon Musk\\nThe eccentric genius\\nHe's too much\\n\\n[Chorus]\\nElon Musk\\nHe's the man with electric dreams\\nChanging the world with his technology schemes\\nFrom PayPal to SpaceX\\nHe's a force to be seen\\nElectric cars and rockets\\nHe's living the dream\",\n \"title\": \"Electric Dreams\",\n \"tags\": \"epic reggae\",\n \"continue_at\": 0,\n \"continue_clip_id\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.maxapi.ai/suno/v1/v3.0/music")
.header("Content-Type", "application/json")
.body("{\n \"custom_mode\": true,\n \"input\": {\n \"prompt\": \"[Verse]\\nTesla riding\\nBatteries flying\\nElon Musk\\nHe's got the future on his mind\\nSolar panels shining\\nRockets reaching for the skies\\nInnovation's flowing\\nHe's the tech wizard of our times\\n\\n[Verse]\\nNeuralink connecting minds\\nAI running wild\\nMars colonization\\nHe's making it his style\\nFrom PayPal he came and shook the world with his touch\\nElon Musk\\nThe eccentric genius\\nHe's too much\\n\\n[Chorus]\\nElon Musk\\nHe's the man with electric dreams\\nChanging the world with his technology schemes\\nFrom PayPal to SpaceX\\nHe's a force to be seen\\nElectric cars and rockets\\nHe's living the dream\",\n \"title\": \"Electric Dreams\",\n \"tags\": \"epic reggae\",\n \"continue_at\": 0,\n \"continue_clip_id\": \"\"\n }\n}")
.asString();{
"code": 200,
"data": {
"task_id": "56ea8da3-8507-4118-9f1e-111111111111"
},
"message": "success"
}POST
https://api.maxapi.ai
/
suno
/
v1
/
v3.0
/
music
生成音乐
curl --request POST \
--url https://api.maxapi.ai/suno/v1/v3.0/music \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"custom_mode": true,
"input": {
"prompt": "[Verse]\nTesla riding\nBatteries flying\nElon Musk\nHe's got the future on his mind\nSolar panels shining\nRockets reaching for the skies\nInnovation's flowing\nHe's the tech wizard of our times\n\n[Verse]\nNeuralink connecting minds\nAI running wild\nMars colonization\nHe's making it his style\nFrom PayPal he came and shook the world with his touch\nElon Musk\nThe eccentric genius\nHe's too much\n\n[Chorus]\nElon Musk\nHe's the man with electric dreams\nChanging the world with his technology schemes\nFrom PayPal to SpaceX\nHe's a force to be seen\nElectric cars and rockets\nHe's living the dream",
"title": "Electric Dreams",
"tags": "epic reggae",
"continue_at": 0,
"continue_clip_id": ""
}
}
EOFimport requests
url = "https://api.maxapi.ai/suno/v1/v3.0/music"
payload = {
"custom_mode": True,
"input": {
"prompt": "[Verse]
Tesla riding
Batteries flying
Elon Musk
He's got the future on his mind
Solar panels shining
Rockets reaching for the skies
Innovation's flowing
He's the tech wizard of our times
[Verse]
Neuralink connecting minds
AI running wild
Mars colonization
He's making it his style
From PayPal he came and shook the world with his touch
Elon Musk
The eccentric genius
He's too much
[Chorus]
Elon Musk
He's the man with electric dreams
Changing the world with his technology schemes
From PayPal to SpaceX
He's a force to be seen
Electric cars and rockets
He's living the dream",
"title": "Electric Dreams",
"tags": "epic reggae",
"continue_at": 0,
"continue_clip_id": ""
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
custom_mode: true,
input: {
prompt: '[Verse]\nTesla riding\nBatteries flying\nElon Musk\nHe\'s got the future on his mind\nSolar panels shining\nRockets reaching for the skies\nInnovation\'s flowing\nHe\'s the tech wizard of our times\n\n[Verse]\nNeuralink connecting minds\nAI running wild\nMars colonization\nHe\'s making it his style\nFrom PayPal he came and shook the world with his touch\nElon Musk\nThe eccentric genius\nHe\'s too much\n\n[Chorus]\nElon Musk\nHe\'s the man with electric dreams\nChanging the world with his technology schemes\nFrom PayPal to SpaceX\nHe\'s a force to be seen\nElectric cars and rockets\nHe\'s living the dream',
title: 'Electric Dreams',
tags: 'epic reggae',
continue_at: 0,
continue_clip_id: ''
}
})
};
fetch('https://api.maxapi.ai/suno/v1/v3.0/music', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.maxapi.ai/suno/v1/v3.0/music"
payload := strings.NewReader("{\n \"custom_mode\": true,\n \"input\": {\n \"prompt\": \"[Verse]\\nTesla riding\\nBatteries flying\\nElon Musk\\nHe's got the future on his mind\\nSolar panels shining\\nRockets reaching for the skies\\nInnovation's flowing\\nHe's the tech wizard of our times\\n\\n[Verse]\\nNeuralink connecting minds\\nAI running wild\\nMars colonization\\nHe's making it his style\\nFrom PayPal he came and shook the world with his touch\\nElon Musk\\nThe eccentric genius\\nHe's too much\\n\\n[Chorus]\\nElon Musk\\nHe's the man with electric dreams\\nChanging the world with his technology schemes\\nFrom PayPal to SpaceX\\nHe's a force to be seen\\nElectric cars and rockets\\nHe's living the dream\",\n \"title\": \"Electric Dreams\",\n \"tags\": \"epic reggae\",\n \"continue_at\": 0,\n \"continue_clip_id\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.maxapi.ai/suno/v1/v3.0/music")
.header("Content-Type", "application/json")
.body("{\n \"custom_mode\": true,\n \"input\": {\n \"prompt\": \"[Verse]\\nTesla riding\\nBatteries flying\\nElon Musk\\nHe's got the future on his mind\\nSolar panels shining\\nRockets reaching for the skies\\nInnovation's flowing\\nHe's the tech wizard of our times\\n\\n[Verse]\\nNeuralink connecting minds\\nAI running wild\\nMars colonization\\nHe's making it his style\\nFrom PayPal he came and shook the world with his touch\\nElon Musk\\nThe eccentric genius\\nHe's too much\\n\\n[Chorus]\\nElon Musk\\nHe's the man with electric dreams\\nChanging the world with his technology schemes\\nFrom PayPal to SpaceX\\nHe's a force to be seen\\nElectric cars and rockets\\nHe's living the dream\",\n \"title\": \"Electric Dreams\",\n \"tags\": \"epic reggae\",\n \"continue_at\": 0,\n \"continue_clip_id\": \"\"\n }\n}")
.asString();{
"code": 200,
"data": {
"task_id": "56ea8da3-8507-4118-9f1e-111111111111"
},
"message": "success"
}请求体
application/json