The API makes the same songs as the studio: a prompt (or your own lyrics) in, a finished track with vocals, a line-synced .lrc file and a cover out. It uses your account's credits at the same rate as the studio, 1 credit per second of audio per variation, and every song it makes shows up in your library.
Get a key
API keys are part of the paid plans. Open Settings → API keys in the app, name the key and copy it: it starts with mv_live_ and is shown only once. You can have 5 keys and revoke any of them at any time. Keep keys on your server; never put one in a web page or a mobile app. A key stops working if your subscription ends.
Send the key on every request:
Authorization: Bearer mv_live_…Create a song
POST https://musicvivo.com/api/v1/songs with a JSON body. The song is queued at once and is usually ready in one to two minutes.
curl https://musicvivo.com/api/v1/songs \
-H "Authorization: Bearer $MUSICVIVO_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 7c1f0e52-order-1042" \
-d '{"mode":"SIMPLE","prompt":"upbeat synth-pop about a road trip at dawn","durationS":120}'| Field | Type | Notes |
|---|---|---|
mode | string | SIMPLE (prompt only) or CUSTOM (all fields below) |
prompt | string | 3–1000 characters: style, mood, subject |
durationS | integer | 10–240 seconds, within your plan's length limit |
instrumental | boolean | default false |
variations | integer | 1–4 takes of the same request, each charged |
lyrics | string | CUSTOM only. Your own lyrics, up to 5000 characters; we write them when empty |
vocalGender | string | CUSTOM only. male or female |
vocalLanguage | string | CUSTOM only. en es pt de fr it tr ja ko zh |
bpm, keyscale, timesignature | int, string, string | CUSTOM only. 40–220; e.g. "A minor"; 4/4 3/4 6/8 2/4 |
seed | integer | CUSTOM only. Repeat a seed to get a closer result |
The response is 201 with { "song": { "id": "…", "status": "queued", … }, "credits_remaining": 1234 }. Credits are taken when the song is queued and given back automatically if it fails.
Never retry blindly
Creating a song spends credits, so a resend after a timeout can pay twice. Send an Idempotency-Key header (any unique string up to 100 characters, kept for 24 hours): a resend with the same key returns the song from the first request instead of making a new one, and gets 409 in_progress while the first request is still running.
Get a song
GET https://musicvivo.com/api/v1/songs/{id}. Poll every 5–10 seconds until status is completed or failed.
{
"song": {
"id": "cmv…",
"status": "completed",
"title": "Dawn on Route 9",
"duration_s": 120,
"error": null,
"public_url": null,
"tracks": [
{
"index": 0,
"duration_s": 121,
"audio_url": "https://…mp3?X-Amz-…",
"cover_url": "https://…jpg?X-Amz-…",
"lrc_url": "https://…lrc?X-Amz-…",
"lyrics": "[Verse 1]\n…"
}
]
}
}Media links are signed and expire after about an hour. Download the files you need, or fetch the song again for fresh links. Songs stay private unless you publish them from your library.
List songs and check credits
GET https://musicvivo.com/api/v1/songs?limit=20&cursor=…: your songs, newest first, up to 50 per page. Passnext_cursorfrom the response to get the next page.GET https://musicvivo.com/api/v1/balance:{ "credits": 1234 }
Limits and errors
Each key can make 60 requests a minute, and an account can create 10 songs a minute. Errors are JSON with an error code and a readable message:
| Status | error | Meaning |
|---|---|---|
| 401 | unauthorized | Missing, wrong or revoked key |
| 402 | insufficient_credits | Not enough credits; required and available are included |
| 403 | plan_required, plan_limit | No active paid plan, or the request is over your plan's limits |
| 404 | not_found | No song with this id on your account |
| 409 | in_progress | Same Idempotency-Key is still running |
| 422 | invalid_request, content_not_allowed | Body does not match the schema, or the prompt breaks the rules below |
| 429 | rate_limited | Slow down and try again in a minute |
| 503 | queue_unavailable, moderation_unavailable | Nothing was charged; try again shortly |
Rules
API songs follow the same terms and license as the studio. Prompts asking to imitate a real singer's voice are refused. Questions or a higher limit: support@musicvivo.com.