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​
JavaScript
const main = async () => {
const url = new URL('https://api.umamiai.xyz/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 YOUR_UMAMIAI_API_KEY',
'Content-Type': 'application/json',
},
}).then((res) => res.json());
console.log('Lyric data:', data);
};
main();
Python
import requests
def main():
response = requests.get(
"https://api.umamiai.xyz/v2/generate/audio/suno-ai/lyric",
params={"lyric_id": "b1c8d5b4-bee1-4b8b-8f94-07a67080990e"},
headers={
"Authorization": "Bearer YOUR_UMAMIAI_API_KEY",
"Content-Type": "application/json",
},
)
response.raise_for_status()
data = response.json()
print("Lyric data:", data)
if __name__ == "__main__":
main()