Skip to content

Mattias52/musicorb-api-examples

Repository files navigation

MusicOrb API Examples

Generate AI songs, cinematic music videos, comic-style videos, and synced lyrics — all from a single API. A powerful alternative to Suno API with built-in video generation and word-level lyric sync.

Get your free API key — 100 requests/day on the free tier.

What is MusicOrb API?

MusicOrb is a REST API that lets you:

  • Generate songs from text prompts (any genre, mood, BPM)
  • Create cinematic music videos — AI-generated visuals with Ken Burns effects, smooth transitions, and synced lyrics burned into the video
  • Create comic-style videos — illustration-based videos from reference images with lyric overlays
  • Sync lyrics with word-level timestamps — lyrics are automatically overlaid on videos, or use the raw timestamps for your own UI
  • Get song concepts (title, genre, mood) without generating audio

One API call. No ML infrastructure needed.

Quick Start

git clone https://github.com/anthropics/musicorb-api-examples.git
cd musicorb-api-examples
npm install
cp .env.example .env
# Add your API key to .env

Sign up at musicorb.ai/developers to get a free API key.

Examples

Generate a Song

node generate-song.js "a chill lofi beat for studying"
Generating song: "a chill lofi beat for studying"

Track ID: abc123
Waiting for generation...

  Status: processing
  Status: processing
  Status: completed

Song ready!
  Title:    Late Night Study Session
  Genre:    Lo-fi
  Duration: 180s
  Audio:    https://...

How it works: Send a prompt to POST /songs/generate, get a trackId, then poll GET /songs/{id} until the status is completed.

Generate a Music Video

node generate-video.js <trackId> advanced

Two video modes:

  • advanced — Cinematic AI-generated visuals
  • comic_self — Comic/illustration style

Sync Lyrics

node sync-lyrics.js <trackId>

Returns word-level timestamps — perfect for karaoke, subtitles, or lyric videos:

[  0.50s -   0.85s]  Late
[  0.85s -   1.20s]  night
[  1.20s -   1.80s]  studying

Full Pipeline

Run the complete flow — concept, song, video, and lyrics — in one script:

node full-pipeline.js "a dark trap banger about city nights"
=== MusicOrb Full Pipeline ===

1/4 Generating song concept...
     Title: Neon Streets
     Genre: Trap | Mood: Dark | BPM: 140

2/4 Generating audio...
     Waiting........ Done!

3/4 Generating cinematic video...
     Rendering............. Done!

4/4 Syncing lyrics...
     142 words synced

=== Complete ===
Track: Neon Streets
Audio: https://...
Video: https://...
Lyrics: 142 words with timestamps

API Reference

Endpoint Method Description
/songs/generate POST Generate a song from a text prompt
/songs/concept POST Get song concept without audio
/songs/{id} GET Get song status and audio URL
/videos/generate POST Create a music video for a track
/videos/{id} GET Get video status and URL
/lyrics/sync POST Sync lyrics with timestamps
/usage GET Check API usage and limits

Base URL: https://www.musicorb.ai/api/v1

Auth: Pass your API key as a Bearer token:

Authorization: Bearer mo_live_your_key_here

Pricing

Plan Price Requests/day Requests/min
Free $0 100 10
Pro $19/mo 500 20
Business $49/mo 5,000 60
Enterprise Custom 50,000 300

Use Cases

  • Music bots — Discord/Telegram bots that generate songs on command
  • Content platforms — Add music generation to your creator tools
  • Social media tools — Auto-generate TikTok/Reels content with audio + video
  • Game studios — Dynamic soundtrack generation for games
  • Karaoke apps — Word-level lyric sync for sing-along features

Links

License

MIT

About

Node.js examples for MusicOrb API — AI music generation, cinematic videos, comic videos, and lyric sync. Suno API alternative with video support.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors