Added negative tags

This commit is contained in:
Abwasserrohr 2024-10-07 21:46:11 +02:00 committed by GitHub
parent 0e8a2f55a2
commit 7045b59123
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,12 +9,13 @@ 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, model, wait_audio } = body; const { prompt, tags, title, make_instrumental, model, wait_audio, negative_tags } = body;
const audioInfo = await (await sunoApi).custom_generate( const audioInfo = await (await sunoApi).custom_generate(
prompt, tags, title, prompt, tags, title,
Boolean(make_instrumental), Boolean(make_instrumental),
model || DEFAULT_MODEL, model || DEFAULT_MODEL,
Boolean(wait_audio) Boolean(wait_audio),
negative_tags
); );
return new NextResponse(JSON.stringify(audioInfo), { return new NextResponse(JSON.stringify(audioInfo), {
status: 200, status: 200,