Mureka
Text-to-music and lyrics-to-music generation using Mureka.
POST /v2/music/generate — model: "mureka"
Generate full songs or instrumentals using Mureka. Provide your own lyrics, or just describe the song — lyrics are auto-generated from your prompt when you don't supply any.
See Music Generation overview for common request fields, response format, and error codes.
Model-specific parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
murekaParams.model_version | string | "auto" | Mureka model: "auto" (latest), "mureka-7.6", "mureka-o2", "mureka-8", "mureka-9" |
murekaParams.lyrics | string | — | Song lyrics (max 3,000 characters). When omitted, lyrics are auto-generated from prompt. Cannot be combined with instrumental: true |
murekaParams.instrumental | boolean | false | Generate instrumental tracks (no vocals). Not supported by mureka-o2 |
murekaParams.n | integer | 2 | Number of songs to generate (1–3). Billed per song |
For Mureka, prompt is a style description (genre, mood, vocals — e.g. "r&b, slow, passionate, male vocal") capped at 1,024 characters. It steers the music style and, when lyrics is omitted, is also used to write the lyrics.
Credit cost
Mureka is billed per song — 6 credits each, based on murekaParams.n:
| Variant | Songs | Credits |
|---|---|---|
n1 | 1 song | 6 |
n2 | 2 songs (default) | 12 |
n3 | 3 songs | 18 |
Example result
Once the job is COMPLETED, the result object on GET /v2/jobs/:id looks like:
{
"tracks": [
{
"id": "1436211-0",
"audioUrl": "https://cdn2.apiframe.ai/audio/c3d4e5f6-a7b8-9012-cdef-345678901234-0.mp3",
"imageUrl": null,
"title": null,
"tags": null,
"duration": 154
},
{
"id": "1436211-1",
"audioUrl": "https://cdn2.apiframe.ai/audio/c3d4e5f6-a7b8-9012-cdef-345678901234-1.mp3",
"imageUrl": null,
"title": null,
"tags": null,
"duration": 162
}
]
}Mureka returns one track per requested song (n, default 2). Mureka does not return cover art or track titles, so imageUrl, title, and tags are null.
See Result format for field details.
Code examples
Text-to-music (auto-generated lyrics)
curl -X POST https://api.apiframe.ai/v2/music/generate \
-H "X-API-Key: afk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"prompt": "r&b, slow, passionate, male vocal",
"model": "mureka"
}'import requests
response = requests.post(
"https://api.apiframe.ai/v2/music/generate",
headers={
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
json={
"prompt": "r&b, slow, passionate, male vocal",
"model": "mureka",
},
)
print(response.json())const response = await fetch("https://api.apiframe.ai/v2/music/generate", {
method: "POST",
headers: {
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
prompt: "r&b, slow, passionate, male vocal",
model: "mureka",
}),
});
console.log(await response.json());body := `{
"prompt": "r&b, slow, passionate, male vocal",
"model": "mureka"
}`
req, _ := http.NewRequest("POST", "https://api.apiframe.ai/v2/music/generate",
strings.NewReader(body))
req.Header.Set("X-API-Key", "afk_your_api_key_here")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)Custom lyrics mode
curl -X POST https://api.apiframe.ai/v2/music/generate \
-H "X-API-Key: afk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"prompt": "jazz, pop, dreamy female vocal",
"model": "mureka",
"murekaParams": {
"model_version": "mureka-9",
"lyrics": "[Verse]\nIn the gentle evening air,\nWhispers dance without a care.\n[Chorus]\nHold me close, never let go"
}
}'Instrumental mode
curl -X POST https://api.apiframe.ai/v2/music/generate \
-H "X-API-Key: afk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"prompt": "ambient electronic soundscape with evolving pads and gentle arpeggios",
"model": "mureka",
"murekaParams": {
"instrumental": true
}
}'Try it
/v2/music/generateTry it