Suno API
Documentation on our cost-friendly state-of-the-art music generation Model API (ALPHA TEST)
This service allows you access to APIs of endpoints for the most advanced music generation model - suno. Our service and pricing model best fit users who want high throughput scenarios.
Available models:
- chirp-v3-0
- chirp-v3-5
Pricing
The price of generating new songs in chirp-v3-0
is 50% of Suno's Pro Plan
. Details: Suno API pricing
Special Note
This API uses GoAPI Suno Quotas.
Like the suno official product, each generation will produce TWO music clips
Music Generation API
Request Example (custom_mode
is false
)
import requests
import json
url = "https://api.goapi.ai/api/suno/v1/music"
payload = json.dumps({
"custom_mode": False,
"mv": "chirp-v3-5",
"input": {
"gpt_description_prompt": "sunshine", #your simple prompt
"make_instrumental": False
}
})
headers = {
'X-API-Key': 'YOUR_GOAPI_KEY',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Request Example (custom_mode
is true
)
import requests
import json
url = "https://api.goapi.ai/api/suno/v1/music"
payload = json.dumps({
"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, #the second that this clip started from last clip. 0 means start over. Note that only GoAPI developer or above plan can use value not zero
"continue_clip_id": "" #the id of the clip that you need to continue; empty string means brand new clip.
}
})
headers = {
'X-API-Key': 'YOUR_GOAPI_KEY',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response Example
{
"code": 200,
"data": {
"task_id": "56ea8da3-8507-4118-9f1e-111111111111"
},
"message": "success"
}
Generate the full song API
This is an api endpoint that only works for Extended Clips
. The final result will be available in Get Result API
Request Example
import requests
import json
url = "https://api.goapi.ai/api/suno/v1/music/concat"
payload = json.dumps({
"clip_id": "36004000-c4db-47fc-86a2-111111111111"
})
headers = {
'X-API-Key': 'your-goapi-key',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response Example
{
"code": 200,
"data": {
"task_id": "56ea8da3-8507-4118-9f1e-111111111111"
},
"message": "success"
}
Get Music Generation Result API
Request Example
import requests
url = "https://api.goapi.ai/api/suno/v1/music/56ea8da3-8507-4118-9f1e-111111111111"
payload={}
headers = {
'X-API-Key': 'YOUR_GOAPI_KEY',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
Response Example
{
"code": 200,
"data": {
"task_id": "56ea8da3-8507-4118-9f1e-111111111111",
"status": "completed",
"input": "{\"custom_mode\":false,\"gpt_description_prompt\":\"blowing in the wind\",\"make_instrumental\":false,\"prompt\":\"\",\"title\":\"\",\"continue_at\":0,\"continue_clip_id\":\"\",\"mv\":\"chirp-v3-0\",\"tags\":\"\"}",
"clips": {
"e0fe8bba-fac8-460b-bf1c-111111111111": {
"id": "e0fe8bba-fac8-460b-bf1c-111111111111",
"video_url": "https://cdn1.suno.ai/e0fe8bba-fac8-460b-bf1c-111111111111.mp4",
"audio_url": "https://cdn1.suno.ai/e0fe8bba-fac8-460b-bf1c-111111111111.mp3",
"image_url": "https://cdn1.suno.ai/image_e0fe8bba-fac8-460b-bf1c-111111111111.png",
"image_large_url": "https://cdn1.suno.ai/image_large_e0fe8bba-fac8-460b-bf1c-111111111111.png",
"is_video_pending": false,
"major_model_version": "v3",
"model_name": "chirp-v3",
"metadata": {
"tags": "acoustic folk ballad",
"prompt": "[Verse]\nLeaves whisper\nTrees sway\nIn the wind\nWe all play\nQuestions fly\nAnswers hide\nIn this world\nSide by side\n\n[Verse 2]\nBirds soar\nClouds roam\nIn the breeze\nWe find home\nSearching for truth\nIn the sky\nAs the wind carries our sigh\n\n[Chorus]\nBlowin' in the breeze\nWe're like the leaves\nWonderin' where life takes us\nWhere it leads\nWith every gust\nWe let go of what we know\nBlowin' in the breeze\nWe're free to grow",
"gpt_description_prompt": "blowing in the wind",
"audio_prompt_id": "",
"history": null,
"concat_history": null,
"type": "gen",
"duration": 108.8,
"refund_credits": false,
"stream": true,
"error_type": null,
"error_message": null
},
"is_liked": false,
"is_handle_updated": false,
"is_trashed": false,
"reaction": null,
"created_at": "2024-04-18T14:29:31.760Z",
"status": "complete",
"title": "Blowin' in the Breeze",
"play_count": 0,
"upvote_count": 0,
"is_public": false
},
"f66f7a6f-a868-464f-b280-111111111111": {
"id": "f66f7a6f-a868-464f-b280-111111111111",
"video_url": "https://cdn1.suno.ai/f66f7a6f-a868-464f-b280-111111111111.mp4",
"audio_url": "https://cdn1.suno.ai/f66f7a6f-a868-464f-b280-111111111111.mp3",
"image_url": "https://cdn1.suno.ai/image_f66f7a6f-a868-464f-b280-111111111111.png",
"image_large_url": "https://cdn1.suno.ai/image_large_f66f7a6f-a868-464f-b280-111111111111.png",
"is_video_pending": false,
"major_model_version": "v3",
"model_name": "chirp-v3",
"metadata": {
"tags": "acoustic folk ballad",
"prompt": "[Verse]\nLeaves whisper\nTrees sway\nIn the wind\nWe all play\nQuestions fly\nAnswers hide\nIn this world\nSide by side\n\n[Verse 2]\nBirds soar\nClouds roam\nIn the breeze\nWe find home\nSearching for truth\nIn the sky\nAs the wind carries our sigh\n\n[Chorus]\nBlowin' in the breeze\nWe're like the leaves\nWonderin' where life takes us\nWhere it leads\nWith every gust\nWe let go of what we know\nBlowin' in the breeze\nWe're free to grow",
"gpt_description_prompt": "blowing in the wind",
"audio_prompt_id": "",
"history": null,
"concat_history": null,
"type": "gen",
"duration": 103.2,
"refund_credits": false,
"stream": true,
"error_type": null,
"error_message": null
},
"is_liked": false,
"is_handle_updated": false,
"is_trashed": false,
"reaction": null,
"created_at": "2024-04-18T14:29:31.761Z",
"status": "complete",
"title": "Blowin' in the Breeze",
"play_count": 0,
"upvote_count": 0,
"is_public": false
}
}
},
"message": "success"
}
Lyrics Synthesis API
Request Example
import requests
import json
url = "https://api.goapi.ai/api/suno/v1/lyrics"
payload = json.dumps({
"prompt": "elon musk in the house"
})
headers = {
'X-API-Key': 'YOUR_GOAPI_KEY',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response Example
{
"code": 200,
"data": {
"task_id": "56ea8da3-8507-4118-9f1e-111111111111"
},
"message": "success"
}
Get Lyrics Synthesis Result API
Request Example
import requests
url = "https://api.goapi.ai/api/suno/v1/lyrics/56ea8da3-8507-4118-9f1e-111111111111"
payload={}
headers = {
'X-API-Key': 'YOUR_GOAPI_KEY',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
Response Example
{
"code": 200,
"data": {
"task_id": "0af7cdc7-5d21-4361-bd05-111111111111",
"input": "{\"prompt\":\"elon musk in the house\"}",
"status": "completed",
"title": "Electric Dreams",
"text": "[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"
},
"message": "success"
}
Upload Audio API
Request Example
import requests
import json
url = "https://api.midjourneyapi.xyz/api/suno/v1/upload_audio"
payload = json.dumps({
"audio_url": "https://samplelib.com/lib/preview/mp3/sample-9s.mp3"
})
headers = {
'X-API-Key': 'YOUR_GOAPI_KEY',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response Example
{
"code": 200,
"data": {
"task_id": "02c74819-5f3e-4834-9435-xxxxxxxxxx"
},
"message": "success"
}
Get Audio Upload Result API
Request Example
import requests
url = "https://api.goapi.ai/api/suno/v1/upload_audio/56ea8da3-8507-4118-9f1e-111111111111"
payload={}
headers = {
'X-API-Key': 'YOUR_GOAPI_KEY',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
Response Example
{
"code": 200,
"data": {
"task_id": "963bd646-5f09-444e-940c-11111111",
"input": "{\"audio_url\":\"https://samplelib.com/lib/preview/mp3/sample-9s.mp3\"}",
"status": "completed",
"title": "sample-9s",
"clip_id": "713fceeb-8431-4448-bc3a-11111111",
"image_url": "https://cdn2.suno.ai/image_713fceeb-8431-4448-bc3a-11111111.jpeg",
"duration": 9.61299319727891,
"metadata": {
"created_at": "2024-07-23T09:42:13.243926693Z",
"started_at": "2024-07-23T09:42:13.316668777Z",
"ended_at": "2024-07-23T09:42:34.895099456Z",
"quota_frozen": 1,
"quota_usage": 1
}
},
"message": "success"
}