Merge pull request #104 from blueeon/main

🦄 refactor: opt params
This commit is contained in:
blueeon 2024-06-08 16:04:42 +08:00 committed by GitHub
commit f2804ad5ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 19 additions and 18 deletions

View File

@ -8,8 +8,8 @@
<p align="center">
<a target="_blank" href="./README.md">English</a>
| <a target="_blank" href="./README_CN.md">简体中文</a>
| <a target="_blank" href="https://suno.gcui.art">Demo</a>
| <a target="_blank" href="https://suno.gcui.art/docs">Docs</a>
| <a target="_blank" href="https://suno.gcui.ai">Demo</a>
| <a target="_blank" href="https://suno.gcui.ai/docs">Docs</a>
| <a target="_blank" href="https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fgcui-art%2Fsuno-api&env=SUNO_COOKIE&project-name=suno-api&repository-name=suno-api">Deploy with Vercel</a>
</p>
<p align="center">
@ -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

View File

@ -8,8 +8,8 @@
<p align="center">
<a target="_blank" href="./README.md">English</a>
| <a target="_blank" href="./README_CN.md">简体中文</a>
| <a target="_blank" href="https://suno.gcui.art">Demo</a>
| <a target="_blank" href="https://suno.gcui.art/docs">文档</a>
| <a target="_blank" href="https://suno.gcui.ai">Demo</a>
| <a target="_blank" href="https://suno.gcui.ai/docs">文档</a>
| <a target="_blank" href="https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fgcui-art%2Fsuno-api&env=SUNO_COOKIE&project-name=suno-api&repository-name=suno-api">一键部署到 Vercel</a>
</p>
@ -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=<your-cookie>
### 5. 使用 Suno API
你可以在 [suno.gcui.art](https://suno.gcui.art/docs)查看详细的 API 文档,并在线测试。
你可以在 [suno.gcui.ai](https://suno.gcui.ai/docs)查看详细的 API 文档,并在线测试。
## API 说明
@ -126,7 +126,7 @@ Suno API 目前主要实现了以下 API:
```
详细文档请查看演示站点:
[suno.gcui.art/docs](https://suno.gcui.art/docs)
[suno.gcui.ai/docs](https://suno.gcui.ai/docs)
## API 集成代码示例

View File

@ -2,7 +2,7 @@
"name": "suno-api",
"description": "Use API to call the music generation service of suno.ai, and easily integrate it into agents like GPTs.",
"author": {
"name": "gcui.art",
"name": "gcui.ai",
"url": "https://github.com/gcui-art/"
},
"license": "LGPL-3.0-or-later",

View File

@ -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,

View File

@ -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), {

View File

@ -11,7 +11,7 @@ export const metadata: Metadata = {
title: "suno api",
description: "Use API to call the music generation ai of suno.ai",
keywords: ["suno", "suno api", "suno.ai", "api", "music", "generation", "ai"],
creator: "@gcui.art",
creator: "@gcui.ai",
};
export default function RootLayout({

View File

@ -89,7 +89,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).
You can check out the detailed API documentation at [suno.gcui.ai/docs](https://suno.gcui.ai/docs).
## 📚 API Reference
@ -111,7 +111,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)
`;
return (

View File

@ -312,6 +312,7 @@ class SunoApi {
tags: tags,
title: title
});
console.log("response\n", response);
return response.data;
}