Skip to main content
POST
/
api
/
v1
/
style
/
generate
Boost Music Style
curl --request POST \
  --url https://api.sunoapi.org/api/v1/style/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "content": "Pop, Mysterious"
}
'
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "5c79****be8e",
    "param": "{\"content\":\"Pop, Mysterious\"}",
    "result": "Mysterious pop with dark synths, haunting melodies, and ethereal vocals creating an enigmatic atmosphere",
    "creditsConsumed": 1,
    "creditsRemaining": 99,
    "successFlag": "1",
    "errorCode": null,
    "errorMessage": null,
    "createTime": "2025-01-01 00:00:00"
  }
}
Generate enhanced music style descriptions for better AI music generation results. This endpoint takes your basic style input and expands it into detailed, AI-optimized descriptions that produce more accurate and creative musical outputs.

Style Enhancement Process

Transform simple style descriptions into detailed, AI-friendly prompts:

Input Examples

  • Basic: “Pop, Mysterious”
  • Basic: “Jazz, Upbeat”
  • Basic: “Rock, Emotional”

Enhanced Output

The API expands these into rich descriptions like:
  • “Mysterious pop with dark synths, haunting melodies, and ethereal vocals creating an enigmatic atmosphere”
  • “Upbeat jazz with swing rhythms, brass sections, and improvisational solos in a lively club setting”
  • “Emotional rock ballad with powerful guitar riffs, soaring vocals, and dynamic drums building to anthemic choruses”

Why Use Style Boosting

Improved Generation Quality

  • More Precise: Detailed descriptions guide AI to create exactly what you envision
  • Better Instruments: Specific instrument mentions lead to more authentic sounds
  • Consistent Results: Detailed prompts produce more predictable outputs

Creative Inspiration

  • Discover Elements: Learn about musical components you might not have considered
  • Genre Expansion: Understand how different styles can be combined effectively
  • Professional Terminology: Get industry-standard descriptions for your ideas

Integration Workflow

Step 1: Boost Your Style

const styleResponse = await fetch('/api/v1/style/generate', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    content: 'Pop, Mysterious'
  })
});

const boostedStyle = styleResponse.data.result;

Step 2: Use Enhanced Style in Generation

const musicResponse = await fetch('/api/v1/generate', {
  method: 'POST',
  body: JSON.stringify({
    style: boostedStyle, // Use the enhanced description
    prompt: 'A song about midnight adventures',
    customMode: true,
    // ... other parameters
  })
});

Response Data

Success Indicators

  • Success Flag: “1” indicates successful enhancement
  • Result: The enhanced style description ready for music generation
  • Credits: Shows consumption and remaining balance

Error Handling

  • Error Code: Numeric identifier for any issues
  • Error Message: Descriptive text explaining problems
  • Success Flag: “2” indicates failed enhancement

Best Practices

Input Guidelines

  • Be Specific: Include genre, mood, and key characteristics
  • Use Keywords: Mention instruments, tempo, or energy level
  • Keep Concise: Short, clear descriptions work best

Effective Combinations

  • Genre + Mood: “Jazz, Melancholic”
  • Style + Energy: “Folk, Energetic”
  • Instrument + Feeling: “Piano, Romantic”

Multiple Elements

  • “Electronic, Dark, Atmospheric”
  • “Country, Uplifting, Guitar-driven”
  • “Classical, Dramatic, Orchestral”

Usage Scenarios

Content Creators

  • Video Soundtracks: Get precise descriptions for matching visual content
  • Podcast Intros: Create specific mood descriptions for opening themes
  • Gaming Audio: Develop atmospheric descriptions for game soundscapes

Musicians and Producers

  • Demo Development: Enhance rough style ideas into production-ready concepts
  • Collaboration: Share detailed style descriptions with team members
  • Creative Exploration: Discover new ways to describe and develop musical ideas

App Developers

  • Music Generation: Integrate style boosting into user-facing music creation tools
  • Preset Systems: Create libraries of enhanced style descriptions
  • User Experience: Help users articulate their musical vision more effectively
Boost your musical creativity by transforming simple style ideas into detailed, professional descriptions that unlock the full potential of AI music generation!

Authorizations

Authorization
string
header
required

🔑 API Authentication

All endpoints require authentication using Bearer Token.

Get API Key

  1. Visit the API Key Management Page to obtain your API Key

Usage

Add to request headers:

Authorization: Bearer YOUR_API_KEY

⚠️ Note:

  • Keep your API Key secure and do not share it with others
  • If you suspect your API Key has been compromised, reset it immediately from the management page

Body

application/json
content
string
required

Style description. Please describe in concise and clear language the music style you expect to generate. Example: 'Pop, Mysterious'

Example:

"Pop, Mysterious"

Response

Request successful

code
enum<integer>

Status code. 200 - Request successful, 400 - Invalid parameters, 401 - Unauthorized access, 404 - Invalid request method or path, 405 - Rate limit exceeded, 413 - Theme or prompt too long, 429 - Insufficient credits, 430 - Your call frequency is too high. Please try again later, 455 - System maintenance, 500 - Server error

Available options:
200,
400,
401,
404,
405,
413,
429,
430,
455,
500
Example:

200

msg
string

Error message when code != 200

Example:

"success"

data
object