以openai格式调用suno api,并将cookie保存为数据库,实现cookie池调用 📈已接入newapi、oneapi中转站,适配chat-next-web等前端项目 || Call suno api in openai format, and save the cookie as a database to realize the cookie pool call to access newapi, oneapi relay station, adapting chat-next-web and other front-end projects
Stars
265
Forks
47
Watchers
265
Open Issues
6
Overall repository health assessment
No package.json found
This might not be a Node.js project
266
commits
197
commits
Enhance Suno API client with new notification and permission check features. Added `CHECK` constant in `constants.py` for generation permission verification. Updated `SongsGen` class to include methods for fetching notifications and checking generation permissions, with improved error handling and logging. Modified `fetch` function to support optional CAPTCHA token in requests. Expanded tests to validate new functionalities, ensuring robust error handling and logging for better debugging.
2e63807View on GitHubEnhance Suno API client with retry logic and task status management. Added constants for retry configuration and task statuses in `constants.py`. Refactored `SongsGen` class to implement token refresh and improved error handling in API requests. Updated `get_feed` method to support token caching and retries. Enhanced tests for music generation and task status checking, including detailed logging of responses and errors.
9a267c8View on GitHubRemove welcome message file and update Suno API constants and HTTP client. The `chainlit.md` file has been deleted, and the `SUNO_BASE` URL has been changed to the production endpoint. Enhanced the `HttpClient` class with a new method for requests with headers, improved error handling, and added new methods in `SongsGen` for session verification, playlist retrieval, and feed information. Updated tests to reflect changes in session management and added new test cases for the new functionalities.
d31a4deView on GitHubRemove obsolete configuration and translation files; delete .chainlit/config.toml and .chainlit/translations/en-US.json. Comment out cookie handling in SongsGen class and add datetime import in sql_utils.py for future enhancements.
381a3e4View on GitHubRefactor Suno AI client: rename project to 'suno2openai', update version to 0.2.1, enhance constants management with structured classes for URLs and Captcha configuration, improve HttpClient error handling and logging, and streamline SongsGen class with better HTTP headers and session management. Remove obsolete test_suno.py file.
c2ba5f8View on GitHubRemove .env and requirements.txt files, update .gitignore to exclude environment files, and clean up .idea configuration files. Refactor HttpClient class to streamline session management and improve error handling in HTTP requests. Enhance logging for better debugging and clarity in request/response cycles.
b402334View on GitHubEnhance HttpClient and SongsGen classes with cookie support and improved logging; added timestamped cookies for session management, updated CAPTCHA token retrieval to include cookies, and refined request payload structure for better clarity.
e6a64cdView on GitHubRefactor constants and enhance HttpClient logging; removed unused site keys and URLs, improved request and response logging details, and updated CAPTCHA handling in SongsGen class for better clarity and debugging.
c754e88View on GitHubUpdate .gitignore to exclude environment files, remove test.env, and enhance SongsGen class with improved HTTP headers, cookie handling, and logging for CAPTCHA token retrieval.
b2b5267View on GitHubRefactor SongsGen class to improve authentication and error handling. Added capsolver API key requirement, enhanced token retrieval process with better logging, and implemented asynchronous context management. Removed unused variables and simplified HTTP client initialization.
126b4ddView on GitHubUpdate app configuration and logging; change server port to 7000, update SQL connection details, and refactor cookie retrieval endpoint to use GET method. Remove unused background files and improve error handling in token generation.
11eb79bView on GitHub