commit
742aac5d95
36
README.md
36
README.md
@ -124,6 +124,8 @@ Suno API currently mainly implements the following APIs:
|
|||||||
If no IDs are provided, all music will be returned.
|
If no IDs are provided, all music will be returned.
|
||||||
- `/api/get_limit`: Get quota Info
|
- `/api/get_limit`: Get quota Info
|
||||||
- `/api/extend_audio`: Extend audio length
|
- `/api/extend_audio`: Extend audio length
|
||||||
|
- `/api/clip`: Get clip information based on ID passed as query parameter `id`
|
||||||
|
- `/api/concat`: Generate the whole song from extensions
|
||||||
```
|
```
|
||||||
|
|
||||||
For more detailed documentation, please check out the demo site:
|
For more detailed documentation, please check out the demo site:
|
||||||
@ -169,6 +171,17 @@ def get_quota_information():
|
|||||||
response = requests.get(url)
|
response = requests.get(url)
|
||||||
return response.json()
|
return response.json()
|
||||||
|
|
||||||
|
def get_clip(clip_id):
|
||||||
|
url = f"{base_url}/api/clip?id={clip_id}"
|
||||||
|
response = requests.get(url)
|
||||||
|
return response.json()
|
||||||
|
|
||||||
|
def generate_whole_song(clip_id):
|
||||||
|
payloyd = {"clip_id": clip_id}
|
||||||
|
url = f"{base_url}/api/concat"
|
||||||
|
response = requests.post(url, json=payload)
|
||||||
|
return response.json()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
data = generate_audio_by_prompt({
|
data = generate_audio_by_prompt({
|
||||||
@ -235,6 +248,12 @@ async function getQuotaInformation() {
|
|||||||
return response.data;
|
return response.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function getClipInformation(clipId) {
|
||||||
|
const url = `${baseUrl}/api/clip?id=${clipId}`;
|
||||||
|
const response = await axios.get(url);
|
||||||
|
return response.data;
|
||||||
|
}
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
const data = await generateAudioByPrompt({
|
const data = await generateAudioByPrompt({
|
||||||
prompt:
|
prompt:
|
||||||
@ -277,18 +296,23 @@ You can integrate Suno AI as a tool/plugin/action into your AI agent.
|
|||||||
|
|
||||||
[coming soon...]
|
[coming soon...]
|
||||||
|
|
||||||
## Contribution Guidelines
|
## Contributing
|
||||||
|
|
||||||
Fork the project and submit a pull request.
|
There are four ways you can support this project:
|
||||||
|
|
||||||
|
1. Fork and Submit Pull Requests: We welcome any PRs that enhance the component or editor.
|
||||||
|
2. Open Issues: We appreciate reasonable suggestions and bug reports.
|
||||||
|
3. Donate: If this project has helped you, consider buying us a coffee using the Sponsor button at the top of the project. Cheers! ☕
|
||||||
|
4. Spread the Word: Recommend this project to others, star the repo, or add a backlink after using the project.
|
||||||
|
|
||||||
|
## Questions, Suggestions, Issues, or Bugs?
|
||||||
|
|
||||||
|
We use GitHub Issues to manage feedback. Feel free to open an issue, and we'll address it promptly.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
LGPL-3.0 or later
|
LGPL-3.0 or later
|
||||||
|
|
||||||
## Contact Us
|
|
||||||
|
|
||||||
- Contact us: <support@gcui.ai>
|
|
||||||
|
|
||||||
## Related Links
|
## Related Links
|
||||||
|
|
||||||
- Project repository: [github.com/gcui-art/suno-api](https://github.com/gcui-art/suno-api)
|
- Project repository: [github.com/gcui-art/suno-api](https://github.com/gcui-art/suno-api)
|
||||||
|
13
README_CN.md
13
README_CN.md
@ -121,6 +121,8 @@ Suno API 目前主要实现了以下 API:
|
|||||||
- `/api/get`: 根据id获取音乐信息。获取多个请用","分隔,不传ids则返回所有音乐
|
- `/api/get`: 根据id获取音乐信息。获取多个请用","分隔,不传ids则返回所有音乐
|
||||||
- `/api/get_limit`: 获取配额信息
|
- `/api/get_limit`: 获取配额信息
|
||||||
- `/api/extend_audio`: 在一首音乐的基础上,扩展音乐长度
|
- `/api/extend_audio`: 在一首音乐的基础上,扩展音乐长度
|
||||||
|
- `/api/clip`: 检索特定音乐的信息
|
||||||
|
- `/api/concat`: 合并音乐,将扩展后的音乐和原始音乐合并
|
||||||
```
|
```
|
||||||
|
|
||||||
详细文档请查看演示站点:
|
详细文档请查看演示站点:
|
||||||
@ -275,15 +277,20 @@ main();
|
|||||||
|
|
||||||
## 贡献指南
|
## 贡献指南
|
||||||
|
|
||||||
Fork 项目并提交 PR 即可。
|
您有四种方式支持本项目:
|
||||||
|
|
||||||
|
1. Fork 项目并提交 PR:我们欢迎任何让这个组件和Editor变的更好的PR。
|
||||||
|
2. 提交Issue:我们欢迎任何合理的建议、bug反馈。
|
||||||
|
3. 捐赠:在项目的顶部我们放置了 Sponsor 按钮,如果这个项目帮助到了您,你可以请我们喝一杯,干杯☕。
|
||||||
|
4. 推荐:向其他人推荐本项目;点击Star;使用本项目后放置外链。
|
||||||
|
|
||||||
## 许可证
|
## 许可证
|
||||||
|
|
||||||
LGPL-3.0 或更高版本
|
LGPL-3.0 或更高版本
|
||||||
|
|
||||||
## 联系方式
|
## 你有一个问题/建议/困难/Bug?
|
||||||
|
|
||||||
- 联系我们:<support@gcui.ai>
|
我们使用Github的Issue来管理这些反馈,你可以提交一个。我们会经常来处理。
|
||||||
|
|
||||||
## 相关链接
|
## 相关链接
|
||||||
|
|
||||||
|
9008
package-lock.json
generated
9008
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -26,7 +26,7 @@
|
|||||||
"react-dom": "^18",
|
"react-dom": "^18",
|
||||||
"react-markdown": "^9.0.1",
|
"react-markdown": "^9.0.1",
|
||||||
"swagger-ui-react": "^5.12.3",
|
"swagger-ui-react": "^5.12.3",
|
||||||
"tough-cookie": "^4.1.3",
|
"tough-cookie": "^4.1.4",
|
||||||
"user-agents": "^1.1.156"
|
"user-agents": "^1.1.156"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@ -38,7 +38,7 @@
|
|||||||
"@types/tough-cookie": "^4.0.5",
|
"@types/tough-cookie": "^4.0.5",
|
||||||
"@types/user-agents": "^1.0.4",
|
"@types/user-agents": "^1.0.4",
|
||||||
"autoprefixer": "^10.0.1",
|
"autoprefixer": "^10.0.1",
|
||||||
"eslint": "^8",
|
"eslint": "^8.57.0",
|
||||||
"eslint-config-next": "14.1.4",
|
"eslint-config-next": "14.1.4",
|
||||||
"postcss": "^8",
|
"postcss": "^8",
|
||||||
"tailwindcss": "^3.3.0",
|
"tailwindcss": "^3.3.0",
|
||||||
|
@ -13,7 +13,7 @@ dependencies:
|
|||||||
version: 1.6.8
|
version: 1.6.8
|
||||||
axios-cookiejar-support:
|
axios-cookiejar-support:
|
||||||
specifier: ^5.0.0
|
specifier: ^5.0.0
|
||||||
version: 5.0.0(axios@1.6.8)(tough-cookie@4.1.3)
|
version: 5.0.0(axios@1.6.8)(tough-cookie@4.1.4)
|
||||||
next:
|
next:
|
||||||
specifier: 14.1.4
|
specifier: 14.1.4
|
||||||
version: 14.1.4(react-dom@18.2.0)(react@18.2.0)
|
version: 14.1.4(react-dom@18.2.0)(react@18.2.0)
|
||||||
@ -39,8 +39,8 @@ dependencies:
|
|||||||
specifier: ^5.12.3
|
specifier: ^5.12.3
|
||||||
version: 5.12.3(@types/react@18.2.72)(react-dom@18.2.0)(react@18.2.0)
|
version: 5.12.3(@types/react@18.2.72)(react-dom@18.2.0)(react@18.2.0)
|
||||||
tough-cookie:
|
tough-cookie:
|
||||||
specifier: ^4.1.3
|
specifier: ^4.1.4
|
||||||
version: 4.1.3
|
version: 4.1.4
|
||||||
user-agents:
|
user-agents:
|
||||||
specifier: ^1.1.156
|
specifier: ^1.1.156
|
||||||
version: 1.1.156
|
version: 1.1.156
|
||||||
@ -71,7 +71,7 @@ devDependencies:
|
|||||||
specifier: ^10.0.1
|
specifier: ^10.0.1
|
||||||
version: 10.4.19(postcss@8.4.38)
|
version: 10.4.19(postcss@8.4.38)
|
||||||
eslint:
|
eslint:
|
||||||
specifier: ^8
|
specifier: ^8.57.0
|
||||||
version: 8.57.0
|
version: 8.57.0
|
||||||
eslint-config-next:
|
eslint-config-next:
|
||||||
specifier: 14.1.4
|
specifier: 14.1.4
|
||||||
@ -262,7 +262,7 @@ packages:
|
|||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@next/swc-darwin-arm64@14.1.4:
|
/@next/swc-darwin-arm64@14.1.4:
|
||||||
resolution: {integrity: sha512-ubmUkbmW65nIAOmoxT1IROZdmmJMmdYvXIe8211send9ZYJu+SqxSnJM4TrPj9wmL6g9Atvj0S/2cFmMSS99jg==, tarball: https://registry.npmmirror.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.1.4.tgz}
|
resolution: {integrity: sha512-ubmUkbmW65nIAOmoxT1IROZdmmJMmdYvXIe8211send9ZYJu+SqxSnJM4TrPj9wmL6g9Atvj0S/2cFmMSS99jg==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [darwin]
|
os: [darwin]
|
||||||
@ -271,7 +271,7 @@ packages:
|
|||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@next/swc-darwin-x64@14.1.4:
|
/@next/swc-darwin-x64@14.1.4:
|
||||||
resolution: {integrity: sha512-b0Xo1ELj3u7IkZWAKcJPJEhBop117U78l70nfoQGo4xUSvv0PJSTaV4U9xQBLvZlnjsYkc8RwQN1HoH/oQmLlQ==, tarball: https://registry.npmmirror.com/@next/swc-darwin-x64/-/swc-darwin-x64-14.1.4.tgz}
|
resolution: {integrity: sha512-b0Xo1ELj3u7IkZWAKcJPJEhBop117U78l70nfoQGo4xUSvv0PJSTaV4U9xQBLvZlnjsYkc8RwQN1HoH/oQmLlQ==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [darwin]
|
os: [darwin]
|
||||||
@ -280,7 +280,7 @@ packages:
|
|||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@next/swc-linux-arm64-gnu@14.1.4:
|
/@next/swc-linux-arm64-gnu@14.1.4:
|
||||||
resolution: {integrity: sha512-457G0hcLrdYA/u1O2XkRMsDKId5VKe3uKPvrKVOyuARa6nXrdhJOOYU9hkKKyQTMru1B8qEP78IAhf/1XnVqKA==, tarball: https://registry.npmmirror.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.1.4.tgz}
|
resolution: {integrity: sha512-457G0hcLrdYA/u1O2XkRMsDKId5VKe3uKPvrKVOyuARa6nXrdhJOOYU9hkKKyQTMru1B8qEP78IAhf/1XnVqKA==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
@ -290,7 +290,7 @@ packages:
|
|||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@next/swc-linux-arm64-musl@14.1.4:
|
/@next/swc-linux-arm64-musl@14.1.4:
|
||||||
resolution: {integrity: sha512-l/kMG+z6MB+fKA9KdtyprkTQ1ihlJcBh66cf0HvqGP+rXBbOXX0dpJatjZbHeunvEHoBBS69GYQG5ry78JMy3g==, tarball: https://registry.npmmirror.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.1.4.tgz}
|
resolution: {integrity: sha512-l/kMG+z6MB+fKA9KdtyprkTQ1ihlJcBh66cf0HvqGP+rXBbOXX0dpJatjZbHeunvEHoBBS69GYQG5ry78JMy3g==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
@ -300,7 +300,7 @@ packages:
|
|||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@next/swc-linux-x64-gnu@14.1.4:
|
/@next/swc-linux-x64-gnu@14.1.4:
|
||||||
resolution: {integrity: sha512-BapIFZ3ZRnvQ1uWbmqEGJuPT9cgLwvKtxhK/L2t4QYO7l+/DxXuIGjvp1x8rvfa/x1FFSsipERZK70pewbtJtw==, tarball: https://registry.npmmirror.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.1.4.tgz}
|
resolution: {integrity: sha512-BapIFZ3ZRnvQ1uWbmqEGJuPT9cgLwvKtxhK/L2t4QYO7l+/DxXuIGjvp1x8rvfa/x1FFSsipERZK70pewbtJtw==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
@ -310,7 +310,7 @@ packages:
|
|||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@next/swc-linux-x64-musl@14.1.4:
|
/@next/swc-linux-x64-musl@14.1.4:
|
||||||
resolution: {integrity: sha512-mqVxTwk4XuBl49qn2A5UmzFImoL1iLm0KQQwtdRJRKl21ylQwwGCxJtIYo2rbfkZHoSKlh/YgztY0qH3wG1xIg==, tarball: https://registry.npmmirror.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.1.4.tgz}
|
resolution: {integrity: sha512-mqVxTwk4XuBl49qn2A5UmzFImoL1iLm0KQQwtdRJRKl21ylQwwGCxJtIYo2rbfkZHoSKlh/YgztY0qH3wG1xIg==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
@ -320,7 +320,7 @@ packages:
|
|||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@next/swc-win32-arm64-msvc@14.1.4:
|
/@next/swc-win32-arm64-msvc@14.1.4:
|
||||||
resolution: {integrity: sha512-xzxF4ErcumXjO2Pvg/wVGrtr9QQJLk3IyQX1ddAC/fi6/5jZCZ9xpuL9Tzc4KPWMFq8GGWFVDMshZOdHGdkvag==, tarball: https://registry.npmmirror.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.1.4.tgz}
|
resolution: {integrity: sha512-xzxF4ErcumXjO2Pvg/wVGrtr9QQJLk3IyQX1ddAC/fi6/5jZCZ9xpuL9Tzc4KPWMFq8GGWFVDMshZOdHGdkvag==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
@ -329,7 +329,7 @@ packages:
|
|||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@next/swc-win32-ia32-msvc@14.1.4:
|
/@next/swc-win32-ia32-msvc@14.1.4:
|
||||||
resolution: {integrity: sha512-WZiz8OdbkpRw6/IU/lredZWKKZopUMhcI2F+XiMAcPja0uZYdMTZQRoQ0WZcvinn9xZAidimE7tN9W5v9Yyfyw==, tarball: https://registry.npmmirror.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.1.4.tgz}
|
resolution: {integrity: sha512-WZiz8OdbkpRw6/IU/lredZWKKZopUMhcI2F+XiMAcPja0uZYdMTZQRoQ0WZcvinn9xZAidimE7tN9W5v9Yyfyw==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [ia32]
|
cpu: [ia32]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
@ -338,7 +338,7 @@ packages:
|
|||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@next/swc-win32-x64-msvc@14.1.4:
|
/@next/swc-win32-x64-msvc@14.1.4:
|
||||||
resolution: {integrity: sha512-4Rto21sPfw555sZ/XNLqfxDUNeLhNYGO2dlPqsnuCg8N8a2a9u1ltqBOPQ4vj1Gf7eJC0W2hHG2eYUHuiXgY2w==, tarball: https://registry.npmmirror.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.1.4.tgz}
|
resolution: {integrity: sha512-4Rto21sPfw555sZ/XNLqfxDUNeLhNYGO2dlPqsnuCg8N8a2a9u1ltqBOPQ4vj1Gf7eJC0W2hHG2eYUHuiXgY2w==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
@ -368,7 +368,7 @@ packages:
|
|||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@pkgjs/parseargs@0.11.0:
|
/@pkgjs/parseargs@0.11.0:
|
||||||
resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==, tarball: https://registry.npmmirror.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz}
|
resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==}
|
||||||
engines: {node: '>=14'}
|
engines: {node: '>=14'}
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
dev: true
|
dev: true
|
||||||
@ -436,7 +436,7 @@ packages:
|
|||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@swagger-api/apidom-ns-asyncapi-2@0.98.0:
|
/@swagger-api/apidom-ns-asyncapi-2@0.98.0:
|
||||||
resolution: {integrity: sha512-3oXGYjNL60S+wKIOM7NGxoWpISAs9/mpXTOEtEBGwPy2LZ4HQ/DpAmkQJq5FUH3ChJDDkiWPR24jfBQDSIsLqw==, tarball: https://registry.npmmirror.com/@swagger-api/apidom-ns-asyncapi-2/-/apidom-ns-asyncapi-2-0.98.0.tgz}
|
resolution: {integrity: sha512-3oXGYjNL60S+wKIOM7NGxoWpISAs9/mpXTOEtEBGwPy2LZ4HQ/DpAmkQJq5FUH3ChJDDkiWPR24jfBQDSIsLqw==}
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/runtime-corejs3': 7.24.1
|
'@babel/runtime-corejs3': 7.24.1
|
||||||
@ -492,7 +492,7 @@ packages:
|
|||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@swagger-api/apidom-ns-openapi-2@0.98.0:
|
/@swagger-api/apidom-ns-openapi-2@0.98.0:
|
||||||
resolution: {integrity: sha512-AOZIUfRFwUN4ujb6BiFH16h8QEb93/ZDh7R5ly6lnKBsXhD/l8KgQFwZAB4PsGDJ1no6KlTWL1F0O3ucSv2cmQ==, tarball: https://registry.npmmirror.com/@swagger-api/apidom-ns-openapi-2/-/apidom-ns-openapi-2-0.98.0.tgz}
|
resolution: {integrity: sha512-AOZIUfRFwUN4ujb6BiFH16h8QEb93/ZDh7R5ly6lnKBsXhD/l8KgQFwZAB4PsGDJ1no6KlTWL1F0O3ucSv2cmQ==}
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/runtime-corejs3': 7.24.1
|
'@babel/runtime-corejs3': 7.24.1
|
||||||
@ -533,7 +533,7 @@ packages:
|
|||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@swagger-api/apidom-ns-workflows-1@0.98.0:
|
/@swagger-api/apidom-ns-workflows-1@0.98.0:
|
||||||
resolution: {integrity: sha512-jaJYpBHKcX+Sz8f3QGFEM6jYzSKOJTKNrfqwNBLkOwa1AZrMwiofqGhjAiz5HHFNkfYJdR6LQmSU4sq24IamHw==, tarball: https://registry.npmmirror.com/@swagger-api/apidom-ns-workflows-1/-/apidom-ns-workflows-1-0.98.0.tgz}
|
resolution: {integrity: sha512-jaJYpBHKcX+Sz8f3QGFEM6jYzSKOJTKNrfqwNBLkOwa1AZrMwiofqGhjAiz5HHFNkfYJdR6LQmSU4sq24IamHw==}
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/runtime-corejs3': 7.24.1
|
'@babel/runtime-corejs3': 7.24.1
|
||||||
@ -547,7 +547,7 @@ packages:
|
|||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@swagger-api/apidom-parser-adapter-api-design-systems-json@0.98.0:
|
/@swagger-api/apidom-parser-adapter-api-design-systems-json@0.98.0:
|
||||||
resolution: {integrity: sha512-gfQmKNexWhDN3uOuc8NUt5wXGRFzwdNYeEYyEVPFO0+Nbs8qrdqmfgiuXgpvEDXkDJZiIug4zPMC2Q1XiB7zMA==, tarball: https://registry.npmmirror.com/@swagger-api/apidom-parser-adapter-api-design-systems-json/-/apidom-parser-adapter-api-design-systems-json-0.98.0.tgz}
|
resolution: {integrity: sha512-gfQmKNexWhDN3uOuc8NUt5wXGRFzwdNYeEYyEVPFO0+Nbs8qrdqmfgiuXgpvEDXkDJZiIug4zPMC2Q1XiB7zMA==}
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/runtime-corejs3': 7.24.1
|
'@babel/runtime-corejs3': 7.24.1
|
||||||
@ -561,7 +561,7 @@ packages:
|
|||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@swagger-api/apidom-parser-adapter-api-design-systems-yaml@0.98.0:
|
/@swagger-api/apidom-parser-adapter-api-design-systems-yaml@0.98.0:
|
||||||
resolution: {integrity: sha512-U8zhua172l2CKh200rVKPwounwGDr6DEzi0BaA31pTcel8e2jwmEkGTJ4PdO1aCHN1cDYVYXMGyEf67gOoo/kg==, tarball: https://registry.npmmirror.com/@swagger-api/apidom-parser-adapter-api-design-systems-yaml/-/apidom-parser-adapter-api-design-systems-yaml-0.98.0.tgz}
|
resolution: {integrity: sha512-U8zhua172l2CKh200rVKPwounwGDr6DEzi0BaA31pTcel8e2jwmEkGTJ4PdO1aCHN1cDYVYXMGyEf67gOoo/kg==}
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/runtime-corejs3': 7.24.1
|
'@babel/runtime-corejs3': 7.24.1
|
||||||
@ -575,7 +575,7 @@ packages:
|
|||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@swagger-api/apidom-parser-adapter-asyncapi-json-2@0.98.0:
|
/@swagger-api/apidom-parser-adapter-asyncapi-json-2@0.98.0:
|
||||||
resolution: {integrity: sha512-4mV0Ja+r2s5WAqJyZJHtQsNhyR2x8J+fYhcmuBHcqZp3sokzTObAAImsIdZ1zYdFYrrZgymD4GMk4RoLbJM3FQ==, tarball: https://registry.npmmirror.com/@swagger-api/apidom-parser-adapter-asyncapi-json-2/-/apidom-parser-adapter-asyncapi-json-2-0.98.0.tgz}
|
resolution: {integrity: sha512-4mV0Ja+r2s5WAqJyZJHtQsNhyR2x8J+fYhcmuBHcqZp3sokzTObAAImsIdZ1zYdFYrrZgymD4GMk4RoLbJM3FQ==}
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/runtime-corejs3': 7.24.1
|
'@babel/runtime-corejs3': 7.24.1
|
||||||
@ -589,7 +589,7 @@ packages:
|
|||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@swagger-api/apidom-parser-adapter-asyncapi-yaml-2@0.98.0:
|
/@swagger-api/apidom-parser-adapter-asyncapi-yaml-2@0.98.0:
|
||||||
resolution: {integrity: sha512-FLb5IUVhOdhRSfi2OnpOWxiB7CVZXrqG1rSniOWQ4fjeQ7urB5NJv6p2nbC9waduHA0B0mItiO1ijvbOFf0Dcw==, tarball: https://registry.npmmirror.com/@swagger-api/apidom-parser-adapter-asyncapi-yaml-2/-/apidom-parser-adapter-asyncapi-yaml-2-0.98.0.tgz}
|
resolution: {integrity: sha512-FLb5IUVhOdhRSfi2OnpOWxiB7CVZXrqG1rSniOWQ4fjeQ7urB5NJv6p2nbC9waduHA0B0mItiO1ijvbOFf0Dcw==}
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/runtime-corejs3': 7.24.1
|
'@babel/runtime-corejs3': 7.24.1
|
||||||
@ -603,7 +603,7 @@ packages:
|
|||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@swagger-api/apidom-parser-adapter-json@0.98.0:
|
/@swagger-api/apidom-parser-adapter-json@0.98.0:
|
||||||
resolution: {integrity: sha512-tZkL4sZ5JsICnhYGTeCApHRbfyAkjydb5h+OOE+MAEajRxi/PWklFDGiU7viScPWWE9cPnzRqtp8M0RutmHJew==, tarball: https://registry.npmmirror.com/@swagger-api/apidom-parser-adapter-json/-/apidom-parser-adapter-json-0.98.0.tgz}
|
resolution: {integrity: sha512-tZkL4sZ5JsICnhYGTeCApHRbfyAkjydb5h+OOE+MAEajRxi/PWklFDGiU7viScPWWE9cPnzRqtp8M0RutmHJew==}
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/runtime-corejs3': 7.24.1
|
'@babel/runtime-corejs3': 7.24.1
|
||||||
@ -620,7 +620,7 @@ packages:
|
|||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@swagger-api/apidom-parser-adapter-openapi-json-2@0.98.0:
|
/@swagger-api/apidom-parser-adapter-openapi-json-2@0.98.0:
|
||||||
resolution: {integrity: sha512-81M0Z0N0oWCiUy251IIewm9YwKDFyR84XccrHnIIf/aWuikU2IRr5fDonxweIPuDYybKdpia8lca0GG/iI6G3g==, tarball: https://registry.npmmirror.com/@swagger-api/apidom-parser-adapter-openapi-json-2/-/apidom-parser-adapter-openapi-json-2-0.98.0.tgz}
|
resolution: {integrity: sha512-81M0Z0N0oWCiUy251IIewm9YwKDFyR84XccrHnIIf/aWuikU2IRr5fDonxweIPuDYybKdpia8lca0GG/iI6G3g==}
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/runtime-corejs3': 7.24.1
|
'@babel/runtime-corejs3': 7.24.1
|
||||||
@ -634,7 +634,7 @@ packages:
|
|||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@swagger-api/apidom-parser-adapter-openapi-json-3-0@0.98.0:
|
/@swagger-api/apidom-parser-adapter-openapi-json-3-0@0.98.0:
|
||||||
resolution: {integrity: sha512-mfvj3f75CYAUtslv5ildHllGl8ZWpuge9alTcjxtwIGUu85oXdQ6yv7EExWHe2icZ3w+VY12VzwMbpEumx6k/Q==, tarball: https://registry.npmmirror.com/@swagger-api/apidom-parser-adapter-openapi-json-3-0/-/apidom-parser-adapter-openapi-json-3-0-0.98.0.tgz}
|
resolution: {integrity: sha512-mfvj3f75CYAUtslv5ildHllGl8ZWpuge9alTcjxtwIGUu85oXdQ6yv7EExWHe2icZ3w+VY12VzwMbpEumx6k/Q==}
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/runtime-corejs3': 7.24.1
|
'@babel/runtime-corejs3': 7.24.1
|
||||||
@ -648,7 +648,7 @@ packages:
|
|||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@swagger-api/apidom-parser-adapter-openapi-json-3-1@0.98.0:
|
/@swagger-api/apidom-parser-adapter-openapi-json-3-1@0.98.0:
|
||||||
resolution: {integrity: sha512-HzlF/G+tygojw8UswwdLptDUBGhp9d+nGzADG2j+M1onBrw35/jdRPtX4S2KQ8mmwyEEgHlRENhv7yndvCbvPg==, tarball: https://registry.npmmirror.com/@swagger-api/apidom-parser-adapter-openapi-json-3-1/-/apidom-parser-adapter-openapi-json-3-1-0.98.0.tgz}
|
resolution: {integrity: sha512-HzlF/G+tygojw8UswwdLptDUBGhp9d+nGzADG2j+M1onBrw35/jdRPtX4S2KQ8mmwyEEgHlRENhv7yndvCbvPg==}
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/runtime-corejs3': 7.24.1
|
'@babel/runtime-corejs3': 7.24.1
|
||||||
@ -662,7 +662,7 @@ packages:
|
|||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@swagger-api/apidom-parser-adapter-openapi-yaml-2@0.98.0:
|
/@swagger-api/apidom-parser-adapter-openapi-yaml-2@0.98.0:
|
||||||
resolution: {integrity: sha512-FzQNMk6gDUSp2PLtMKhnDF6MFk0T7y6ewPrYk0ztcul+m6YQD4pdcUXhpXcwtfy9dspJQERF7UKuaK9dZsm8BQ==, tarball: https://registry.npmmirror.com/@swagger-api/apidom-parser-adapter-openapi-yaml-2/-/apidom-parser-adapter-openapi-yaml-2-0.98.0.tgz}
|
resolution: {integrity: sha512-FzQNMk6gDUSp2PLtMKhnDF6MFk0T7y6ewPrYk0ztcul+m6YQD4pdcUXhpXcwtfy9dspJQERF7UKuaK9dZsm8BQ==}
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/runtime-corejs3': 7.24.1
|
'@babel/runtime-corejs3': 7.24.1
|
||||||
@ -676,7 +676,7 @@ packages:
|
|||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@swagger-api/apidom-parser-adapter-openapi-yaml-3-0@0.98.0:
|
/@swagger-api/apidom-parser-adapter-openapi-yaml-3-0@0.98.0:
|
||||||
resolution: {integrity: sha512-H1EYjBDeKx0WiPqsrUkb+Zlm59rqbtQb6w+SAdkw4PBHi0+yOgOlvUrIkTYEVy8BD6he01dbMocv+EDXpd9rww==, tarball: https://registry.npmmirror.com/@swagger-api/apidom-parser-adapter-openapi-yaml-3-0/-/apidom-parser-adapter-openapi-yaml-3-0-0.98.0.tgz}
|
resolution: {integrity: sha512-H1EYjBDeKx0WiPqsrUkb+Zlm59rqbtQb6w+SAdkw4PBHi0+yOgOlvUrIkTYEVy8BD6he01dbMocv+EDXpd9rww==}
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/runtime-corejs3': 7.24.1
|
'@babel/runtime-corejs3': 7.24.1
|
||||||
@ -690,7 +690,7 @@ packages:
|
|||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@swagger-api/apidom-parser-adapter-openapi-yaml-3-1@0.98.0:
|
/@swagger-api/apidom-parser-adapter-openapi-yaml-3-1@0.98.0:
|
||||||
resolution: {integrity: sha512-sxnAJDg0TGK0T4HwtkE1mkfQWL564UGlgvU+gfrEmOLjsfqRDrlFfffYKguqtJdz17+HgUp78Sqj6Ey48J83Jw==, tarball: https://registry.npmmirror.com/@swagger-api/apidom-parser-adapter-openapi-yaml-3-1/-/apidom-parser-adapter-openapi-yaml-3-1-0.98.0.tgz}
|
resolution: {integrity: sha512-sxnAJDg0TGK0T4HwtkE1mkfQWL564UGlgvU+gfrEmOLjsfqRDrlFfffYKguqtJdz17+HgUp78Sqj6Ey48J83Jw==}
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/runtime-corejs3': 7.24.1
|
'@babel/runtime-corejs3': 7.24.1
|
||||||
@ -704,7 +704,7 @@ packages:
|
|||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@swagger-api/apidom-parser-adapter-workflows-json-1@0.98.0:
|
/@swagger-api/apidom-parser-adapter-workflows-json-1@0.98.0:
|
||||||
resolution: {integrity: sha512-XroOfEPbs6Ogl4pSZGQ4yctu4OsMQw5qvnVTFS3hCr+fHQXFIaD+remFRjHQRqhyVC0FDmw0mggWubcSosiyCg==, tarball: https://registry.npmmirror.com/@swagger-api/apidom-parser-adapter-workflows-json-1/-/apidom-parser-adapter-workflows-json-1-0.98.0.tgz}
|
resolution: {integrity: sha512-XroOfEPbs6Ogl4pSZGQ4yctu4OsMQw5qvnVTFS3hCr+fHQXFIaD+remFRjHQRqhyVC0FDmw0mggWubcSosiyCg==}
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/runtime-corejs3': 7.24.1
|
'@babel/runtime-corejs3': 7.24.1
|
||||||
@ -718,7 +718,7 @@ packages:
|
|||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@swagger-api/apidom-parser-adapter-workflows-yaml-1@0.98.0:
|
/@swagger-api/apidom-parser-adapter-workflows-yaml-1@0.98.0:
|
||||||
resolution: {integrity: sha512-9SG9g+raKEU8cpEVT7eYlHGUEWAB7DYm/oNN5k3i4hLbJUIYKrL4KAK1sRrfxrGRiCIJG/O/jw4NLcSVgLcVJQ==, tarball: https://registry.npmmirror.com/@swagger-api/apidom-parser-adapter-workflows-yaml-1/-/apidom-parser-adapter-workflows-yaml-1-0.98.0.tgz}
|
resolution: {integrity: sha512-9SG9g+raKEU8cpEVT7eYlHGUEWAB7DYm/oNN5k3i4hLbJUIYKrL4KAK1sRrfxrGRiCIJG/O/jw4NLcSVgLcVJQ==}
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/runtime-corejs3': 7.24.1
|
'@babel/runtime-corejs3': 7.24.1
|
||||||
@ -732,7 +732,7 @@ packages:
|
|||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@swagger-api/apidom-parser-adapter-yaml-1-2@0.98.0:
|
/@swagger-api/apidom-parser-adapter-yaml-1-2@0.98.0:
|
||||||
resolution: {integrity: sha512-pEIZblIK+/k9p6wge3z9uX1bVD7zzXhoxg3hgpClojZmmJV/jriDUmRzLO1MeqVbH+JFXE2FGFvE5D4CRFCEVw==, tarball: https://registry.npmmirror.com/@swagger-api/apidom-parser-adapter-yaml-1-2/-/apidom-parser-adapter-yaml-1-2-0.98.0.tgz}
|
resolution: {integrity: sha512-pEIZblIK+/k9p6wge3z9uX1bVD7zzXhoxg3hgpClojZmmJV/jriDUmRzLO1MeqVbH+JFXE2FGFvE5D4CRFCEVw==}
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/runtime-corejs3': 7.24.1
|
'@babel/runtime-corejs3': 7.24.1
|
||||||
@ -1239,7 +1239,7 @@ packages:
|
|||||||
engines: {node: '>=4'}
|
engines: {node: '>=4'}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/axios-cookiejar-support@5.0.0(axios@1.6.8)(tough-cookie@4.1.3):
|
/axios-cookiejar-support@5.0.0(axios@1.6.8)(tough-cookie@4.1.4):
|
||||||
resolution: {integrity: sha512-4zdO95qgsKp0OX+LUwD0MRWdD0r5YsQBpTi3ULHLL87qU58QZl3O3UQF58fZTzcdGtxYPtcotyXT7sNWDE37ug==, tarball: https://registry.npmmirror.com/axios-cookiejar-support/-/axios-cookiejar-support-5.0.0.tgz}
|
resolution: {integrity: sha512-4zdO95qgsKp0OX+LUwD0MRWdD0r5YsQBpTi3ULHLL87qU58QZl3O3UQF58fZTzcdGtxYPtcotyXT7sNWDE37ug==, tarball: https://registry.npmmirror.com/axios-cookiejar-support/-/axios-cookiejar-support-5.0.0.tgz}
|
||||||
engines: {node: '>=18.0.0'}
|
engines: {node: '>=18.0.0'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@ -1247,8 +1247,8 @@ packages:
|
|||||||
tough-cookie: '>=4.0.0'
|
tough-cookie: '>=4.0.0'
|
||||||
dependencies:
|
dependencies:
|
||||||
axios: 1.6.8
|
axios: 1.6.8
|
||||||
http-cookie-agent: 6.0.1(tough-cookie@4.1.3)
|
http-cookie-agent: 6.0.1(tough-cookie@4.1.4)
|
||||||
tough-cookie: 4.1.3
|
tough-cookie: 4.1.4
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- deasync
|
- deasync
|
||||||
- supports-color
|
- supports-color
|
||||||
@ -1494,7 +1494,7 @@ packages:
|
|||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/commander@9.5.0:
|
/commander@9.5.0:
|
||||||
resolution: {integrity: sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==, tarball: https://registry.npmmirror.com/commander/-/commander-9.5.0.tgz}
|
resolution: {integrity: sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==}
|
||||||
engines: {node: ^12.20.0 || >=14}
|
engines: {node: ^12.20.0 || >=14}
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
dev: false
|
dev: false
|
||||||
@ -1711,7 +1711,7 @@ packages:
|
|||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/emoji-regex@8.0.0:
|
/emoji-regex@8.0.0:
|
||||||
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==, tarball: https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz}
|
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/emoji-regex@9.2.2:
|
/emoji-regex@9.2.2:
|
||||||
@ -1856,7 +1856,7 @@ packages:
|
|||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/eslint-config-next@14.1.4(eslint@8.57.0)(typescript@5.4.3):
|
/eslint-config-next@14.1.4(eslint@8.57.0)(typescript@5.4.3):
|
||||||
resolution: {integrity: sha512-cihIahbhYAWwXJwZkAaRPpUi5t9aOi/HdfWXOjZeUOqNWXHD8X22kd1KG58Dc3MVaRx3HoR/oMGk2ltcrqDn8g==, tarball: https://registry.npmmirror.com/eslint-config-next/-/eslint-config-next-14.1.4.tgz}
|
resolution: {integrity: sha512-cihIahbhYAWwXJwZkAaRPpUi5t9aOi/HdfWXOjZeUOqNWXHD8X22kd1KG58Dc3MVaRx3HoR/oMGk2ltcrqDn8g==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint: ^7.23.0 || ^8.0.0
|
eslint: ^7.23.0 || ^8.0.0
|
||||||
typescript: '>=3.3.1'
|
typescript: '>=3.3.1'
|
||||||
@ -2053,7 +2053,7 @@ packages:
|
|||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/eslint@8.57.0:
|
/eslint@8.57.0:
|
||||||
resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==, tarball: https://registry.npmmirror.com/eslint/-/eslint-8.57.0.tgz}
|
resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==}
|
||||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -2310,7 +2310,7 @@ packages:
|
|||||||
resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==, tarball: https://registry.npmmirror.com/fs.realpath/-/fs.realpath-1.0.0.tgz}
|
resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==, tarball: https://registry.npmmirror.com/fs.realpath/-/fs.realpath-1.0.0.tgz}
|
||||||
|
|
||||||
/fsevents@2.3.3:
|
/fsevents@2.3.3:
|
||||||
resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==, tarball: https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz}
|
resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==}
|
||||||
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
|
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
|
||||||
os: [darwin]
|
os: [darwin]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
@ -2538,7 +2538,7 @@ packages:
|
|||||||
resolution: {integrity: sha512-/sXbVCWayk6GDVg3ctOX6nxaVj7So40FcFAnWlWGNAB1LpYKcV5Cd10APjPjW80O7zYW2MsjBV4zZ7IZO5fVow==, tarball: https://registry.npmmirror.com/html-url-attributes/-/html-url-attributes-3.0.0.tgz}
|
resolution: {integrity: sha512-/sXbVCWayk6GDVg3ctOX6nxaVj7So40FcFAnWlWGNAB1LpYKcV5Cd10APjPjW80O7zYW2MsjBV4zZ7IZO5fVow==, tarball: https://registry.npmmirror.com/html-url-attributes/-/html-url-attributes-3.0.0.tgz}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/http-cookie-agent@6.0.1(tough-cookie@4.1.3):
|
/http-cookie-agent@6.0.1(tough-cookie@4.1.4):
|
||||||
resolution: {integrity: sha512-AhPCqG7i3K8OVWORyuULoP7/Xv90wf14jBAKyLqjKpaJyGjutiwryYV+Lj1jqPYnQtbQFimwSaeY7NXw22TckQ==, tarball: https://registry.npmmirror.com/http-cookie-agent/-/http-cookie-agent-6.0.1.tgz}
|
resolution: {integrity: sha512-AhPCqG7i3K8OVWORyuULoP7/Xv90wf14jBAKyLqjKpaJyGjutiwryYV+Lj1jqPYnQtbQFimwSaeY7NXw22TckQ==, tarball: https://registry.npmmirror.com/http-cookie-agent/-/http-cookie-agent-6.0.1.tgz}
|
||||||
engines: {node: '>=18.0.0'}
|
engines: {node: '>=18.0.0'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@ -2552,7 +2552,7 @@ packages:
|
|||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
agent-base: 7.1.0
|
agent-base: 7.1.0
|
||||||
tough-cookie: 4.1.3
|
tough-cookie: 4.1.4
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
dev: false
|
dev: false
|
||||||
@ -2727,7 +2727,7 @@ packages:
|
|||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/is-fullwidth-code-point@3.0.0:
|
/is-fullwidth-code-point@3.0.0:
|
||||||
resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==, tarball: https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz}
|
resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==}
|
||||||
engines: {node: '>=8'}
|
engines: {node: '>=8'}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
@ -3644,7 +3644,7 @@ packages:
|
|||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/openapi-types@12.1.3:
|
/openapi-types@12.1.3:
|
||||||
resolution: {integrity: sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==, tarball: https://registry.npmmirror.com/openapi-types/-/openapi-types-12.1.3.tgz}
|
resolution: {integrity: sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/optionator@0.9.3:
|
/optionator@0.9.3:
|
||||||
@ -4551,7 +4551,7 @@ packages:
|
|||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/string-width@4.2.3:
|
/string-width@4.2.3:
|
||||||
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==, tarball: https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz}
|
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==}
|
||||||
engines: {node: '>=8'}
|
engines: {node: '>=8'}
|
||||||
dependencies:
|
dependencies:
|
||||||
emoji-regex: 8.0.0
|
emoji-regex: 8.0.0
|
||||||
@ -4902,8 +4902,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==, tarball: https://registry.npmmirror.com/toggle-selection/-/toggle-selection-1.0.6.tgz}
|
resolution: {integrity: sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==, tarball: https://registry.npmmirror.com/toggle-selection/-/toggle-selection-1.0.6.tgz}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/tough-cookie@4.1.3:
|
/tough-cookie@4.1.4:
|
||||||
resolution: {integrity: sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==, tarball: https://registry.npmmirror.com/tough-cookie/-/tough-cookie-4.1.3.tgz}
|
resolution: {integrity: sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==}
|
||||||
engines: {node: '>=6'}
|
engines: {node: '>=6'}
|
||||||
dependencies:
|
dependencies:
|
||||||
psl: 1.9.0
|
psl: 1.9.0
|
||||||
@ -5271,7 +5271,7 @@ packages:
|
|||||||
isexe: 2.0.0
|
isexe: 2.0.0
|
||||||
|
|
||||||
/wrap-ansi@7.0.0:
|
/wrap-ansi@7.0.0:
|
||||||
resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==, tarball: https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz}
|
resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==}
|
||||||
engines: {node: '>=10'}
|
engines: {node: '>=10'}
|
||||||
dependencies:
|
dependencies:
|
||||||
ansi-styles: 4.3.0
|
ansi-styles: 4.3.0
|
||||||
|
File diff suppressed because one or more lines are too long
58
src/app/api/clip/route.ts
Normal file
58
src/app/api/clip/route.ts
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
import { NextResponse, NextRequest } from "next/server";
|
||||||
|
import { sunoApi } from "@/lib/SunoApi";
|
||||||
|
import { corsHeaders } from "@/lib/utils";
|
||||||
|
|
||||||
|
export const dynamic = "force-dynamic";
|
||||||
|
|
||||||
|
export async function GET(req: NextRequest) {
|
||||||
|
if (req.method === 'GET') {
|
||||||
|
try {
|
||||||
|
const url = new URL(req.url);
|
||||||
|
const clipId = url.searchParams.get('id');
|
||||||
|
if (clipId == null) {
|
||||||
|
return new NextResponse(JSON.stringify({ error: 'Missing parameter id' }), {
|
||||||
|
status: 400,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
...corsHeaders
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const audioInfo = await (await sunoApi).getClip(clipId);
|
||||||
|
|
||||||
|
return new NextResponse(JSON.stringify(audioInfo), {
|
||||||
|
status: 200,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
...corsHeaders
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error fetching audio:', error);
|
||||||
|
|
||||||
|
return new NextResponse(JSON.stringify({ error: 'Internal server error' }), {
|
||||||
|
status: 500,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
...corsHeaders
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return new NextResponse('Method Not Allowed', {
|
||||||
|
headers: {
|
||||||
|
Allow: 'GET',
|
||||||
|
...corsHeaders
|
||||||
|
},
|
||||||
|
status: 405
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function OPTIONS(request: Request) {
|
||||||
|
return new Response(null, {
|
||||||
|
status: 200,
|
||||||
|
headers: corsHeaders
|
||||||
|
});
|
||||||
|
}
|
64
src/app/api/concat/route.ts
Normal file
64
src/app/api/concat/route.ts
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
import { NextResponse, NextRequest } from "next/server";
|
||||||
|
import { sunoApi } from "@/lib/SunoApi";
|
||||||
|
import { corsHeaders } from "@/lib/utils";
|
||||||
|
|
||||||
|
export const dynamic = "force-dynamic";
|
||||||
|
|
||||||
|
export async function POST(req: NextRequest) {
|
||||||
|
if (req.method === 'POST') {
|
||||||
|
try {
|
||||||
|
const body = await req.json();
|
||||||
|
const { clip_id } = body;
|
||||||
|
if (!clip_id) {
|
||||||
|
return new NextResponse(JSON.stringify({ error: 'Clip id is required' }), {
|
||||||
|
status: 400,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
...corsHeaders
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const audioInfo = await (await sunoApi).concatenate(clip_id);
|
||||||
|
return new NextResponse(JSON.stringify(audioInfo), {
|
||||||
|
status: 200,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
...corsHeaders
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} catch (error: any) {
|
||||||
|
console.error('Error generating concatenating audio:', error.response.data);
|
||||||
|
if (error.response.status === 402) {
|
||||||
|
return new NextResponse(JSON.stringify({ error: error.response.data.detail }), {
|
||||||
|
status: 402,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
...corsHeaders
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return new NextResponse(JSON.stringify({ error: 'Internal server error' }), {
|
||||||
|
status: 500,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
...corsHeaders
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return new NextResponse('Method Not Allowed', {
|
||||||
|
headers: {
|
||||||
|
Allow: 'POST',
|
||||||
|
...corsHeaders
|
||||||
|
},
|
||||||
|
status: 405
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function OPTIONS(request: Request) {
|
||||||
|
return new Response(null, {
|
||||||
|
status: 200,
|
||||||
|
headers: corsHeaders
|
||||||
|
});
|
||||||
|
}
|
@ -1,14 +1,15 @@
|
|||||||
import { NextResponse, NextRequest } from "next/server";
|
import { NextResponse, NextRequest } from "next/server";
|
||||||
import { sunoApi } from "@/lib/SunoApi";
|
import { DEFAULT_MODEL, sunoApi } from "@/lib/SunoApi";
|
||||||
import { corsHeaders } from "@/lib/utils";
|
import { corsHeaders } from "@/lib/utils";
|
||||||
|
|
||||||
|
export const maxDuration = 60; // allow longer timeout for wait_audio == true
|
||||||
export const dynamic = "force-dynamic";
|
export const dynamic = "force-dynamic";
|
||||||
|
|
||||||
export async function POST(req: NextRequest) {
|
export async function POST(req: NextRequest) {
|
||||||
if (req.method === 'POST') {
|
if (req.method === 'POST') {
|
||||||
try {
|
try {
|
||||||
const body = await req.json();
|
const body = await req.json();
|
||||||
const { prompt, tags, title, make_instrumental, wait_audio } = body;
|
const { prompt, tags, title, make_instrumental, model, wait_audio } = body;
|
||||||
if (!prompt || !tags || !title) {
|
if (!prompt || !tags || !title) {
|
||||||
return new NextResponse(JSON.stringify({ error: 'Prompt, tags, and title are required' }), {
|
return new NextResponse(JSON.stringify({ error: 'Prompt, tags, and title are required' }), {
|
||||||
status: 400,
|
status: 400,
|
||||||
@ -21,6 +22,7 @@ export async function POST(req: NextRequest) {
|
|||||||
const audioInfo = await (await sunoApi).custom_generate(
|
const audioInfo = await (await sunoApi).custom_generate(
|
||||||
prompt, tags, title,
|
prompt, tags, title,
|
||||||
make_instrumental == true,
|
make_instrumental == true,
|
||||||
|
model || DEFAULT_MODEL,
|
||||||
wait_audio == true
|
wait_audio == true
|
||||||
);
|
);
|
||||||
return new NextResponse(JSON.stringify(audioInfo), {
|
return new NextResponse(JSON.stringify(audioInfo), {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { NextResponse, NextRequest } from "next/server";
|
import { NextResponse, NextRequest } from "next/server";
|
||||||
import { sunoApi } from "@/lib/SunoApi";
|
import { DEFAULT_MODEL, sunoApi } from "@/lib/SunoApi";
|
||||||
import { corsHeaders } from "@/lib/utils";
|
import { corsHeaders } from "@/lib/utils";
|
||||||
|
|
||||||
export const dynamic = "force-dynamic";
|
export const dynamic = "force-dynamic";
|
||||||
@ -8,8 +8,7 @@ export async function POST(req: NextRequest) {
|
|||||||
if (req.method === 'POST') {
|
if (req.method === 'POST') {
|
||||||
try {
|
try {
|
||||||
const body = await req.json();
|
const body = await req.json();
|
||||||
const { audio_id, prompt, continue_at, tags, title } = body;
|
const { audio_id, prompt, continue_at, tags, title, model } = body;
|
||||||
console.log(body)
|
|
||||||
|
|
||||||
if (!audio_id) {
|
if (!audio_id) {
|
||||||
return new NextResponse(JSON.stringify({ error: 'Audio ID is required' }), {
|
return new NextResponse(JSON.stringify({ error: 'Audio ID is required' }), {
|
||||||
@ -22,7 +21,7 @@ export async function POST(req: NextRequest) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const audioInfo = await (await sunoApi)
|
const audioInfo = await (await sunoApi)
|
||||||
.extendAudio(audio_id, prompt, continue_at, tags, title);
|
.extendAudio(audio_id, prompt, continue_at, tags, title, model || DEFAULT_MODEL);
|
||||||
|
|
||||||
return new NextResponse(JSON.stringify(audioInfo), {
|
return new NextResponse(JSON.stringify(audioInfo), {
|
||||||
status: 200,
|
status: 200,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { NextResponse, NextRequest } from "next/server";
|
import { NextResponse, NextRequest } from "next/server";
|
||||||
import { sunoApi } from "@/lib/SunoApi";
|
import { DEFAULT_MODEL, sunoApi } from "@/lib/SunoApi";
|
||||||
import { corsHeaders } from "@/lib/utils";
|
import { corsHeaders } from "@/lib/utils";
|
||||||
|
|
||||||
export const dynamic = "force-dynamic";
|
export const dynamic = "force-dynamic";
|
||||||
@ -8,7 +8,7 @@ export async function POST(req: NextRequest) {
|
|||||||
if (req.method === 'POST') {
|
if (req.method === 'POST') {
|
||||||
try {
|
try {
|
||||||
const body = await req.json();
|
const body = await req.json();
|
||||||
const { prompt, make_instrumental, wait_audio } = body;
|
const { prompt, make_instrumental, model, wait_audio } = body;
|
||||||
|
|
||||||
if (!prompt) {
|
if (!prompt) {
|
||||||
return new NextResponse(JSON.stringify({ error: 'Prompt is required' }), {
|
return new NextResponse(JSON.stringify({ error: 'Prompt is required' }), {
|
||||||
@ -20,7 +20,12 @@ export async function POST(req: NextRequest) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const audioInfo = await (await sunoApi).generate(prompt, make_instrumental == true, wait_audio == true);
|
const audioInfo = await (await sunoApi).generate(
|
||||||
|
prompt,
|
||||||
|
make_instrumental == true,
|
||||||
|
model || DEFAULT_MODEL,
|
||||||
|
wait_audio == true
|
||||||
|
);
|
||||||
|
|
||||||
return new NextResponse(JSON.stringify(audioInfo), {
|
return new NextResponse(JSON.stringify(audioInfo), {
|
||||||
status: 200,
|
status: 200,
|
||||||
|
@ -29,6 +29,8 @@ export default function Docs() {
|
|||||||
ids. If no IDs are provided, all music will be returned.
|
ids. If no IDs are provided, all music will be returned.
|
||||||
- \`/api/get_limit\`: Get quota Info
|
- \`/api/get_limit\`: Get quota Info
|
||||||
- \`/api/extend_audio\`: Extend audio length
|
- \`/api/extend_audio\`: Extend audio length
|
||||||
|
- \`/api/clip\`: Get clip information based on ID passed as query parameter \`id\`
|
||||||
|
- \`/api/concat\`: Generate the whole song from extensions
|
||||||
\`\`\`
|
\`\`\`
|
||||||
|
|
||||||
Feel free to explore the detailed API parameters and conduct tests on this page.
|
Feel free to explore the detailed API parameters and conduct tests on this page.
|
||||||
|
@ -33,6 +33,11 @@
|
|||||||
"description": "Whether to generate instrumental music",
|
"description": "Whether to generate instrumental music",
|
||||||
"example": "false"
|
"example": "false"
|
||||||
},
|
},
|
||||||
|
"model": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Model name ,default is chirp-v3-5",
|
||||||
|
"example": "chirp-v3-5|chirp-v3-0"
|
||||||
|
},
|
||||||
"wait_audio": {
|
"wait_audio": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "Whether to wait for music generation, default is false, directly return audio task information; set to true, will wait for up to 100s until the audio is generated.",
|
"description": "Whether to wait for music generation, default is false, directly return audio task information; set to true, will wait for up to 100s until the audio is generated.",
|
||||||
@ -79,7 +84,7 @@
|
|||||||
"application/json": {
|
"application/json": {
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["prompt", "make_instrumental", "wait_audio"],
|
"required": ["prompt"],
|
||||||
"properties": {
|
"properties": {
|
||||||
"prompt": {
|
"prompt": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@ -143,6 +148,11 @@
|
|||||||
"description": "Whether to generate instrumental music",
|
"description": "Whether to generate instrumental music",
|
||||||
"example": "false"
|
"example": "false"
|
||||||
},
|
},
|
||||||
|
"model": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Model name ,default is chirp-v3-5",
|
||||||
|
"example": "chirp-v3-5|chirp-v3-0"
|
||||||
|
},
|
||||||
"wait_audio": {
|
"wait_audio": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "Whether to wait for music generation, default is false, directly return audio task information; set to true, will wait for up to 100s until the audio is generated.",
|
"description": "Whether to wait for music generation, default is false, directly return audio task information; set to true, will wait for up to 100s until the audio is generated.",
|
||||||
@ -199,7 +209,7 @@
|
|||||||
"prompt": {
|
"prompt": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Detailed prompt, including information such as music lyrics.",
|
"description": "Detailed prompt, including information such as music lyrics.",
|
||||||
"example": ""
|
"example": "[lrc]Silent battlegrounds, no birds' song\nShadows of war, where we don't belong\nMay flowers of peace bloom in this place\nLet's guard this precious dream with grace\n[endlrc]"
|
||||||
},
|
},
|
||||||
"continue_at": {
|
"continue_at": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@ -215,6 +225,11 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Music genre",
|
"description": "Music genre",
|
||||||
"example": ""
|
"example": ""
|
||||||
|
},
|
||||||
|
"model": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Model name ,default is chirp-v3-5",
|
||||||
|
"example": "chirp-v3-5|chirp-v3-0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -357,6 +372,151 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"/api/clip": {
|
||||||
|
"get": {
|
||||||
|
"summary": "Get clip information based on ID.",
|
||||||
|
"description": "Retrieve specific clip information using the provided clip ID as a query parameter.",
|
||||||
|
"tags": ["default"],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"in": "query",
|
||||||
|
"required": true,
|
||||||
|
"description": "Clip ID",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "success",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/audio_info"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Missing parameter id",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"error": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "Missing parameter id"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Internal server error",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"error": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "Internal server error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/api/concat": {
|
||||||
|
"post": {
|
||||||
|
"summary": "Generate the whole song from extensions.",
|
||||||
|
"description": "Concatenate audio clips to generate a complete song using the provided clip ID.",
|
||||||
|
"tags": ["default"],
|
||||||
|
"requestBody": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"required": ["clip_id"],
|
||||||
|
"properties": {
|
||||||
|
"clip_id": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Clip ID"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "success",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/audio_info"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Clip id is required",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"error": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "Clip id is required"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"402": {
|
||||||
|
"description": "Payment required",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"error": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "Payment required"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Internal server error",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"error": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "Internal server error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"components": {
|
"components": {
|
||||||
|
@ -106,6 +106,7 @@ Suno API currently mainly implements the following APIs:
|
|||||||
- \`/api/get?ids=\`: Get music Info by id, separate multiple id with ",".
|
- \`/api/get?ids=\`: Get music Info by id, separate multiple id with ",".
|
||||||
- \`/api/get_limit\`: Get quota Info
|
- \`/api/get_limit\`: Get quota Info
|
||||||
- \`/api/extend_audio\`: Extend audio length
|
- \`/api/extend_audio\`: Extend audio length
|
||||||
|
- \`/api/concat\`: Generate the whole song from extensions
|
||||||
\`\`\`
|
\`\`\`
|
||||||
|
|
||||||
For more detailed documentation, please check out the demo site:
|
For more detailed documentation, please check out the demo site:
|
||||||
|
@ -6,6 +6,7 @@ import { CookieJar } from "tough-cookie";
|
|||||||
import { sleep } from "@/lib/utils";
|
import { sleep } from "@/lib/utils";
|
||||||
|
|
||||||
const logger = pino();
|
const logger = pino();
|
||||||
|
export const DEFAULT_MODEL = "chirp-v3-5";
|
||||||
|
|
||||||
|
|
||||||
export interface AudioInfo {
|
export interface AudioInfo {
|
||||||
@ -23,6 +24,7 @@ export interface AudioInfo {
|
|||||||
type?: string;
|
type?: string;
|
||||||
tags?: string; // Genre of music.
|
tags?: string; // Genre of music.
|
||||||
duration?: string; // Duration of the audio
|
duration?: string; // Duration of the audio
|
||||||
|
error_message?: string; // Error message if any
|
||||||
}
|
}
|
||||||
|
|
||||||
class SunoApi {
|
class SunoApi {
|
||||||
@ -63,7 +65,7 @@ class SunoApi {
|
|||||||
*/
|
*/
|
||||||
private async getAuthToken() {
|
private async getAuthToken() {
|
||||||
// URL to get session ID
|
// URL to get session ID
|
||||||
const getSessionUrl = `${SunoApi.CLERK_BASE_URL}/v1/client?_clerk_js_version=4.72.1`;
|
const getSessionUrl = `${SunoApi.CLERK_BASE_URL}/v1/client?_clerk_js_version=4.73.2`;
|
||||||
// Get session ID
|
// Get session ID
|
||||||
const sessionResponse = await this.client.get(getSessionUrl);
|
const sessionResponse = await this.client.get(getSessionUrl);
|
||||||
if (!sessionResponse?.data?.response?.['last_active_session_id']) {
|
if (!sessionResponse?.data?.response?.['last_active_session_id']) {
|
||||||
@ -82,7 +84,7 @@ class SunoApi {
|
|||||||
throw new Error("Session ID is not set. Cannot renew token.");
|
throw new Error("Session ID is not set. Cannot renew token.");
|
||||||
}
|
}
|
||||||
// URL to renew session token
|
// URL to renew session token
|
||||||
const renewUrl = `${SunoApi.CLERK_BASE_URL}/v1/client/sessions/${this.sid}/tokens?_clerk_js_version=4.72.0-snapshot.vc141245`;
|
const renewUrl = `${SunoApi.CLERK_BASE_URL}/v1/client/sessions/${this.sid}/tokens?_clerk_js_version==4.73.2`;
|
||||||
// Renew session token
|
// Renew session token
|
||||||
const renewResponse = await this.client.post(renewUrl);
|
const renewResponse = await this.client.post(renewUrl);
|
||||||
logger.info("KeepAlive...\n");
|
logger.info("KeepAlive...\n");
|
||||||
@ -90,7 +92,6 @@ class SunoApi {
|
|||||||
await sleep(1, 2);
|
await sleep(1, 2);
|
||||||
}
|
}
|
||||||
const newToken = renewResponse.data['jwt'];
|
const newToken = renewResponse.data['jwt'];
|
||||||
console.log("newToken:===\n\n", newToken);
|
|
||||||
// Update Authorization field in request header with the new JWT token
|
// Update Authorization field in request header with the new JWT token
|
||||||
this.currentToken = newToken;
|
this.currentToken = newToken;
|
||||||
}
|
}
|
||||||
@ -105,17 +106,42 @@ class SunoApi {
|
|||||||
public async generate(
|
public async generate(
|
||||||
prompt: string,
|
prompt: string,
|
||||||
make_instrumental: boolean = false,
|
make_instrumental: boolean = false,
|
||||||
|
model?: string,
|
||||||
wait_audio: boolean = false,
|
wait_audio: boolean = false,
|
||||||
|
|
||||||
): Promise<AudioInfo[]> {
|
): Promise<AudioInfo[]> {
|
||||||
await this.keepAlive(false);
|
await this.keepAlive(false);
|
||||||
const startTime = Date.now();
|
const startTime = Date.now();
|
||||||
const audios = this.generateSongs(prompt, false, undefined, undefined, make_instrumental, wait_audio);
|
const audios = this.generateSongs(prompt, false, undefined, undefined, make_instrumental, model, wait_audio);
|
||||||
const costTime = Date.now() - startTime;
|
const costTime = Date.now() - startTime;
|
||||||
logger.info("Generate Response:\n" + JSON.stringify(audios, null, 2));
|
logger.info("Generate Response:\n" + JSON.stringify(audios, null, 2));
|
||||||
logger.info("Cost time: " + costTime);
|
logger.info("Cost time: " + costTime);
|
||||||
return audios;
|
return audios;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calls the concatenate endpoint for a clip to generate the whole song.
|
||||||
|
* @param clip_id The ID of the audio clip to concatenate.
|
||||||
|
* @returns A promise that resolves to an AudioInfo object representing the concatenated audio.
|
||||||
|
* @throws Error if the response status is not 200.
|
||||||
|
*/
|
||||||
|
public async concatenate(clip_id: string): Promise<AudioInfo> {
|
||||||
|
await this.keepAlive(false);
|
||||||
|
const payload: any = { clip_id: clip_id };
|
||||||
|
|
||||||
|
const response = await this.client.post(
|
||||||
|
`${SunoApi.BASE_URL}/api/generate/concat/v2/`,
|
||||||
|
payload,
|
||||||
|
{
|
||||||
|
timeout: 10000, // 10 seconds timeout
|
||||||
|
},
|
||||||
|
);
|
||||||
|
if (response.status !== 200) {
|
||||||
|
throw new Error("Error response:" + response.statusText);
|
||||||
|
}
|
||||||
|
return response.data;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates custom audio based on provided parameters.
|
* Generates custom audio based on provided parameters.
|
||||||
*
|
*
|
||||||
@ -131,10 +157,11 @@ class SunoApi {
|
|||||||
tags: string,
|
tags: string,
|
||||||
title: string,
|
title: string,
|
||||||
make_instrumental: boolean = false,
|
make_instrumental: boolean = false,
|
||||||
|
model?: string,
|
||||||
wait_audio: boolean = false,
|
wait_audio: boolean = false,
|
||||||
): Promise<AudioInfo[]> {
|
): Promise<AudioInfo[]> {
|
||||||
const startTime = Date.now();
|
const startTime = Date.now();
|
||||||
const audios = await this.generateSongs(prompt, true, tags, title, make_instrumental, wait_audio);
|
const audios = await this.generateSongs(prompt, true, tags, title, make_instrumental, model, wait_audio);
|
||||||
const costTime = Date.now() - startTime;
|
const costTime = Date.now() - startTime;
|
||||||
logger.info("Custom Generate Response:\n" + JSON.stringify(audios, null, 2));
|
logger.info("Custom Generate Response:\n" + JSON.stringify(audios, null, 2));
|
||||||
logger.info("Cost time: " + costTime);
|
logger.info("Cost time: " + costTime);
|
||||||
@ -158,12 +185,13 @@ class SunoApi {
|
|||||||
tags?: string,
|
tags?: string,
|
||||||
title?: string,
|
title?: string,
|
||||||
make_instrumental?: boolean,
|
make_instrumental?: boolean,
|
||||||
|
model?: string,
|
||||||
wait_audio: boolean = false
|
wait_audio: boolean = false
|
||||||
): Promise<AudioInfo[]> {
|
): Promise<AudioInfo[]> {
|
||||||
await this.keepAlive(false);
|
await this.keepAlive(false);
|
||||||
const payload: any = {
|
const payload: any = {
|
||||||
make_instrumental: make_instrumental == true,
|
make_instrumental: make_instrumental == true,
|
||||||
mv: "chirp-v3-0",
|
mv: model || DEFAULT_MODEL,
|
||||||
prompt: "",
|
prompt: "",
|
||||||
};
|
};
|
||||||
if (isCustom) {
|
if (isCustom) {
|
||||||
@ -204,7 +232,10 @@ class SunoApi {
|
|||||||
const allCompleted = response.every(
|
const allCompleted = response.every(
|
||||||
audio => audio.status === 'streaming' || audio.status === 'complete'
|
audio => audio.status === 'streaming' || audio.status === 'complete'
|
||||||
);
|
);
|
||||||
if (allCompleted) {
|
const allError = response.every(
|
||||||
|
audio => audio.status === 'error'
|
||||||
|
);
|
||||||
|
if (allCompleted || allError) {
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
lastResponse = response;
|
lastResponse = response;
|
||||||
@ -270,15 +301,16 @@ class SunoApi {
|
|||||||
prompt: string = "",
|
prompt: string = "",
|
||||||
continueAt: string = "0",
|
continueAt: string = "0",
|
||||||
tags: string = "",
|
tags: string = "",
|
||||||
title: string = ""
|
title: string = "",
|
||||||
|
model?: string,
|
||||||
): Promise<AudioInfo> {
|
): Promise<AudioInfo> {
|
||||||
const response = await this.client.post(`${SunoApi.BASE_URL}/api/generate/v2/`, {
|
const response = await this.client.post(`${SunoApi.BASE_URL}/api/generate/v2/`, {
|
||||||
continue_clip_id: audioId,
|
continue_clip_id: audioId,
|
||||||
continue_at: continueAt,
|
continue_at: continueAt,
|
||||||
mv: "chirp-v3-0",
|
mv: model || DEFAULT_MODEL,
|
||||||
prompt: prompt,
|
prompt: prompt,
|
||||||
tags: tags,
|
tags: tags,
|
||||||
title: ""
|
title: title
|
||||||
});
|
});
|
||||||
return response.data;
|
return response.data;
|
||||||
}
|
}
|
||||||
@ -335,9 +367,21 @@ class SunoApi {
|
|||||||
type: audio.metadata.type,
|
type: audio.metadata.type,
|
||||||
tags: audio.metadata.tags,
|
tags: audio.metadata.tags,
|
||||||
duration: audio.metadata.duration_formatted,
|
duration: audio.metadata.duration_formatted,
|
||||||
|
error_message: audio.metadata.error_message,
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves information for a specific audio clip.
|
||||||
|
* @param clipId The ID of the audio clip to retrieve information for.
|
||||||
|
* @returns A promise that resolves to an object containing the audio clip information.
|
||||||
|
*/
|
||||||
|
public async getClip(clipId: string): Promise<object> {
|
||||||
|
await this.keepAlive(false);
|
||||||
|
const response = await this.client.get(`${SunoApi.BASE_URL}/api/clip/${clipId}`);
|
||||||
|
return response.data;
|
||||||
|
}
|
||||||
|
|
||||||
public async get_credits(): Promise<object> {
|
public async get_credits(): Promise<object> {
|
||||||
await this.keepAlive(false);
|
await this.keepAlive(false);
|
||||||
const response = await this.client.get(`${SunoApi.BASE_URL}/api/billing/info/`);
|
const response = await this.client.get(`${SunoApi.BASE_URL}/api/billing/info/`);
|
||||||
|
Loading…
Reference in New Issue
Block a user