suno-api  by gcui-art

API for Suno AI music generation, for agent integration

created 1 year ago
2,228 stars

Top 20.7% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides an unofficial API wrapper for Suno AI's music generation capabilities, enabling integration into AI agents and custom applications. It targets developers and AI enthusiasts seeking to leverage advanced AI music creation without official API access, offering features like automatic CAPTCHA solving and OpenAI-compatible API formats.

How It Works

The API interacts with Suno.ai by simulating user actions through Playwright, a browser automation tool. It automatically resolves hCaptcha challenges using the paid 2Captcha service, ensuring continuous operation. The project mimics OpenAI's /v1/chat/completions API structure, facilitating seamless integration with LLM-based agents and tools.

Quick Start & Requirements

  • Install: Clone the repository and run npm install.
  • Prerequisites: A Suno account, a 2Captcha API key with a funded balance, Node.js. macOS is recommended for fewer CAPTCHAs.
  • Deployment: One-click deployment to Vercel or via Docker is supported.
  • Configuration: Set SUNO_COOKIE and TWOCAPTCHA_KEY environment variables.
  • Docs: suno.gcui.ai/docs

Highlighted Details

  • Implements Suno.ai's creation API, including custom generation and lyric generation.
  • Automatically maintains account activity and solves CAPTCHAs via 2Captcha.
  • Compatible with OpenAI's /v1/chat/completions API format.
  • Supports integration with AI agent platforms like GPTs and Coze.

Maintenance & Community

The project encourages contributions via pull requests and issue reports. Community interaction and feedback are managed through GitHub Issues.

Licensing & Compatibility

Licensed under LGPL-3.0 or later. This permissive license allows for free integration and modification, including use in commercial or closed-source applications, provided the terms of LGPL-3.0 are met.

Limitations & Caveats

The project relies on a third-party paid service (2Captcha) for CAPTCHA resolution, introducing a cost factor. GPU acceleration is disabled in the Docker deployment. Integration with specific platforms like GPTs and Coze is marked as "coming soon."

Health Check
Last commit

4 months ago

Responsiveness

1 day

Pull Requests (30d)
1
Issues (30d)
2
Star History
234 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.