Fetch Lyrics

Overview

After lyrics generation, you need to fetch it by the ID. It will return a generation with the title and text.

Be careful: You can fetch generation results only once.

Example

const main = async () => {
  const url = new URL('https://api.aimlapi.com/v2/generate/audio/suno-ai/lyric');
  url.searchParams.set('lyric_id', '8e28a5da-5c02-453c-9fcf-0e8f88d1bfd5');

  const data = await fetch(url, {
    method: 'GET',
    headers: {
      Authorization: 'Bearer my_key',
      'Content-Type': 'application/json',
    },
  }).then((res) => res.json());

  console.log('Lyric data:', data);
};

main();

Last updated