MusicAPI Docs
Build AI music into your product with a single REST API. Drop-in compatible with the Suno model family, plus integrations for Google Lyria 3 Pro and other engines.
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.