Text-to-Music
Endpoint for requesting text2music inference
reference_audio file for style transfer — the model will use it as a stylistic reference for the generated track. The endpoint returns a task ID to track processing status. Ideal for apps needing automated music creation — background tracks, jingles, or full songs with vocals.
slug and check specific limits.Field values worth knowing
These constraints are enforced by validation and are easy to trip over. They are identical on the v2 endpoint,POST /api/v2/audio/music.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
application/json Body
Music generation parameters
Text description of the music to generate
"upbeat electronic dance music with energetic synths"
The model to use for music generation. Available models can be retrieved via the GET /api/v1/client/models endpoint.
"AceStep_1_5_Turbo"
Required, and must not be empty. Lyrics for the music. Use "[Instrumental]" for instrumental tracks without vocals — omitting the field or sending an empty string returns 422 "The lyrics field is required."
1"[Instrumental]"
Duration in seconds. The accepted range is model-specific - read info.limits.min_duration / info.limits.max_duration for your model from the Model Selection endpoint; a value outside that range is rejected with 422. The turbo models accept 10-300, AceStep_1_5_Base 30-300.
30
Number of diffusion inference steps. The accepted range is model-specific - read info.limits.min_steps / info.limits.max_steps for your model from the Model Selection endpoint; a value outside that range is rejected with 422. The turbo models only accept 8; AceStep_1_5_Base accepts 5-100.
8
Classifier-free guidance scale. The accepted range is model-specific - read info.limits.min_guidance / info.limits.max_guidance for your model from the Model Selection endpoint; a value outside that range is rejected with 422. The turbo models (AceStep_1_5_Turbo, AceStep_1_5_XL_Turbo_INT8) only accept 1; AceStep_1_5_Base accepts 3-20.
1
Random seed. Use -1 for random.
-1
Audio output format. One of mp3, wav or flac. Any other value returns 422 "The selected format is invalid." mp3 is recommended for size; wav and flac are lossless and produce much larger result files.
mp3, wav, flac "mp3"
Beats per minute. The accepted range is model-specific - read info.limits.min_bpm / info.limits.max_bpm for your model from the Model Selection endpoint. The ACE-Step models accept 50-200.
120
Musical key/scale, as a free-form string (e.g. "C major", "F# minor", "D minor"). Not validated against a fixed list — the value is passed to the model as a hint.
"C major"
Time signature, as the number of beats per bar. Integer only — one of 2, 3, 4 or 6. Musical notation strings such as "4/4" or "3/4" are rejected with 422 "The timesignature field must be an integer." Map the numerator of a x/4 signature to this field (4/4 -> 4, 3/4 -> 3, 2/4 -> 2, 6/8 -> 6). Signatures that cannot be expressed as 2, 3, 4 or 6 (e.g. 5/4, 7/8) are not supported. Omit the field or send an empty value to let the model choose automatically.
2, 3, 4, 6 4
Language for vocals, as a free-form string. Both ISO codes ("en", "es", "fr") and language names ("English") are accepted. Not validated against a fixed list — the value is passed to the model as a hint.
"en"
Optional reference audio file for style transfer. Supported formats: mp3, ogg, m4a. Max size configurable (default 15MB). Duration must be within model-specific limits.
Optional HTTPS URL to receive webhook notifications for job status changes (processing, completed, failed). Must be HTTPS. Max 2048 characters.
2048"https://your-server.com/webhooks/deapi"
Response
ID of the inference request.
Information from success endpoint