Stable Audio 2.5 Inpaint
stability-ai/stable-audio/2.5/inpaintStable Audio 2.5 Inpaint by Stability AI regenerates a chosen time range of an existing clip from a text prompt and keeps the rest, producing up to 190 seconds of audio.
- Prezzo base
- $0.20USD / esecuzione
- Esecuzione
- async
- Tipo di modello
- audio
- Campi di input
- 6
Prova il modello
Playground
Il tuo output apparirà qui
Completa gli input, poi fai clic su Esegui.
Scheda del modello
Specifiche
Prezzi
- Prezzo base
- $0.20 / esecuzione
Contesto e modalità
- Input
- Definito dallo schema
- Output
- audio
Funzionalità
- Chat
- Non supportato
- Vision
- Non supportato
- Ragionamento
- Non supportato
- Output strutturato
- Non supportato
- Chiamata di funzione
- Non supportato
- Input audio
- Non supportato
Accesso
- Provider
- Stability AI
- ID modello
- stability-ai/stable-audio/2.5/inpaint
- Esecuzione
- async
- URL base
- https://api.sandbase.ai
- API
- Unified Run API
- Endpoint
- /v1/run
README API
Stable Audio 2.5 Inpaint
Regenerates one time range of a source clip from a prompt and keeps the rest, up to 190 seconds of output.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Text description of what the masked region should become. |
audio | audio file or URL, required | — | Source audio file or URL. Only the masked region is regenerated. |
mask_start | integer 0–190 | 30 | Start of the region to regenerate, in seconds. |
mask_end | integer 0–190 | 190 | End of the region to regenerate; must be after mask_start. |
duration | integer 1–190 | 190 | Length of the generated audio in seconds (1–190). |
seed | integer | random | Fix it to compare prompt changes. |
Billing
$0.20 per generation, regardless of duration or settings.
| Request | Price |
|---|---|
| One track | $0.20 |
| 10 tracks | $2.00 |
Failed runs are not charged.
Prompting
- Describe only what the masked region should contain; keep
durationequal to the source length to avoid padding.
Also on SandBase
Related: stability-ai/stable-audio/2.5/audio-to-audio, stability-ai/stable-audio/2.5/text-to-audio, stability-ai/stable-audio/3/medium/audio-inpainting.
Inizia a costruire
Invia la tua prima richiesta
Endpoint compatibile con OpenAI con autenticazione unificata e tracciamento dell'utilizzo.
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "stability-ai/stable-audio/2.5/inpaint",
"audio": "https://static.sandbase.ai/examples/stability-ai/stable-audio/2.5/inpaint/input_audio_0.mp3",
"prompt": "Lofi hip hop beat, chillhop",
"duration": 190,
"mask_end": 40,
"mask_start": 15
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"Schema di input
6 parametri · 2 obbligatori · 4 facoltativi
| Parametro | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
audio | string | Obbligatorio | Source audio file or URL. Only the masked region is regenerated. |
prompt | string | Obbligatorio | Text description of what the masked region should become. |
seed | integer | Facoltativo | Random seed for reproducible outputs. |
duration | integer | Facoltativo | Length of the generated audio in seconds (1–190). · Min: 1 · Max: 190 · Predefinito: 190 |
mask_end | integer | Facoltativo | End of the region to regenerate, in seconds (0–190). Must be greater than mask_start. · Min: 0 · Max: 190 · Predefinito: 190 |
mask_start | integer | Facoltativo | Start of the region to regenerate, in seconds (0–190). · Min: 0 · Max: 190 · Predefinito: 30 |
Schema di output
| Campo | Tipo | Descrizione |
|---|---|---|
id | string | Identificatore univoco dell'attività di generazione |
status | string | Stato dell'attività: pending, running, completed, failed, timeout |
model | string | Modello usato per la generazione |
outputs | array | Array di elementi di output |
outputs[].url | string | URL dell'artefatto generato |
outputs[].content_type | string | Tipo MIME (ad esempio image/png, video/mp4) |
error | object | null | Dettagli dell'errore in caso di fallimento, null in caso di successo |
error.type | string | Codice del tipo di errore leggibile dalla macchina |
error.message | string | Descrizione dell'errore leggibile dall'utente |
Workflow asincrono
Questo modello funziona in modo asincrono. Invia una richiesta, quindi esegui il polling per ottenere il risultato.
- Invio: esegui POST su /v1/run e leggi il
idrestituito. - Polling: esegui GET /v1/run/{id} finché lo stato non è
completed,failedotimeout. - Recupero: leggi
outputsdalla risposta completata.
Scegli il tuo modello
Confronta i modelli
| Modello | Tipo | Prezzo predefinito | Rilasciato |
|---|---|---|---|
Stable Audio 2.5 InpaintQuesto modello Stability AI | Audio | $0.20 / esecuzione | 10 set 2025 |
Stability AI | Audio | $0.06 / esecuzione | 3 giu 2026 |
Stability AI | Audio | $0.05 / esecuzione | 3 giu 2026 |
Stability AI | Audio | $0.05 / esecuzione | 3 giu 2026 |
Stability AI | Audio | $0.05 / esecuzione | 3 giu 2026 |
Stability AI | Audio | $0.03 / esecuzione | 3 giu 2026 |
Domande
FAQ
Come chiamo Stability AI Stable Audio 2.5 Inpaint tramite SandBase?
Crea una chiave API SandBase, poi invia richieste con l'ID modello "stability-ai/stable-audio/2.5/inpaint" a Unified Run API (/v1/run) su https://api.sandbase.ai. Gli esempi di richiesta in questa pagina mostrano il payload esatto.
Mi serve un account Stability AI separato?
No. Una sola chiave API e un solo saldo SandBase ti danno accesso a Stability AI Stable Audio 2.5 Inpaint e agli altri modelli del catalogo; non è necessario registrarsi separatamente su Stability AI.
