Inpaint
Stable Audio 2.5 transforms existing audio samples into new high-quality compositions up to three minutes long at 44.1kHz stereo using text instructions.
Try it out
Click Try it to test this endpoint with your API key, or try Stable Audio 2.0 for free at stableaudio.com.
How to use
Please invoke this endpoint with a POST request.
The headers of the request must include an API key in the authorization field. The body of the request must be
multipart/form-data. The accept header should be set to one of the following:
audio/*to receive the audio in the format specified by theoutput_formatparameter.application/jsonto receive the audio encoded as base64 in a JSON response.
The body of the request should include:
prompt- text to generate the audio fromaudio- the audio to use as the starting point for the generation
Notes:
- We do not allow copyrighted content to be uploaded to our platform.
- Maximum request size is 50Mb.
Optional Parameters:
The body may optionally include:
output_format- the format of the output audioseed- the randomness seed to use for the generationduration- the number of seconds of the generated audiosteps- the number of sampling stepsmask_start- start time in seconds for the audio segment to be inpainted (e.g., 30.0 for 30.0 seconds)mask_end- end time in seconds for the audio segment to be inpainted (e.g., 190.0 for 190.0 seconds)
Note: for more details about these parameters please see the request schema below.
Credits
Stable Audio 2.5
Flat rate of 8 credits per successful generation.
As always, you will not be charged for failed generations.
Authorizations
Your Stability API key, sent as a bearer token in the Authorization header.
Headers
Body
What you wish the output audio to be. A strong, descriptive prompt that clearly defines instruments, moods, styles, and genre will lead to better results.
You can make a prompt as simple or complex as you like. Simple prompts are good for clean output audio. Complex prompts are good for adding texture and depth to the output audio.
10000Response
Generation was successful.
The bytes of the generated audio.
The finish-reason and seed will be present as headers.