create.new_instrumental makes a full piece of music with no vocals. You describe the sound in words (a prompt) or point at a track whose style to follow (a reference). Use it for background music, beds for voiceover, hold music, game and app soundtracks.
For a song with sung lyrics, use create.new_song. For a short clip at an exact length, use create.new_sample.
The request
Send
prompt or reference, not both.
Every field, with its exact rules: submit and poll in the API Reference.
Example
This makes an instrumental in the style of a reference track and saves it. It uses the reference client; savesoundpiece.py or soundpiece.mjs next to it first.
The result
run returns the finished instrumental object, with one entry in outputs per variation:
Choosing parameters
-
Prompt or reference? A prompt is quickest: mix genre, mood, tempo and instruments, separated by commas. A reference is better when you have a track whose feel you want to match. To use a prompt, send it in place of
reference: -
n_variations. Each variation is a different take on the same request. Ask for two or three when you want to choose; each one costs the same as a single piece. -
Loudness. Off unless you include the block. Under a voiceover, consider
adapt.auto_duckinstead, which balances the music against the voice for you. See the loudness normalisation guide for which target to pick.
Errors
When you submit (the request is refused, nothing is charged):
While processing (the operation finishes as
failed, with an error.code):
Reference limits for this endpoint: WAV, MP3 or FLAC, from 1 second to 5 minutes long, and at most 50 MB.
See Errors for the response shapes, and for the errors every endpoint can return (
401, 403, 429).
Cost
3 credits per variation, son_variations: 3 costs 9. Normalisation costs nothing extra. Resending a request with the same idempotency key is not charged again.