latestOpenAPI 3.1.12026-08-22330162.7 KB

35448566f143

Music

Generate a song

Generates an original song from a text prompt using AI. Use it as the soundtrack for a music video (POST /music-videos), or download it once ready.

Flow: create the song, then poll GET /music/{id} until status is completed (usually 30-90 seconds). The finished track also appears in GET /music and can be used as musicId in POST /music-videos.

Modes:

  • Simple (default): describe the song in prompt and the AI writes everything (style, and lyrics unless instrumental).
  • Custom (customMode: true): you control style, title, and lyrics directly. prompt is ignored for the words.

Cost: a flat fee per song (see the response creditsUsed). Credits are refunded automatically if generation fails.

post/music

Request body

promptstring required

What the song should be about or sound like, e.g. "an upbeat indie pop track about summer road trips". In custom mode this is optional context; the words come from lyrics and the sound from style.

instrumentalboolean

Set true for a track with no vocals or lyrics.

customModeboolean

Set true to control style, title, and lyrics yourself instead of letting the AI decide from prompt.

stylestring

Custom mode only: the musical style, e.g. "lo-fi hip hop, mellow, jazzy piano".

titlestring

Custom mode only: the song title.

lyricsstring

Custom mode only: the exact lyrics to sing. Ignored when instrumental is true.

Response

OK

musicIdstring uuid required

Poll GET /music/{id} until completed, then use as musicId in POST /music-videos.

status'pending' required
creditsUsednumber required

Credits reserved for this song. Refunded automatically if generation fails.