GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Suno-API/Suno-API: This is an unofficial Suno AI API based on Golang. It currently supports generating songs, lyrics, and OpenAI Chat

BranchesTags
Open more actions menu

Latest commit

 

History

23 Commits
23 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
common
common
 
 
docs
docs
 
 
entity/po
entity/po
 
 
lib
lib
 
 
middleware
middleware
 
 
template
template
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
README.md
README.md
 
 
README_ZH.md
README_ZH.md
 
 
Suno.md
Suno.md
 
 
account.go
account.go
 
 
api.go
api.go
 
 
chat.go
chat.go
 
 
docker-compose.yml
docker-compose.yml
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
init.go
init.go
 
 
license
license
 
 
main.go
main.go
 
 
model.go
model.go
 
 
router.go
router.go
 
 
task.go
task.go
 
 

Repository files navigation

Suno API

中文

Good news

I provide the Suno AI API, no deployment is required, no subscription to suno is required. Lower price, more convenient to use the suno API. No need to worry about watermarks and Captcha issues

Website: https://api.bltcy.ai

Disclaimer

  • This project is released on GitHub under the MIT license, free and open-source for educational purposes.

Supported Features

  • Suno API supports Inspiration Mode, Custom Mode, and Continuation.
  • Provides standardized services compatible with OpenAI's interface format, supporting both streaming and non-streaming output.
  • Automatically maintains and keeps alive user account information once provided.
  • Persists task records, allowing recovery of tasks even after a program interruption.
  • Supports custom formatting of OpenAI Chat responses, based on Go Template syntax.
  • Compatible with front-end projects like chat-next-web.
  • Simplifies deployment process, supports docker-compose and docker.
  • Supput New API Docs

API Docs

http://localhost:8000/swagger/index.html

Deployment

Configuration

Initially obtain these from the browser; later stages will maintain automatic vitality.

cookie

Env Environment Variables

Environment Variable Description Default Value
SESSION_ID Session ID from the image above None
COOKIE Cookie from the image above None
BASE_URL SUNO official API URL https://studio-api.suno.ai
PROXY HTTP Proxy None
SECRET_TOKEN Suno API seurity http header Bearer token None
SQL_DSN MySQL DSN, if empty, SQLite is used None
PORT Port to expose 8000
ROTATE_LOGS Whether to rotate logs daily Yes
LOG_DIR Path for log output ./logs
DEBUG Whether to enable debug logs No
PPROF Enable Pprof for performance analysis, uses port 8005 No
CHAT_OPENAI_BASE OpenAI API endpoint https://api.openai.com
CHAT_OPENAI_KEY OpenAI API key sk-xxxxx
CHAT_OPENAI_MODEL Default model gpt-4o
CHAT_TIME_OUT Chat request timeout 600 seconds
CHAT_TEMPLATE_DIR Directory for chat templates ./template

Docker Deployment

Step-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.

# Deployment command using MySQL, modify the database connection parameters as needed.
docker run --name suno-api -d -p 8000:8000 \
-e SESSION_ID=xxxx \
-e COOKIE=xxxx  \
-e CHAT_OPENAI_BASE=https://api.openai.com  \
-e CHAT_OPENAI_KEY=sk-xxxxx  \
 sunoapigo/suno-api

docker-compose.yml

version: '3.2'

services:
  sunoapi:
    image: sunoapigo/suno-api:latest
    container_name: sunoapi
    restart: always
    ports:
      - "8000:8000"
    volumes:
      - ./logs:/logs
      - ./template:/template
    environment:
      - PORT=8000
      - SECRET_TOKEN=123456
      - SQL_DSN=root:123456@tcp(localhost:3306)/sunoapi
      - TZ=Asia/Shanghai
      - ROTATE_LOGS=false
      - PPROF=false
      - DEBUG=false
      - CHAT_TEMPLATE_DIR=./template
      - CHAT_OPENAI_MODEL=gpt-4o
      - CHAT_OPENAI_BASE=https://one-api.bltcy.top
      - CHAT_OPENAI_KEY=sk-

Customizing OpenAI Chat Response Format

Edit the suno.yaml in ./template using Go template syntax.

  • chat_stream_submit: Output format when a streaming task is successfully submitted.
  • chat_stream_tick: Output format for each progress check during streaming.
  • chat_resp: Output format upon completion of streaming.

References

  • Suno AI Official Website: https://suno.com
  • Suno-API GitHub: https://github.com/SunoAI-API/Suno-API

License

MIT © Suno API

Support

zanshangcode.jpg

This 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!

About

This is an unofficial Suno AI API based on Golang. It currently supports generating songs, lyrics, and OpenAI Chat

Topics

golangmusicsunosuno-aisuno-ai-apisuno-api

Resources

Readme
MIT license
Activity

Stars

158 stars

Watchers

3 watching

Forks

26 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.