← PixelAPI · Tools · All docs · Pricing

AI Music Generator API

Turn a style prompt and lyrics into a full song with vocals, or generate instrumental background music. ACE-Step 1.5 (MIT licence), 10-120 seconds, MP3 output, 28 credits per song or track (≈ $0.028 on Starter).

POST/v1/song/generate

JSON body. Returns the MP3 output_url inline, or a generation_id to poll.

FieldTypeRequiredDescription
promptstringyesStyle description: genre, mood, instruments (max 500 characters).
lyricsstringno*Lyrics to sing (max 2,000 characters). *Required unless instrumental is true.
durationintegernoLength in seconds, 10-120 (default 30).
languagestringnoVocal language: en (default), hi, zh, ja, ko.
instrumentalbooleannoSet true for a track with no vocals.

Example

curl -X POST https://api.pixelapi.dev/v1/song/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "upbeat indie pop, electric guitar, drums", "lyrics": "[verse]\nCity lights are calling me\n[chorus]\nWe run all night", "duration": 60, "language": "en", "instrumental": false}'

# quick jobs return output_url inline; otherwise status is "processing":
curl https://api.pixelapi.dev/v1/song/GENERATION_ID -H "Authorization: Bearer YOUR_API_KEY"

POST/v1/audio/generate (instrumental shortcut)

Same engine and price with instrumental forced on.

FieldTypeRequiredDescription
promptstringyesDescribe the music (genre, mood, instruments).
durationintegernoSeconds, 10-120 (default 30).

Example

curl -X POST https://api.pixelapi.dev/v1/audio/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "calm corporate background music, soft piano and strings", "duration": 30}'

# if the response has status "processing", poll:
curl https://api.pixelapi.dev/v1/song/GENERATION_ID -H "Authorization: Bearer YOUR_API_KEY"

Results

Short songs return output_url in the response. Longer ones return status: "processing" with a generation_id; poll GET /v1/song/{generation_id} until status is completed.

Only submit lyrics you have the right to use.

Try it in the appSong generationInstrumental music

FAQ

How much does a song cost?

28 credits per song or instrumental track, for any length from 10 to 120 seconds. 1 credit = $0.001 on the Starter plan.

Which model generates the songs?

ACE-Step 1.5, released under the MIT licence.

Can I make music without vocals?

Yes. Set instrumental to true on /v1/song/generate, or call /v1/audio/generate.

Which vocal languages are supported?

English, Hindi, Chinese, Japanese and Korean.

What format is the output?

MP3.