中文 | English
基于 FastAPI 的 Suno 代理服务,已补齐核心接口。
先获取 TOKEN: https://share.acedata.cloud/r/1uHHYC0HiL
官网: Suno
仓库: suno-api
- 默认支持最新
chirp-v5-5模型 - 对齐最新
audios / lyrics / persona接口 - 内置中英文 Swagger 文档,默认中文
- 保留旧版
/generate等兼容路由
- 中文文档:
http://localhost:8000/docs - English Docs:
http://localhost:8000/docs/en
- 准备
TOKEN
先访问并获取 TOKEN: https://share.acedata.cloud/r/1uHHYC0HiL
从上游获取 Suno API Token,并参考 .env.example 创建 .env:
TOKEN=your_token_here- 启动服务
docker-compose up --build -d- 访问服务
- 服务地址:
http://localhost:8000 - 中文文档:
http://localhost:8000/docs
-
POST /audios支持generate、extend、upload_extend、cover、artist_consistency、replace_section、mashup、samples等动作。 -
POST /lyrics -
GET /persona查询 persona 列表 -
POST /persona创建 persona -
DELETE /persona删除 persona -
GET /feed/{aid}根据本地缓存的 clip id 查询关联任务结果
POST /generatePOST /generate/description-modePOST /generate/lyrics/POST /generate/concatGET /lyrics/{lid}
新接入建议优先使用 audios / lyrics / persona。
{
"action": "generate",
"prompt": "A song for Christmas",
"model": "chirp-v5-5",
"custom": false
}自定义歌词模式:
{
"action": "generate",
"model": "chirp-v5-5",
"custom": true,
"title": "Snowfall Serenade",
"style": "uplifting, orchestral with sleigh bells and warm strings",
"lyric": "[Verse]\nSnowflakes falling like whispered dreams"
}继续生成:
{
"action": "extend",
"model": "chirp-v5-5",
"audio_id": "existing-audio-id",
"continue_at": 120.5,
"custom": true,
"lyric": "[Verse]\nContinue the story"
}流式返回:
- 请求头传
Accept: application/x-ndjson
action:generate | extend | upload_extend | upload_cover | concat | cover | artist_consistency | artist_consistency_vox | stems | all_stems | replace_section | underpainting | overpainting | remaster | mashup | samplesmodel:chirp-v5-5 | chirp-v5 | chirp-v4-5-plus | chirp-v4-5 | chirp-v4 | chirp-v3-5 | chirp-v3-0prompt: 灵感模式提示词lyric: 自定义模式歌词custom: 是否使用自定义模式audio_id: 续写、翻唱、拼接等动作依赖的音频 IDpersona_id: 歌手风格 IDcallback_url: 异步回调地址
用于 0.1 倍率的中转调用。
支持 image2 图像生成。