MusicAPI Docs

MusicAPI is a self-serve REST API for AI music generation — drop-in compatible with the Suno model family, plus Google Lyria 3 Pro and other engines. You can sign up today, create an API key in the dashboard, and make your first generation call in under five minutes. Free credits are included on signup, so you can run real generations before paying anything.

Get your API key →  ·  Free credits on signup  ·  Pricing  ·  Try it in the Playground

Get started in 60 seconds

npm install @musicapi/sdk
import { MusicAPI } from "@musicapi/sdk"

const client = new MusicAPI({ apiKey: process.env.MUSICAPI_KEY })

const { task_id } = await client.sonic.create({
  prompt: "lofi hip hop, mellow piano, late night study vibe",
  mv: "sonic-v5",
})

See Quickstart — Node.js or Quickstart — Python for the full walk-through.

Three ways to use these docs

  • Quickstarts — get a working call against your account in a few minutes.
  • API Reference — every endpoint with parameters, response shapes, multi-language code samples, and a built-in try-it console.
  • Playground — fire a real generation in the browser against a scoped demo key. No signup for the free tier.

The API at a glance

  • Sonic — Suno-compatible vocal music generation (create, extend, cover, persona, remaster, aligned lyrics, stems, WAV export, batch).
  • Producer — Google Lyria 3 Pro for instrumental and background music with explicit BPM and length control.
  • Riffusion — FUZZ-model generation for experimental and lo-fi textures.
  • Studio — Udio-style generation with fine-grained prompt / clarity / lyrics strength.
  • Suno (legacy aliases) — older /suno/* paths kept for backward compatibility; new integrations should use /sonic/*.

All endpoints, parameters, and live-callable examples are in the interactive reference.

Frequently asked questions

Can I try the API before paying? Yes. Signup comes with free credits, so you can run real generations against your own API key before adding any payment method. The Playground also lets you fire a demo generation in the browser on the free tier without an account.

How do I get an API key? Sign in, open the dashboard, and create a key under API Keys. From there the Node.js or Python quickstart gets you to a first successful generation in a few minutes.

Which models can I use? Sonic (Suno-compatible vocal music, including extend, cover, persona, stems and WAV export), Producer (Google Lyria 3 Pro instrumentals), Riffusion (FUZZ experimental textures), and Studio (Udio-style generation). Every endpoint is documented with runnable examples in the API reference.