Music
Music follows the same async pattern as video: create, poll, download.
Create a track
Section titled “Create a track”import requests
job = requests.post( "https://api.mixen.ai/v1/audio/music", headers={"Authorization": f"Bearer {API_KEY}"}, json={"model": "suno", "prompt": "Melancholic synth-pop about a city at night, female vocals"},).json()print(job["id"], job["status"])const res = await fetch('https://api.mixen.ai/v1/audio/music', { method: 'POST', headers: { Authorization: `Bearer ${process.env.MIXEN_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ model: 'suno', prompt: 'Melancholic synth-pop about a city at night, female vocals' }),})const job = await res.json()console.log(job.id, job.status)curl https://api.mixen.ai/v1/audio/music \ -H "Authorization: Bearer $MIXEN_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "suno", "prompt": "Melancholic synth-pop about a city at night, female vocals"}'| Field | Description |
|---|---|
model |
suno / suno-v5 — a song with vocals, two tracks per request. lyria / lyria-pro — instrumental, one track |
mode |
simple (from prompt) or custom (from lyrics + style + title). Lyria ignores this |
prompt |
Track description for simple mode |
lyrics |
Song lyrics for custom mode |
style |
Genre, style, tags |
title |
Track title |
Custom mode
Section titled “Custom mode”When you need specific lyrics rather than generated ones:
{ "model": "suno-v5", "mode": "custom", "title": "Night Tram", "style": "indie rock, 90s, male vocals, live drums", "lyrics": "First verse...\n\nChorus..."}Poll and download
Section titled “Poll and download”curl https://api.mixen.ai/v1/audio/music/music_... \ -H "Authorization: Bearer $MIXEN_API_KEY"
curl -L https://api.mixen.ai/v1/audio/music/music_.../content \ -H "Authorization: Bearer $MIXEN_API_KEY" -o track.mp3Statuses are the same: queued → in_progress → completed or failed.
Suno returns two variants of the track per request — that is how the model behaves, not an error. Both appear in the poll response.
Music is billed per request rather than per second: the per_request_rub field in the catalog. Suno’s two tracks are one charge.