RepositoryGo
SU

Suno-API/Suno-API

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

158stars
26forks
5issues
6views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: suno-ai-api

#1 Repository of the week

1
TINIX TRENDING·Topic: suno

#1 Repository of the week

1
TINIX TRENDING·Topic: suno-api

#1 Repository of the week

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 VariableDescriptionDefault Value
SESSION_IDSession ID from the image aboveNone
COOKIECookie from the image aboveNone
BASE_URLSUNO official API URLhttps://studio-api.suno.ai
PROXYHTTP ProxyNone
SECRET_TOKENSuno API seurity http header Bearer tokenNone
SQL_DSNMySQL DSN, if empty, SQLite is usedNone
PORTPort to expose8000
ROTATE_LOGSWhether to rotate logs dailyYes
LOG_DIRPath for log output./logs
DEBUGWhether to enable debug logsNo
PPROFEnable Pprof for performance analysis, uses port 8005No
CHAT_OPENAI_BASEOpenAI API endpointhttps://api.openai.com
CHAT_OPENAI_KEYOpenAI API keysk-xxxxx
CHAT_OPENAI_MODELDefault modelgpt-4o
CHAT_TIME_OUTChat request timeout600 seconds
CHAT_TEMPLATE_DIRDirectory 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

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!

Similar Projects

Discover other similar projects and AI models.

Repository
Zizwar/Awesome-Suno

A curated list of awesome open-source AI projects related to the Suno Ai project.

78
Nov 26, 2026
RepositoryTypeScript
Lumi-Script/Suno-Architect

Create Suno Prompts Using Gemini Flash, works with the Suno API. Create professional-looking timed word-for-word lyrics videos.

66
Nov 25, 2026
RepositoryGo
ollama/ollama

Get up and running with Inkling, Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

189.0k
Dec 3, 2026
RepositoryGo
avelino/awesome-go

A curated list of awesome Go frameworks, libraries and software

197.4k
Dec 3, 2026
RepositoryJavaScript
SUP3RMASS1VE/Suno-Song-Remaster

A professional desktop app for mastering AI-generated music to streaming-ready quality.

139
Nov 14, 2026
RepositoryPython
Malith-Rukshan/Suno-API

SunoAI Unofficial Python API Library and REST API for Suno.ai — Create Music with Generative AI ! ✨

129
Jul 28, 2024
Repository
naqashmunir21/awesome-suno-prompts

🎵 A curated collection of 1000+ professional Suno AI style prompts for creating chart-quality songs. Organized by genre with production tips. Free & open source.

127
Oct 18, 2026
RepositoryPython
practical-tutorials/project-based-learning

Curated list of project-based tutorials

290.9k
Nov 30, 2026
RepositoryGo
golang/go

The Go programming language

140.0k
Dec 1, 2026