Skip to main content
POST
Generate music

Authorizations

X-API-KEY
string
header
required

Body

application/json
prompt
string
required

Genre, mood, instruments, tempo, and lyrics if any

Required string length: 1 - 2000
model_id
string | null

A model id from GET /music/models. Omit it for the default model.

duration_seconds
integer | null

Length of the track (10-300 seconds). Omit it to let the model choose; the estimate then assumes 180 seconds.

Required range: 10 <= x <= 300

Response

Successful Response

job_id
string<uuid>
required

Poll GET /music/{job_id} with this ID

estimated_credits
number
required

Expected credits; the job is charged for the length actually generated