New: Replace Section endpoint, regenerate any part of a finished song

The AI Music API for Full Songs

Generate complete songs with vocals or instrumentals from a short description or your own lyrics. Then extend, cover, edit and time them, all through one REST API with webhooks.

24 free trial credits · From $0.10 per request · Failed requests refunded automatically

From One Request to a Finished Song

An illustrative walkthrough: the request you send, what the feed endpoint returns once the task completes, and a sample track so you can hear the kind of audio you get back.

1Send the requestPOST /api/v2/generate
{
  "model": "chirp-v6",
  "gpt_description_prompt": "An electronic twist with unexpected rhythms",
  "make_instrumental": false
}

// → { "code": 200, "workId": "gen2…" }
2Poll the taskGET /api/v2/feed?workId=…
{
  "code": 200,
  "data": {
    "type": "SUCCESS",
    "response_data": [
      {
        "status": "complete",
        "title": "Twist",
        "tags": "electronic",
        "duration": 224,
        "model_name": "chirp-v6",
        "audio_url": "https://…/audio.mp3",
        "image_url": "https://…/cover.jpeg"
      },
      { "…": "second variation" }
    ]
  }
}
3Play the result

Twist

An electronic twist with unexpected rhythms

03:44

Request and response bodies are shortened. Each request returns two variations. Returned audio_url and image_url values are temporary, so download the files once status is complete.

Full feed response reference →

Sample Tracks Generated with the API

Example outputs to judge style and audio quality, each with a short description of the track.

Love Unlocked

Love Unlocked

Pop
♪ Generated sample

A bright pop love song about finally opening up to someone

03:24
Shattered

Shattered

Progressive-Metal
♪ Generated sample

Generate a progressive metal track with complex time...

03:29
Arrival

Arrival

Pop-Heartfelt
♪ Generated sample

A heartfelt pop song about a long-awaited arrival

03:37
Elite Crew

Elite Crew

Hip-Hop
♪ Generated sample

Create a song about a monkey, called pipinu, a cat called...

02:53
十八岁的自由

十八岁的自由

Upbeat
♪ Generated sample

年满十八岁,对即将迎来的自由感到期待...

03:26
Strange Faces

Strange Faces

Dubstep
♪ Generated sample

Make a dubstep track with heavy bass drops and glitch...

03:36
Twist

Twist

Electronic
♪ Generated sample

An electronic twist with unexpected rhythms

03:44
Drift Away

Drift Away

Ambient
♪ Generated sample

Ethereal ambient textures that float between dream and reality

02:31
Harder Road

Harder Road

Rock
♪ Generated sample

A rock anthem about perseverance and grit

03:22
Peculiar Change

Peculiar Change

Jazz-Fusion
♪ Generated sample

Jazz-fusion exploration with shifting harmonies

02:44

What You Can Build

Add original music to your product without running your own model stack.

Personalized song apps

Turn a name, an occasion and a few details into a custom song with vocals.

Soundtracks for games and videos

Generate instrumental tracks for games, videos and podcasts with make_instrumental.

Lyric videos and karaoke

Use word-level timestamped lyrics to sync captions and karaoke highlights.

Music prototyping tools

Try styles, extend ideas and regenerate sections while you iterate.

One API for the Whole Song Workflow

Endpoints for every step, from the first draft to the final edit.

Full songs with vocals

Inspiration mode writes lyrics from a short description; custom mode takes your lyrics, style and title. Pick chirp-v6, chirp-v6-wild or chirp-v6-mini, vocals or instrumental, and a target length of 10 to 360 seconds.

Extend and Replace Section

Continue a finished track with new lyrics or style, or regenerate any window of 10 seconds or more and get the full song back.

Upload & Cover

Send a publicly accessible audio file and get a new version with different vocals, style or lyrics.

Word-level timestamped lyrics

Get the timing of every word plus waveform data to drive lyric videos, karaoke and subtitles.

Webhooks and polling

Every request returns a task ID. Poll the feed endpoint, or use the callback endpoint to receive results at your URL when the task finishes.

Pay per request

chirp-v6 and chirp-v6-wild cost 12 credits per generation request, chirp-v6-mini 10 and cover art 1. Rejected or failed requests are refunded automatically.

