Generate an Audio
Overview​
- High-Quality Music Generation: Create music tracks based on descriptive prompts.
- Flexible Integration: Compatible with various programming languages and frameworks.
Consumption​
2 audio files will be generated for each request, consuming a total of 157 500 UmamiAI Tokens.
API Reference​
Generate audio using Suno AI.​
Generates audio based on a text prompt using Suno AI, useful for creating audio content or responses.
path=/generate
method=post
Request
JavaScript
const response = await fetch('https://api.umamiai.xyz/v1/generate', {
method: 'POST',
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_UMAMIAI_API_KEY"
},
body: JSON.stringify({
"prompt": "text",
"make_instrumental": false,
"wait_audio": false
}),
});
const data = await response.json();
Python
import requests
response = requests.post(
"https://api.umamiai.xyz/v1/generate",
headers={"Content-Type":"application/json","Authorization": "Bearer YOUR_UMAMIAI_API_KEY"},
json={"prompt":"text","make_instrumental":false,"wait_audio":false}
)
data = response.json()
Curl
curl -L \
-X POST \
-H 'Authorization: Bearer YOUR_UMAMIAI_API_KEY' \
-H 'Content-Type: application/json' \
'https://api.umamiai.xyz/v1/generate' \
-d '{"prompt":"text","make_instrumental":false,"wait_audio":false}'
Response
[
{
"image_url": "https://example.com",
"audio_url": "https://example.com",
"video_url": "https://example.com"
}
]