Task: Generate Song
Short description: Submit a song generation task to the Suno music creation API.
Overview
- Method:
POST - Path:
/suno/submit/music - Content-Type:
application/json
Authentication
- Header:
Authorization: Bearer <token>
Request Example
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| prompt | string | No | Lyrics content, used only in custom and continuation modes. Empty string generates pure music |
| mv | string | Yes | Model version, supports chirp-v3-0, chirp-v3-5, chirp-v4, chirp-auk, chirp-crow |
| title | string | No | Song title, used in custom and continuation modes |
| tags | string | No | Style tags, used in custom and continuation modes |
| make_instrumental | boolean | No | Whether to generate instrumental-only audio, used in inspiration mode |
| task_id | string | No | Previous task ID to continue the same task |
| continue_at | number | No | Continuation duration in seconds, used in continuation mode |
| continue_clip_id | string | No | Continuation song ID, used in continuation mode |
| gpt_description_prompt | string | No | Song prompt, used in inspiration mode |
| notify_hook | string | No | Callback URL |
Three creation modes: inspiration mode, custom mode, continuation mode.
curl Example
bash
curl -X POST "https://api.gpt.ge/suno/submit/music" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxx" \
-d '{
"gpt_description_prompt": "A bright female vocal Chinese song with a memorable weekend theme",
"mv": "chirp-v3-0"
}'JavaScript (fetch) Example
javascript
fetch('https://api.gpt.ge/suno/submit/music', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer sk-xxxx'
},
body: JSON.stringify({
gpt_description_prompt: 'A bright female vocal Chinese song with a memorable weekend theme',
mv: 'chirp-v3-0'
})
}).then(r => r.json()).then(console.log);Python (requests) Example
python
import requests
response = requests.post(
'https://api.gpt.ge/suno/submit/music',
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer sk-xxxx'
},
json={
'gpt_description_prompt': 'A bright female vocal Chinese song with a memorable weekend theme',
'mv': 'chirp-v3-0'
}
)
print(response.json())Response Example (200)
json
{
"code": "success",
"message": "",
"data": "2a145658-3342-4228-b779-b8323a2b77df"
}Note:
- Inspiration mode only requires
gpt_description_prompt,mv, and optionalmake_instrumental.- Custom mode requires
prompt,title,tags, andmv.- Continuation mode also requires
task_id,continue_at, andcontinue_clip_idon top of custom mode.