diff --git a/src/app/api/get/route.ts b/src/app/api/get/route.ts index f3f34f2..97fb816 100644 --- a/src/app/api/get/route.ts +++ b/src/app/api/get/route.ts @@ -51,4 +51,4 @@ export async function OPTIONS(request: Request) { status: 200, headers: corsHeaders }); -} \ No newline at end of file +} diff --git a/src/lib/SunoApi.ts b/src/lib/SunoApi.ts index f332b0a..dd5c3ae 100644 --- a/src/lib/SunoApi.ts +++ b/src/lib/SunoApi.ts @@ -338,6 +338,12 @@ class SunoApi { })); } + public async getClip(clipId: string): Promise { + await this.keepAlive(false); + const response = await this.client.get(`${SunoApi.BASE_URL}/api/clip/${clipId}`); + return response.data; + } + public async get_credits(): Promise { await this.keepAlive(false); const response = await this.client.get(`${SunoApi.BASE_URL}/api/billing/info/`);