Developer / API

Generating audio (music and sound)

Both audio models are live. ace-step is the music engine (48kHz stereo, Apache-2.0, sellable) and the default; audioldm is short 16kHz sound effects on non-commercial weights. Check the status and commercialOk fields on a catalog row before building against any model.

Audio uses the same submit-and-poll flow as every other lane (see the generation API). Send mode of audio and a model id from the catalog.

POST /v1/generate
{
  "mode": "audio",
  "model": "ace-step",
  "prompt": "lo-fi hip hop, warm rhodes, vinyl crackle, relaxed",
  "params": { "duration": 90, "lyrics": "" }
}

Poll GET /v1/generations/{id} until status is done; result is then the path to the stored audio file.

prompt is style, params.lyrics is the words

prompt is the style line - genre, instruments, mood, production. params.lyrics is the sung text. Either alone is a valid request; both empty is a bad_request. Lyrics placed in prompt are read as mood description and never sung.

The params object

Per-model tunables go in params. All are optional, and an omitted value uses a tuned default rather than the underlying library default.

  • lyrics - string, up to 4000 characters. Blank gives an instrumental.
  • duration - seconds, 5 to 240. Default 120.
  • steps - 10 to 120. Default 60, which is the quality setting; past 60 buys very little.
  • guidance_scale - 1.1 to 30. Default 15. The floor is 1.1 because exactly 0 or 1 disables guidance entirely.
  • omega_scale - 1 to 20. Default 10. Leave it unless the mix sounds smeared.
  • scheduler - euler (default) or heun. heun is second-order: cleaner transients, roughly twice the render time.
  • format - wav (default, 48kHz stereo), mp3, or flac.
  • seed - integer. Same prompt, settings and seed reproduce the take.

Out-of-range values are clamped, not rejected

Asking for duration: 500 returns a 240-second track, not an error. The worker echoes back the settings it actually used, so read those rather than assuming the request went through verbatim.

Do not hardcode the ranges

GET /v1/models?type=audio returns each audio model with a params array carrying these names, types, ranges and defaults as data. Build controls off that and your client stays correct when a model is added or a range moves.

Licence gating is part of the API

ace-step ships Apache-2.0 weights and its output can be sold. audioldm ships CC BY-NC-SA weights and its output cannot. Models in the second group carry a non-commercial tag and commercialOk: false on their catalog row, so this can be enforced in code instead of remembered.

Timing

A warm worker renders faster than real time. A cold worker must start and load a checkpoint first, so the first request after an idle period can take several minutes. The audio job timeout is 40 minutes - poll, do not hold a connection open.


Did this answer your question? If not, contact our team and a real person will help.