{"id":16084760,"url":"https://github.com/Suno-API/Suno-API","last_synced_at":"2025-10-23T01:31:15.264Z","repository":{"id":242381825,"uuid":"809201494","full_name":"Suno-API/Suno-API","owner":"Suno-API","description":"This is an unofficial Suno AI API based on Golang. It currently supports generating songs, lyrics, and OpenAI Chat","archived":false,"fork":false,"pushed_at":"2024-12-27T02:26:59.000Z","size":350,"stargazers_count":64,"open_issues_count":5,"forks_count":10,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-27T03:23:08.871Z","etag":null,"topics":["golang","music","suno","suno-ai","suno-ai-api","suno-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Suno-API.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-02T02:09:23.000Z","updated_at":"2024-12-27T02:27:02.000Z","dependencies_parsed_at":"2024-06-04T15:09:20.719Z","dependency_job_id":"c7510f42-5341-431e-bfb2-763d851559e5","html_url":"https://github.com/Suno-API/Suno-API","commit_stats":null,"previous_names":["suno-api/suno-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Suno-API%2FSuno-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Suno-API%2FSuno-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Suno-API%2FSuno-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Suno-API%2FSuno-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Suno-API","download_url":"https://codeload.github.com/Suno-API/Suno-API/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237763855,"owners_count":19362310,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","music","suno","suno-ai","suno-ai-api","suno-api"],"created_at":"2024-10-09T13:01:17.727Z","updated_at":"2025-10-23T01:31:14.920Z","avatar_url":"https://github.com/Suno-API.png","language":"Go","funding_links":[],"categories":["Go","List of Projects"],"sub_categories":["Go"],"readme":"﻿# Suno API\r\n[中文](./README_ZH.md)\r\n\r\n# Good news\r\nI provide the Suno AI API, no deployment is required, no subscription to suno is required. Lower price, more convenient to use the suno API. \r\nNo need to worry about watermarks and Captcha issues\r\n#### Website: https://api.bltcy.ai\r\n\r\n\r\n## Disclaimer\r\n- This project is released on GitHub under the MIT license, free and open-source for educational purposes.\r\n\r\n## Supported Features\r\n- [x] Suno API supports Inspiration Mode, Custom Mode, and Continuation.\r\n- [x] Provides standardized services compatible with OpenAI's interface format, supporting both streaming and non-streaming output.\r\n- [x] Automatically maintains and keeps alive user account information once provided.\r\n- [x] Persists task records, allowing recovery of tasks even after a program interruption.\r\n- [x] Supports custom formatting of OpenAI Chat responses, based on Go Template syntax.\r\n- [x] Compatible with front-end projects like chat-next-web.\r\n- [x] Simplifies deployment process, supports docker-compose and docker.\r\n- [x] Supput [New API](https://github.com/Calcium-Ion/new-api) [Docs](Suno.md)\r\n\r\n## API Docs\r\n\r\nhttp://localhost:8000/swagger/index.html\r\n\r\n## Deployment\r\n\r\n### Configuration\r\nInitially obtain these from the browser; later stages will maintain automatic vitality.\r\n\r\n![cookie](./docs/images/image1.png)\r\n\r\n### Env Environment Variables\r\n| Environment Variable | Description                                           | Default Value |\r\n| --- |-------------------------------------------------------| --- |\r\n| SESSION_ID | Session ID from the image above                       | None |\r\n| COOKIE | Cookie from the image above                           | None |\r\n| BASE_URL | SUNO official API URL                                 | https://studio-api.suno.ai |\r\n| PROXY | HTTP Proxy                                            | None |\r\n| SECRET_TOKEN | Suno API seurity http header Bearer token             | None                                           |\r\n| SQL_DSN | MySQL DSN, if empty, SQLite is used                   | None |\r\n| PORT | Port to expose                                        | 8000 |\r\n| ROTATE_LOGS | Whether to rotate logs daily                          | Yes |\r\n| LOG_DIR | Path for log output                                   | ./logs |\r\n| DEBUG | Whether to enable debug logs                          | No |\r\n| PPROF | Enable Pprof for performance analysis, uses port 8005 | No |\r\n| CHAT_OPENAI_BASE | OpenAI API endpoint                                   | https://api.openai.com |\r\n| CHAT_OPENAI_KEY | OpenAI API key                                        | sk-xxxxx |\r\n| CHAT_OPENAI_MODEL | Default model                                         | gpt-4o |\r\n| CHAT_TIME_OUT | Chat request timeout                                  | 600 seconds |\r\n| CHAT_TEMPLATE_DIR | Directory for chat templates                          | ./template |\r\n\r\n### Docker Deployment\r\nStep-by-step guide on how to run a Docker container with specific environment variables and port mappings. Sensitive details like SQL names, passwords, and IP addresses are replaced with placeholders for this guide.\r\n\r\n```bash\r\n# Deployment command using MySQL, modify the database connection parameters as needed.\r\ndocker run --name suno-api -d -p 8000:8000 \\\r\n-e SESSION_ID=xxxx \\\r\n-e COOKIE=xxxx  \\\r\n-e CHAT_OPENAI_BASE=https://api.openai.com  \\\r\n-e CHAT_OPENAI_KEY=sk-xxxxx  \\\r\n sunoapigo/suno-api\r\n```\r\n\r\ndocker-compose.yml\r\n```bash\r\nversion: '3.2'\r\n\r\nservices:\r\n  sunoapi:\r\n    image: sunoapigo/suno-api:latest\r\n    container_name: sunoapi\r\n    restart: always\r\n    ports:\r\n      - \"8000:8000\"\r\n    volumes:\r\n      - ./logs:/logs\r\n      - ./template:/template\r\n    environment:\r\n      - PORT=8000\r\n      - SECRET_TOKEN=123456\r\n      - SQL_DSN=root:123456@tcp(localhost:3306)/sunoapi\r\n      - TZ=Asia/Shanghai\r\n      - ROTATE_LOGS=false\r\n      - PPROF=false\r\n      - DEBUG=false\r\n      - CHAT_TEMPLATE_DIR=./template\r\n      - CHAT_OPENAI_MODEL=gpt-4o\r\n      - CHAT_OPENAI_BASE=https://one-api.bltcy.top\r\n      - CHAT_OPENAI_KEY=sk-\r\n```\r\n\r\n## Customizing OpenAI Chat Response Format\r\nEdit the suno.yaml in ./template using Go template syntax.\r\n\r\n- chat_stream_submit: Output format when a streaming task is successfully submitted.\r\n- chat_stream_tick: Output format for each progress check during streaming.\r\n- chat_resp: Output format upon completion of streaming.\r\n\r\n## References\r\n- Suno AI Official Website: https://suno.com\r\n- Suno-API GitHub: https://github.com/SunoAI-API/Suno-API\r\n\r\n## License\r\nMIT © [Suno API](./license)\r\n\r\n## Support\r\n![zanshangcode.jpg](./docs/images/zanshangcode.jpg)\r\n\r\nThis project is open-source on GitHub under the MIT license and is free of charge. If you find this project helpful, please give it a star and share it. Thank you for your support!\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSuno-API%2FSuno-API","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSuno-API%2FSuno-API","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSuno-API%2FSuno-API/lists"}