Skip to main content

Suno API Documentation

The Suno API provides professional, watermark-free music generation services featuring fast streaming output and cost-effective pricing – the perfect choice for seamless audio API integration.

API Services Overview​

Based on the provided OpenAPI specification, we offer the following API services:

  1. Music Generation: Create and manage music generation tasks, including extending existing tracks.
  2. Lyrics Generation: Generate song lyrics independently.
  3. WAV Conversion: Convert generated music tracks to WAV format.
  4. Vocal Removal: Separate vocals from music tracks.
  5. Music Video Generation: Generate MP4 videos from music tracks.
  6. Account Management: Manage your account and check credit balance.

Basic Information​

  • API Server: https://api.api.box (from OpenAPI spec)
  • API Version: 1.0.0 (from OpenAPI spec)
  • Technical Support: support@api.box (from OpenAPI spec)

Before using the APIs, please make sure to:

  1. Get your API key from API Key Management Page
  2. Review the Authentication guide

Getting Started​

Authentication​

All API endpoints require Bearer Token authentication using your API Key.

Authorization: Bearer YOUR_API_KEY

Important:

  • Keep your API Key secure.
  • Never share your API Key.
  • If you suspect your API Key has been compromised, reset it immediately from the API Key Management Page.

Error Handling​

Our APIs use standard HTTP status codes along with detailed error messages, as defined in the OpenAPI specification:

CodeDescription
200Success - The request was successful
400Invalid Parameters - Request parameters are invalid
401Unauthorized - Authentication required or failed
404Not Found - Invalid request method or path
405Rate Limited - API call frequency exceeds limit
413Content Too Large - Theme or prompt is too long
429Insufficient Credits - Account lacks credits
455Maintenance - System is under maintenance
500Server Error - Internal server error occurred

API Services Details​

Music Generation​

Generate original AI music, extend existing tracks, and retrieve details including timestamped lyrics.

  • Supports custom and non-custom modes.
  • Instrumental or lyrical music generation.
  • Multiple model versions (V3.5, V4).
  • Extend tracks from specific timestamps.

Learn more about Music Generation →

Lyrics Generation​

Generate song lyrics independently based on a prompt.

  • Receive multiple lyric variations.
  • Includes suggested titles.

Learn more about Lyrics Generation →

WAV Conversion​

Convert generated audio tracks to high-quality, lossless WAV format.

  • Ideal for professional audio editing.

Learn more about WAV Conversion →

Vocal Removal​

Separate a music track into its vocal and instrumental components.

  • Outputs original, instrumental, and vocal tracks.
  • Useful for karaoke or remixing.

Learn more about Vocal Removal →

Music Video Generation​

Create an MP4 video with visual effects synchronized to your music track.

  • Optionally add author and domain name branding.
  • Perfect for social media sharing.

Learn more about Music Video Generation →

Account Management​

Check your remaining API credits.

  • Monitor usage to avoid interruptions.

Learn more about Checking Credits →

Best Practices​

  1. Callback Handling

    • Implement robust callback handling for asynchronous tasks.
    • Properly manage different callback stages (e.g., text, first, complete for music generation).
    • Gracefully handle edge cases and errors in callbacks.
  2. Error Handling

    • Implement appropriate error handling based on the status codes.
    • Use retry mechanisms for transient failures (e.g., network issues, temporary server errors).
    • Monitor credit usage regularly to prevent 429 Insufficient Credits errors.
  3. Performance Optimization

    • Efficiently handle streaming audio responses if applicable.
    • Implement reasonable request timeouts.
    • Cache responses where appropriate, respecting data freshness.
    • Use the "Get Details" endpoints to poll for task status instead of solely relying on callbacks if needed.

Need Help?​

If you encounter any issues or have questions, please contact us through:

Language Support

This documentation is available in both English and Chinese. You can switch languages using the language selector in the navigation bar.