Create instrumental music
March 31, 2025
Table of contents
Mureka supports up to 10 parallel generations per account in near real-time fashion, with an average generation time of 45 seconds (each generation produces two songs). Generated songs can be up to 5 minutes long depending on your prompt.
https://api.useapi.net/v1/mureka/music/create-instrumental
Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
# Alternatively you can use multipart/form-data
# Content-Type: multipart/form-data
API token
is required, see Setup useapi.net for details.
Request Body
{
"account": "Optional Mureka API account",
"prompt": "Ambient electronic with soft pads, great for nature walks and peaceful moments."
}
-
account
is optional when only one account is configured or if themotif_id
parameter is provided. However, if you have multiple accounts configured and themotif_id
parameter is not provided, this parameter becomes required. -
prompt
is optional. Describe your instrumental music.
Maximum length: 300 characters. -
title
is optional. Song title.
Maximum length: 50 characters. -
ref_id
is optional. Create music inspired by a reference track. See available tracks using GET /music/refs. You can upload your own track using POST /files. To see a list of tracks you have already uploaded, use GET /files. -
model
is optional.
Supported values:V5.5
,V6
(default),O1
.
Responses
-
{ "feed_id": 11223344, "state": 3, "songs": [ { "song_id": "user:777-mureka:123456789-song:33445566", "title": "<title>", "version": "1", "duration_milliseconds": 234567, "generate_at": 12345677, "genres": [ "electronic", "indie" ], "moods": [ "quirky", "angry", "restless" ], "mp3_url": "https://<download link>.mp3", "share_key": "<share key>", "recall": true, "machine_audit_state": 4, "credit_type": 1, "cover": "https://<cover image>.png", "share_link": "https://<share link>" }, { "song_id": "user:777-mureka:123456789-song:33445566", "title": "<title>", "version": "2", "duration_milliseconds": 1234567, "generate_at": 12345667, "genres": [ "electronic", "world-music" ], "moods": [ "dark", "quirky", "energetic" ], "mp3_url": "https://<download link>.mp3", "share_key": "<share key>", "machine_audit_state": 1, "credit_type": 1, "cover": "https://<cover image>.png", "share_link": "https://<share link>" } ] }
-
{ "error": "<Error message>", "code": 400 }
-
{ "error": "Wrong username/password combination.", "code": 401 }
Model
{ // TypeScript, all fields are optional
feed_id: number
state: number
songs?: {
song_id: number
title: string
version: string
duration_milliseconds: number
generate_at: number
genres: string[]
moods: string[]
mp3_url: string
share_key: string
machine_audit_state: number
credit_type: number
cover: string
}[]
}
Examples
-
curl -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer …" \ -X POST https://api.useapi.net/v1/mureka/music/create-instrumental \ -d '{"account": "…", "prompt": "…"}'
-
const account = "Mureka account"; const prompt = "<Your music prompt here>"; const apiUrl = `https://api.useapi.net/v1/mureka/music/create-instrumental`; const api_token = "API token"; const data = { method: 'POST', headers: { 'Authorization': `Bearer ${api_token}`, 'Content-Type': 'application/json' } }; data.body = JSON.stringify({ account, prompt }); const response = await fetch(apiUrl, data); const result = await response.json(); console.log("response", {response, result});
-
import requests account = "Mureka account" prompt = "<Your music prompt here>" apiUrl = f"https://api.useapi.net/v1/mureka/music/create-instrumental" api_token = "API token" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {api_token}" } body = { "account": f"{account}", "prompt": f"{prompt}" } response = requests.post(apiUrl, headers=headers, json=body) print(response, response.json())
Try It
It takes an average of 45 seconds to generate a song.