Task: Generate Lyrics
Short description: Use the Suno lyrics generation API to create new lyrics content.
Overview
- Method:
POST - Path:
/suno/submit/lyrics - Content-Type:
application/json
Authentication
- Header:
Authorization: Bearer <token>
Request Example
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | Lyrics prompt used to guide the model |
| notify_hook | string | No | Callback URL for task completion notifications |
curl Example
bash
curl -X POST "https://api.gpt.ge/suno/submit/lyrics" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxx" \
-d '{
"prompt": "A bright female vocal Chinese song with a memorable weekend theme",
"notify_hook": "https://example.com/callback"
}'JavaScript (fetch) Example
javascript
fetch('https://api.gpt.ge/suno/submit/lyrics', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer sk-xxxx'
},
body: JSON.stringify({
prompt: 'A bright female vocal Chinese song with a memorable weekend theme',
notify_hook: 'https://example.com/callback'
})
}).then(r => r.json()).then(console.log);Python (requests) Example
python
import requests
response = requests.post(
'https://api.gpt.ge/suno/submit/lyrics',
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer sk-xxxx'
},
json={
'prompt': 'A bright female vocal Chinese song with a memorable weekend theme',
'notify_hook': 'https://example.com/callback'
}
)
print(response.json())Response Example (200)
json
{
"code": "success",
"message": "",
"data": "2a145658-3342-4228-b779-b8323a2b77df"
}Note: This endpoint only requires the
promptparameter to start lyrics generation.notify_hookis optional.