Skip to main content

Generate Music

Generate music with or without lyrics using AI models.

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 (customMode: true):
    • If instrumental: true: style and title are required
    • If instrumental: false: style, prompt, and title are required
    • Character limits vary by model:
      • V4: prompt 3000 characters, style 200 characters
      • V4_5 & V4_5PLUS: prompt 5000 characters, style 1000 characters
      • V4_5ALL: prompt 5000 characters, style 1000 characters
      • V5: prompt 5000 characters, style 1000 characters
    • title length limit: 80 characters (all models)
  • In Non-custom Mode (customMode: false):
    • Only prompt is required regardless of instrumental setting
    • prompt length limit: 500 characters
    • Other parameters should be left empty

Developer Notes

  • Recommendation for new users: Start with customMode: false for simpler usage
  • Generated files are retained for 14 days
  • Callback process has three stages: text (text generation), first (first track complete), complete (all tracks complete)

Optional parameters

  • vocalGender (string): Vocal gender preference. Use m for male, f for female. Note: This parameter is only effective when customMode is true. Based on practice, this parameter can only increase the probability but cannot guarantee adherence to male/female voice instructions.
  • styleWeight (number): Strength of adherence to style. Range 0–1, up to 2 decimals. Example: 0.65.
  • weirdnessConstraint (number): Controls creative deviation. Range 0–1, up to 2 decimals. Example: 0.65.
  • audioWeight (number): Balance weight for audio features. Range 0–1, up to 2 decimals. Example: 0.65.
  • personaId (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. To generate a persona ID, visit the Generate Persona endpoint.
Rate limits and quotas are enforced by Apikley and may differ from upstream providers.

OpenAPI

suno-api/suno-api.json post /api/v1/generate

To find navigation and other pages in this documentation, fetch the llms.txt file at: https://docs.apikley.ru/llms.txt