Runnable Node.js and Python examples for the Mureka API by useapi.net — a Suno / Udio alternative. Drive your own Mureka account over a simple REST API: generate full songs from lyrics, descriptions, or musical styles with Mureka's models — V9.5 (default), V9, the flagship O2, plus V8 and V7.6 — alongside instrumental tracks, extend, vocal cloning, motif (melody) seeding, and multi-speaker speech with voice cloning. No per-call metering — it runs your own Mureka subscription.
Each example ships JavaScript and Python implementations (.mjs and .py, no dependencies) that read a list of prompts from prompts.json, submit them through the useapi.net Mureka API, poll each job until it is final, and download every result — so you can queue a batch and come back to the winners.
The sheet-music/ example is a single call instead: give it a song, a YouTube link or an MP3 and it saves the score's MusicXML and PDFs.
The own-voice/ example sings your lyrics in your own voice: upload a clip once, use it directly or turn it into a reusable character, then manage your characters.
| Example | What it does | Docs |
|---|---|---|
music/ |
Batch-generate songs from text prompts — AI-written lyrics, style, and mood, with Mureka model selection | POST /music/create |
lyrics-song/ |
Turn your own lyrics into songs, steered by genres, moods and vocal gender | POST /music/create-advanced |
instrumental/ |
Batch-generate instrumental tracks (no vocals) from a description | POST /music/create-instrumental |
sheet-music/ |
Turn a Mureka song, a YouTube link or a local MP3 into sheet music: MusicXML, staff PDF and numbered-notation PDF (October 18, 2026) | POST /music/score · tutorial |
own-voice/ |
Sing your own lyrics in your own voice: upload a voice clip, use it once or make a reusable character (free), then list, publish and delete characters (October 18, 2026) | POST /music/characters · example post |
Walkthrough of the three song examples with curl: How to Generate AI Music with the Mureka API (Suno / Udio Alternative).
You need Node.js v21 or newer or Python 3.x (neither has any dependencies to install), a useapi.net API token, and a connected Mureka account (one $15/month subscription covers every useapi.net API):
git clone https://github.com/useapi/mureka-api.git
cd mureka-api/music
node ./mureka.mjs <API_TOKEN>
# or, equivalently, with Python:
python3 ./mureka.py <API_TOKEN>API_TOKEN is your useapi.net token. The optional second argument is your Mureka account id (or its email) — only needed when you have more than one account configured; with a single account it is auto-selected. Edit prompts.json in each folder to queue your own prompts. Every supported parameter is documented on the POST /music/create endpoint page.
useapi.net also runs a hosted Model Context Protocol server for Mureka, so an AI assistant such as Claude Code, Cursor or VS Code Copilot can use it on your own account. It has 40 tools: songs from a prompt or your lyrics (style, voice, character, reference track or melody), instrumentals and lyrics, extend, section edits and remix, stems with MIDI and DAW sessions, sheet music (MusicXML and PDF), characters that make your own voice a reusable singer, uploads, YouTube import, and speech with voice cloning. Nothing to install or run locally.
- Endpoint:
https://api.useapi.net/v1/mureka/mcp - Transport: Streamable HTTP
- Authorization: your useapi.net API token in the
Authorization: Bearer …header, and an account connected with the Mureka setup - Listed in the official MCP Registry as
net.useapi/mureka
Claude Code:
claude mcp add --transport http useapi-mureka https://api.useapi.net/v1/mureka/mcp --header "Authorization: Bearer YOUR_API_TOKEN"Cursor, VS Code, Windsurf and the full tool list: Mureka MCP server docs. useapi.net is a third-party API, not affiliated with Mureka or Kunlun Tech.
This repo is also a Claude Code plugin marketplace. The plugin adds the hosted Mureka MCP server, and reads your token from the USEAPI_TOKEN environment variable, so set it before you start Claude Code:
export USEAPI_TOKEN=user:12345-... # your useapi.net API tokenThen, inside Claude Code:
/plugin marketplace add useapi/mureka-api
/plugin install mureka@useapi-mureka
On Claude Code 2.1.275 or later, /plugin install mureka --marketplace useapi/mureka-api does both in one step. Run /mcp to check that useapi-mureka is connected.
This repo is also a Gemini CLI extension with the same MCP server:
gemini extensions install https://github.com/useapi/mureka-apiThe install asks for your useapi.net API token and keeps it in the system keychain. Change it later with gemini extensions config useapi-mureka, and check the connection with gemini mcp list.
- Does Mureka have an API? Yes, and this repo uses the useapi.net Mureka API, a third-party REST API that drives your own Mureka website account, so you generate at website plan prices of about 1.35 to 1.8 cents a song, against 15 cents a song on V9.5 and 4.5 cents on V9, V8 and O2 through Mureka's official developer API (as of October 2026). Mureka sells the official API as prepaid top-ups consumed per call, from $1,000 (5 concurrent requests) up to $30,000 (150 concurrent), valid for 12 months, with extra charges for lyrics generation and stem export.
- Where do I get an API key / token? You call this API with a useapi.net API token and connect your Mureka account once through the Mureka setup: a dedicated account's email and password (the API logs in again by itself when Mureka ends the session), or session tokens copied from your browser. You don't need a key from Mureka's developer platform.
- How much does it cost? A flat $15/month to useapi.net, which covers every useapi.net API, plus your Mureka web plan: Pro at $9/month (up to 500 songs, about 1.8¢ each) or Premier at $27/month (up to 2,000 songs, about 1.35¢ each), against about 4.5¢ a song on Mureka's official API (as of October 2026). V9.5, V9 and O2 use more credits per song, so real counts run lower. Lyrics generation and stem downloads are free on the web plan. See the pricing comparison.
- Which models can I use?
V9.5(default),V9, the flagshipO2,V8andV7.6. Older names (V7.5,V7,O1,V6) still work and redirect to current engines. Every generation returns two complete songs (occasionally three) as MP3, up to about 5 minutes long. - Is it a Suno / Udio alternative? Yes. Like Suno and Udio, Mureka writes and sings a full song with vocals from one text prompt, and it also takes your own lyrics, makes instrumentals, extends songs and clones voices for speech.
- How many songs at once, and how many accounts? Each Mureka account runs up to 10 generations at the same time. Each useapi.net subscription covers 3 Mureka accounts, and each extra $10/month subscription adds 3 more.
- More answers: Mureka API questions.
useapi.net is an experimental REST API for AI services. The Mureka API drives your own Mureka account, so you spend your plan's credits at consumer rates instead of metered developer-API pricing. See the model matrix and pricing on the API overview.
Visit our Discord Server or Telegram Channel for any support questions and concerns.
We regularly post guides and tutorials on the YouTube Channel.
The example code in this repository is released under the MIT License. It covers the example scripts only, not the useapi.net service or API.