From 4174ca8009c6d6c8f76d88262844935f20cc69bb Mon Sep 17 00:00:00 2001 From: blueeon Date: Sat, 8 Jun 2024 14:16:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=A6=84=20refactor:=20opt=20params?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/api/custom_generate/route.ts | 4 ++-- src/app/api/generate/route.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/api/custom_generate/route.ts b/src/app/api/custom_generate/route.ts index 8f1e8d3..8dc27d0 100644 --- a/src/app/api/custom_generate/route.ts +++ b/src/app/api/custom_generate/route.ts @@ -21,9 +21,9 @@ export async function POST(req: NextRequest) { } const audioInfo = await (await sunoApi).custom_generate( prompt, tags, title, - make_instrumental == true, + Boolean(make_instrumental), model || DEFAULT_MODEL, - wait_audio == true + Boolean(wait_audio) ); return new NextResponse(JSON.stringify(audioInfo), { status: 200, diff --git a/src/app/api/generate/route.ts b/src/app/api/generate/route.ts index 25592e6..5b44f47 100644 --- a/src/app/api/generate/route.ts +++ b/src/app/api/generate/route.ts @@ -22,9 +22,9 @@ export async function POST(req: NextRequest) { const audioInfo = await (await sunoApi).generate( prompt, - make_instrumental == true, + Boolean(make_instrumental), model || DEFAULT_MODEL, - wait_audio == true + Boolean(wait_audio) ); return new NextResponse(JSON.stringify(audioInfo), { From eb484dfa796b0d246124e1ecf696b5d0e68e20f3 Mon Sep 17 00:00:00 2001 From: blueeon Date: Sat, 8 Jun 2024 14:48:24 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=83=20docs:=20change=20domain?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 +++++----- README_CN.md | 10 +++++----- package.json | 2 +- src/app/layout.tsx | 2 +- src/app/page.tsx | 4 ++-- src/lib/SunoApi.ts | 1 + 6 files changed, 15 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 37e7fb0..b01f828 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@
English | 简体中文 - | Demo - | Docs + | Demo + | Docs | Deploy with Vercel
@@ -27,7 +27,7 @@ We discovered that some users have similar needs, so we decided to open-source t ## Demo We have deployed an example bound to a free Suno account, so it has daily usage limits, but you can see how it runs: -[suno.gcui.art](https://suno.gcui.art) +[suno.gcui.ai](https://suno.gcui.ai) ## Features @@ -109,7 +109,7 @@ it means the program is running normally. ### 5. Use Suno API You can check out the detailed API documentation at : -[suno.gcui.art/docs](https://suno.gcui.art/docs) +[suno.gcui.ai/docs](https://suno.gcui.ai/docs) ## API Reference @@ -129,7 +129,7 @@ Suno API currently mainly implements the following APIs: ``` For more detailed documentation, please check out the demo site: -[suno.gcui.art/docs](https://suno.gcui.art/docs) +[suno.gcui.ai/docs](https://suno.gcui.ai/docs) ## API Integration Code Example diff --git a/README_CN.md b/README_CN.md index 714eec5..98030b1 100644 --- a/README_CN.md +++ b/README_CN.md @@ -8,8 +8,8 @@
English | 简体中文 - | Demo - | 文档 + | Demo + | 文档 | 一键部署到 Vercel
@@ -27,7 +27,7 @@ Suno.ai v3 是一个令人惊叹的 AI 音乐服务,虽然官方还没有开 ## Demo 我们部署了一个示例,绑定了一个免费的 suno 账号,所以它每天有使用限制,但你可以看到它运行起来的样子: -[suno.gcui.art](https://suno.gcui.art) +[suno.gcui.ai](https://suno.gcui.ai) ## Features @@ -107,7 +107,7 @@ SUNO_COOKIE=