Skip to main content

Suno PiAPI Music Generator

Generate original music compositions using Suno PiAPI with flexible generation modes. Choose between simple music generation with AI-created lyrics or custom mode with detailed control over all aspects.

API Endpoint

POST /api/features

Parameters

ParameterTypeRequiredDescription
typestringYesMust be "MUSIC_GENERATOR"
modelstringYesMust be "suno-piapi"
conversationIdstringNoConversation ID for context
promptObjectobjectYesSuno PiAPI-specific parameters

Prompt Object Parameters

ParameterTypeRequiredDescription
task_typestringYes"generate_music" or "generate_music_custom"
gpt_description_promptstringConditionalRequired for "generate_music" mode
promptstringNoCustom lyrics for the song
make_instrumentalbooleanNoWhether to create instrumental version
titlestringNoSong title
tagsstringNoGenre tags, comma-separated
negative_tagsstringNoTags to avoid, comma-separated

Generation Modes

Simple Mode (generate_music)

  • AI automatically creates both music and lyrics
  • Only requires a description prompt
  • Best for quick music generation

Custom Mode (generate_music_custom)

  • Full control over lyrics, title, and tags
  • More detailed customization options
  • Better for specific creative requirements

Interactive API Testing

API Playground

https://api.1min.ai/api/features

Generated cURL Command:

curl -X POST "https://api.1min.ai/api/features" \
-H "API-KEY: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"type": "MUSIC_GENERATOR",
"model": "suno-piapi",
"conversationId": "MUSIC_GENERATOR",
"promptObject": {
"task_type": "generate_music",
"gpt_description_prompt": "upbeat pop song about summer adventures",
"prompt": "",
"make_instrumental": false,
"title": "",
"tags": "pop, upbeat, summer",
"negative_tags": "sad, slow"
}
}'

Response Format

Successful requests return:

{}

Key Features

Dual Generation Modes

  • Simple Mode: Quick generation with AI-created lyrics based on description
  • Custom Mode: Full creative control with custom lyrics and detailed settings

Style Control

  • Genre Tags: Specify desired musical styles and genres
  • Negative Tags: Avoid unwanted styles or elements
  • Instrumental Option: Create vocal or instrumental versions

Content Customization

  • Custom Lyrics: Provide your own song lyrics
  • Title Influence: Song title affects the overall theme and style
  • Mood Control: Description prompt influences the emotional tone

Best Practices

  1. Clear Descriptions: Use specific and detailed descriptions for better results
  2. Tag Strategy: Combine positive and negative tags for precise style control
  3. Mode Selection: Use simple mode for quick generation, custom mode for detailed control
  4. Lyric Structure: For custom lyrics, use proper verse/chorus structure

Example Requests

Simple Pop Song

{
"type": "MUSIC_GENERATOR",
"model": "suno-piapi",
"promptObject": {
"task_type": "generate_music",
"gpt_description_prompt": "energetic pop song about friendship and good times with catchy chorus",
"tags": "pop, energetic, friendship",
"negative_tags": "sad, slow",
"make_instrumental": false
}
}

Custom Rock Ballad

{
"type": "MUSIC_GENERATOR",
"model": "suno-piapi",
"promptObject": {
"task_type": "generate_music_custom",
"prompt": "[Verse 1]\nStanding on the edge of time\nWondering if you'll still be mine\nMemories fade but love remains\nThrough the joy and through the pain\n\n[Chorus]\nWe'll find our way back home\nNo matter how far we roam\nTogether we are strong\nThis is where we belong",
"title": "Way Back Home",
"tags": "rock, ballad, emotional",
"negative_tags": "fast, electronic",
"make_instrumental": false
}
}

Instrumental Jazz

{
"type": "MUSIC_GENERATOR",
"model": "suno-piapi",
"promptObject": {
"task_type": "generate_music",
"gpt_description_prompt": "smooth jazz instrumental with piano and saxophone",
"tags": "jazz, smooth, instrumental, piano, saxophone",
"negative_tags": "vocals, rock, electronic",
"make_instrumental": true
}
}

Task Type Details

generate_music

  • Purpose: Quick and easy music generation
  • Required: gpt_description_prompt
  • AI Creates: Lyrics, melody, arrangement
  • Best For: Initial ideas, quick prototypes, simple requests

generate_music_custom

  • Purpose: Detailed creative control
  • Optional: All parameters can be customized
  • User Controls: Lyrics, structure, style details
  • Best For: Specific creative visions, professional projects