Music
Generate music from a description, with or without lyrics.
POST /v1/audio/music submits a music job. It answers 202 with a job; see
How media jobs work for polling and output.
curl https://api.opinference.com/v1/audio/music \
-H "Authorization: Bearer $OP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "ace-step/ace-step-v1-3.5b",
"prompt": "Calm lo-fi piano loop",
"duration_seconds": 30
}'Inputs
| Input | Meaning |
|---|---|
prompt | Style, mood and instruments |
lyrics | Words to sing, where the model can |
duration_seconds | Length of the track |
The model's page at opinference.com/models lists its inputs and ranges.
Output
One audio file in output[]. Music is usually priced per second of audio, and
usage.units.audio_seconds counts them.