Models and Credit Costs

With pay-as-you-go, 1 USD buys 100 credits and purchased credits never expire. Monthly and yearly plans are listed on the pricing page.

Model or endpointCredits per requestPay-as-you-go price
chirp-v6Full songs, default model12$0.12
chirp-v6-wildFull songs, alternative model12$0.12
chirp-v6-miniFull songs, lower cost10$0.10
/v2/cover/generateCover art for a finished track1$0.01

New accounts can claim 24 free trial credits in the dashboard, enough for two chirp-v6 requests. Trial credits expire after 7 days.

See plans and pricing →

Your First Request

Create an API key, send one POST request, then poll the task or wait for your callback.

curl · POST /api/v2/generate
curl -X POST "https://aimusicapi.org/api/v2/generate" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "chirp-v6",
    "gpt_description_prompt": "An upbeat pop song about a summer road trip",
    "make_instrumental": false
  }'

# The response contains a workId. Poll it:
curl "https://aimusicapi.org/api/v2/feed?workId=WORK_ID" \
  -H "Authorization: Bearer YOUR_API_KEY"

Get Started in 4 Steps

From sign-up to your first generated song in a few minutes.

01

Create an account and API key

Sign up, open the dashboard, claim your 24 trial credits and create an API key.

02

Pick a model and mode

Use inspiration mode with a short description, or custom mode with your own lyrics, style and title.

03

Send the request

POST to /api/v2/generate with your key in the Authorization header. The response contains a task ID.

04

Get the audio

Poll /api/v2/feed or receive the callback, then download the audio and store it yourself. Returned URLs are temporary.

Frequently Asked Questions

Everything you need to know about the AI Music API.

What is AI Music API?

AI Music API (aimusicapi.org) is a REST API for generating complete songs with AI. You send a description or your own lyrics and get audio back, with further endpoints to extend, cover, edit and time songs.

Is AIMusicAPI.org the same as musicapi.ai or aimusicapi.ai?

No. AIMusicAPI.org is an independent service with its own accounts, API keys and pricing. It is not affiliated with musicapi.ai, aimusicapi.ai or other similarly named services.

Which models are available?

chirp-v6, chirp-v6-wild and chirp-v6-mini. Older identifiers from chirp-v3-5 to chirp-v5-5 are still accepted at their historical price and served by the current models; model_name in each result shows the model that produced the audio.

How much does it cost?

chirp-v6 and chirp-v6-wild cost 12 credits per generation request, chirp-v6-mini 10 and cover art 1. With pay-as-you-go, 1 USD buys 100 credits, so a chirp-v6 request costs about $0.12.

Is there a free trial?

Yes. After signing up, claim 24 free trial credits in the dashboard, enough for two chirp-v6 requests. No card is needed. Trial credits expire after 7 days, each person can claim once, and availability can vary by region.

What happens if a request fails?

Requests rejected during validation or failing during generation are refunded automatically, and the error message explains what went wrong.

Can I use my own lyrics?

Yes. Custom mode takes your lyrics plus a style and title. Inspiration mode writes lyrics from a short description, and make_instrumental produces a track without vocals.

How long can a song be?

In custom mode, duration sets a target length of 10 to 360 seconds. It is a target, not an exact length. Use the extend endpoint to continue a finished track.

How do I get the results?

Each request returns a task ID. Poll GET /api/v2/feed with it, or use the callback endpoint to receive the result at your URL when the task completes.

How long are generated files stored?

Generated files are not stored permanently and returned URLs are temporary. Download the audio once the task completes and keep it in your own storage.

Can I use the music commercially?

Usage rights are set out in our Terms of Service. Read them, together with our Content Safety rules, before you ship generated music in a commercial product.

Which programming languages work?

Any language that can send HTTPS requests with JSON. The docs include curl and JavaScript examples for every endpoint.

AI Music API (aimusicapi.org) is an independent service. It is not affiliated with, endorsed by or sponsored by any AI model provider, or by similarly named services such as musicapi.ai or aimusicapi.ai. Model names in the docs describe compatibility only. See our Terms and Content Safety pages for acceptable use.

Start Building with AI Music

Claim 24 free trial credits, create an API key and generate your first song in minutes.