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:
- Music Generation: Create and manage music generation tasks, including extending existing tracks.
- Lyrics Generation: Generate song lyrics independently.
- WAV Conversion: Convert generated music tracks to WAV format.
- Vocal Removal: Separate vocals from music tracks.
- Music Video Generation: Generate MP4 videos from music tracks.
- Account Management: Manage your account and check credit balance.
Basic Information
- API Server:
https://apibox.erweima.ai
(from OpenAPI spec) - API Version: 1.0.0 (from OpenAPI spec)
- Technical Support: [email protected] (from OpenAPI spec)
Before using the APIs, please make sure to:
- Get your API key from API Key Management Page
- 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:
Code | Description |
---|---|
200 | Success - The request was successful |
400 | Invalid Parameters - Request parameters are invalid |
401 | Unauthorized - Authentication required or failed |
404 | Not Found - Invalid request method or path |
405 | Rate Limited - API call frequency exceeds limit |
413 | Content Too Large - Theme or prompt is too long |
429 | Insufficient Credits - Account lacks credits |
455 | Maintenance - System is under maintenance |
500 | Server 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
-
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.
-
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.
-
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:
- 📧 Email: [email protected]
- 💬 Live Support: Dashboard
- 📚 API Reference: Full Documentation
This documentation is available in both English and Chinese. You can switch languages using the language selector in the navigation bar.