Mira Music
Mira Music composes original songs from a text prompt. Describe genre, mood, and instruments — the model writes the arrangement and (optionally) generates and sings lyrics. An instrumental-only mode is also available.
Capabilities
- Text-to-song — describe the vibe, get a full vocal-led track
- Custom lyrics — pass your own text in lyrics — the model arranges around it
- Instrumental mode — instrumental=true — no vocals, arrangement only
- Style / mood / genre — independent style, mood, genre fields — precise control without long prompts
- Duration — up to 4 minutes per track
Async flow (job + polling)
Generating a song takes 30–120 seconds, so the endpoint returns a job id, not audio. Poll /v1/audio/music/{id} until status="succeeded" then download from audio_url.
Request: create job
cURL
curl https://api.vmira.ai/v1/audio/music \
-H "Authorization: Bearer $MIRA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Melancholic synthwave track with vintage drums",
"genre": "synthwave",
"mood": "nostalgic",
"style": "80s, analog",
"duration_seconds": 120,
"instrumental": false,
"lyrics": null
}'Response: job created
JSON
{
"id": "music_job_a1b2c3",
"status": "queued",
"created_at": 1714000000
}Poll status
cURL
curl https://api.vmira.ai/v1/audio/music/music_job_a1b2c3 \ -H "Authorization: Bearer $MIRA_API_KEY"
JSON
{
"id": "music_job_a1b2c3",
"status": "succeeded",
"audio_url": "https://cdn.vmira.ai/music/a1b2c3.mp3",
"duration_seconds": 120,
"lyrics": "[Verse 1]\nThe city sleeps tonight…"
}Invoking from chat (tool call)
Mira Music is also exposed as a tool inside chat-completions. The model decides when to invoke it and returns audio_url in the response content.
JSON
{
"type": "tool_call",
"name": "mira_music_generate",
"arguments": {
"prompt": "Epic orchestral overture, 90 seconds",
"genre": "orchestral",
"mood": "epic",
"duration_seconds": 90,
"instrumental": true
}
}Parameters
- prompt — required track description
- genre — optional genre (pop, rock, synthwave, jazz, orchestral…)
- mood — optional mood
- style — optional style hints
- lyrics — optional custom lyrics (null = model writes them)
- instrumental — true for vocals-free instrumental
- duration_seconds — duration, 15–240 seconds
See /pricing for current per-track cost and /docs/api/reference for the full endpoint specification.