curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "generate-music",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A calm and relaxing piano track with soft melodies",
"style": "Classical",
"title": "Peaceful Piano Meditation",
"custom_mode": true,
"instrumental": true,
"mv": "V5_5",
"negative_tags": "Heavy Metal, Upbeat Drums",
"style_weight": 0.65
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2025-11-12T10:30:00"
}
}Suno AI
Generate Music
AI-powered music generation with customizable styles and vocals
POST
/
api
/
generate
/
submit
curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "generate-music",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A calm and relaxing piano track with soft melodies",
"style": "Classical",
"title": "Peaceful Piano Meditation",
"custom_mode": true,
"instrumental": true,
"mv": "V5_5",
"negative_tags": "Heavy Metal, Upbeat Drums",
"style_weight": 0.65
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2025-11-12T10:30:00"
}
}- After submission, a
task_idwill be returned. If you provided acallback_url, when the task status becomesfinishedorfailed, a POST request will be sent to thecallback_url. - Regardless of whether
callback_urlis provided, you can retrieve the response result through the unified Query Music Detail endpoint.
Usage Guide
- This endpoint creates music based on your text prompt
- Multiple variations will be generated for each request
- You can control detail level with custom mode and instrumental settings
Parameter Details
-
In Custom Mode (
custom_mode: true):-
If
instrumental: true:styleandtitleare required -
If
instrumental: false:style,prompt, andtitleare required -
Character limits vary by model:
-
V4:
prompt3000 characters,style200 characters -
V4_5 & V4_5PLUS:
prompt5000 characters,style1000 characters -
V4_5ALL:
prompt5000 characters,style1000 characters -
V5:
prompt5000 characters,style1000 characters -
V5_5:
prompt5000 characters,style1000 characters
-
V4:
-
If
-
In Non-custom Mode (
custom_mode: false):-
promptlength limit: 3000 characters - Other parameters should be left empty
-
Developer Notes
- Recommendation for new users: Start with
custom_mode: falsefor simpler usage
Optional parameters
-
vocal_gender(string): Vocal gender preference. Usemfor male,ffor female. Note: This parameter is only effective whencustom_modeistrue. Based on practice, this parameter can only increase the probability but cannot guarantee adherence to male/female voice instructions. -
style_weight(number): Strength of adherence to style. Range 0-1, up to 2 decimals. Example:0.65. -
weirdness_constraint(number): Controls creative deviation. Range 0-1, up to 2 decimals. Example:0.65. -
audio_weight(number): Balance weight for audio features. Range 0-1, up to 2 decimals. Example:0.65. -
persona_id(string): Persona ID to apply to the generated music. Use this to apply a specific persona style to your music generation. Only available when Custom Mode is enabled. How to generate persona_id, visit generate-persona. -
persona_model(string):style_personaorvoice_persona. Requirespersona_idand V5/V5_5. -
duration(integer): Custom length from 10–360 seconds. Only supported whencustom_mode: trueandmv: V5_5.
Authorizations
All API endpoints require Bearer Token authentication
Get your API Key:
Visit the API Key Management Page to get your API Key
Add it to the request header:
Authorization: Bearer PoYo_API_KEY
Body
application/json
API model identifier.
Must be generate-music for this endpoint.
Available options:
generate-music Example:
"generate-music"
Input parameters for music generation
Show child attributes
Show child attributes
Webhook callback URL for result notifications
Example:
"https://your-domain.com/callback"
