Call it
curl https://api.peume.com/v1/call/music-generation \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"prompt": "your prompt",
"music_length_ms": 10,
"model_id": "music_v1"
}
}'const res = await fetch("https://api.peume.com/v1/call/music-generation", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"prompt": "your prompt",
"music_length_ms": 10,
"model_id": "music_v1"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/music-generation",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"prompt": "your prompt",
"music_length_ms": 10,
"model_id": "music_v1"
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: music-generation.
Parameters
promptRequiredstringDescribe the music: genre, mood, instrumentation, vocals, structure (e.g. 'Uplifting acoustic folk with warm male vocals, gentle guitar and hand claps').
music_length_msRequiredintegerLength of the generated track in milliseconds (3000–300000). REQUIRED — it is the exact billing basis ($0.15 per minute, prorated per second).
model_idstringMusic model: music_v1 (default) or music_v2 (better prompt adherence, multilingual vocals, mid-track transitions).
music_v1 · music_v2
Example: music_v1
force_instrumentalbooleanGuarantee an instrumental track (no vocals).
