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-songdescribe the vibe, get a full vocal-led track
  • Custom lyricspass your own text in lyrics — the model arranges around it
  • Instrumental modeinstrumental=true — no vocals, arrangement only
  • Style / mood / genreindependent style, mood, genre fields — precise control without long prompts
  • Durationup 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

  • promptrequired track description
  • genreoptional genre (pop, rock, synthwave, jazz, orchestral…)
  • moodoptional mood
  • styleoptional style hints
  • lyricsoptional custom lyrics (null = model writes them)
  • instrumentaltrue for vocals-free instrumental
  • duration_secondsduration, 15–240 seconds
See /pricing for current per-track cost and /docs/api/reference for the full endpoint specification.