最近抓取:2026-12-04 21:20:10(北京时间)
最近内容变化:2026-12-02 08:47:23(北京时间)
这是最近一次有效抓取的文本快照,不含网页脚本、图片和动态交互内容。实际网页可能已更新。
访问原网页页面简介
Stable Audio transforms existing audio samples into new high-quality compositions up to six 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 for free at stableaudio.com. This endpoint is asynchronous — it returns a generation id immediately (HTTP 202). Poll GET /v2beta/audio/results/{id} to retrieve the result. > Note: > - We do not allow copyrighted content to be uploaded to our platform. > - Maximum request size is 100Mb. ### Credits Stable Audio 3.0 Flat rate of 8 credits per successful generation. As always, you will not be charged for failed generations.
正文摘录
cURLcURLgeneration_id=$(curl -sS -f "https://api.stability.ai/v2beta/audio/stable-audio/inpaint" \ -H "authorization: Bearer sk-MYAPIKEY" \ -H "accept: audio/*" \ -F prompt="Replace the middle section with flowing piano and soft strings." \ -F output_format="mp3" \ -F duration="30" \ -F mask_start="10" \ -F mask_end="20" \ -F audio=@"./input.mp3" \ | jq -r '.id') while true; do http_status=$(curl -sS -f \ -o "./output.mp3" \ -w '%{http_code}' \ -H "authorization: Bearer sk-MYAPIKEY" \ -H "accept: audio/*" \ "https://api.stability.ai/v2beta/audio/results/${generation_id}") case $http_status in 202) echo "Still processing. Retrying in 10 seconds..."; sleep 10 ;; 200) echo "Download complete!"; break ;; *) echo "Error: $http_status"; exit 1 ;; esac done202Example{ "id": "a6dc6c6e20acda010fe14d71f180658f2896ed9b4ec25aa99a6ff06c796987c4" }POST/v2beta/audio/stable-audio/inpaintTry itcURLcURLgeneration_id=$(curl -sS -f "https://api.stability.ai/v2beta/audio/stable-audio/inpaint" \ -H "authorization: Bearer sk-MYAPIKEY" \ -H "accept: audio/*" \ -F prompt="Replace the middle section with flowing piano and soft strings." \ -F output_format="mp3" \ -F duration="30" \ -F mask_start="10" \ -F mask_end="20" \ -F audio=@"./input.mp3" \ | jq -r '.id') while true; do http_status=$(curl -sS -f \ -o "./output.mp3" \ -w '%{http_code}' \ -H "authorization: Bearer sk-MYAPIKEY" \ -H "accept: audio/*" \ "https://api.stability.ai/v2beta/audio/results/${generation_id}") case $http_status in 202) echo "Still processing. Retrying in 10 seconds..."; sleep 10 ;; 200) echo "Download complete!"; break ;; *) echo "Error: $http_status"; exit 1 ;; esac done202Example{ "id": "a6dc6c6e20acda010fe14d71f180658f2896ed9b4ec25aa99a6ff06c796987c4" }AuthorizationsAuthorizationstringheaderrequiredYour Stability API key, sent as a bearer token in the Authorization header.Headersacceptenum<string>default:audio/*Specify audio/* to receive the bytes of the audio directly. Otherwise specify application/json to receive the audio as base64 encoded JSON.Available options: audio/*, application/json stability-client-idstringThe name of your application, used to help us communicate app-specific debugging or moderation issues to you.Maximum string length: 256Example:"my-awesome-app"stability-client-user-idstringA unique identifier for your end user. Used to help us communicate user-specific debugging or moderation issues to you. Feel free to obfuscate this value to protect user privacy.Maximum string length: 256Example:"DiscordUser#9999"stability-client-versionstringThe version of your application, used to help us communicate version-specific debugging or moderation issues to you.Maximum string length: 256Example:"1.2.1"Bodymultipart/form-datapromptstringrequiredWhat 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.Maximum string length: 10000audiofilerequiredThe audio to be used as the starting point for the generation. Supported Formats: mp3 wav Validation Rule: Audio must be between 6 and 380 seconds long modelenum<string>default:stable-audio-3The model to use for generation. stable-audio-3 requires 8 credits per generation Available options: stable-audio-3 durationnumberdefault:190Controls the duration in seconds of the generated audio.Required range: 1 <= x <= 380seednumberdefault:0A specific value that is used to guide the 'randomness' of the generation. (Omit this parameter or pass 0 to use a random seed.)Required range: 0 <= x <= 4294967294stepsintegerdefault:8Controls the number of sampling steps.Required range: 4 <= x <= 8cfg_scalenumberdefault:1How strictly the diffusion process adheres to the prompt text (higher values make your audio closer to your prompt). Defaults to 1 if not specified.Required range: 1 <= x <= 25output_formatenum<string>default:mp3Dictates the content-type of the generated audio.Available options: mp3, wav mask_startnumberdefault:30Required range: 0 <= x <= 380mask_endnumberdefault:380Required range: 0 <= x <= 380Response202application/jsonGeneration started. Use the returned id to poll for the result.idstringrequiredThe id of a generation, typically used for async generations, that can be used to check the status of the generation or retrieve the result.Required string length: 64Example:"a6dc6c6e20acda010fe14d71f180658f2896ed9b4ec25aa99a6ff06c796987c4"