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.
- ราคาพื้นฐาน
- $0.20USD / การรัน
- การทำงาน
- async
- ประเภโมเดล
- audio
- ฟิลด์อินพุต
- 6
ลองใช้โมเดล
Playground
เอาต์พุตของคุณจะแสดงที่นี่
กรอกอินพุตให้ครบ แล้วคลิก Run
การ์ดโมเดล
ข้อมูลจำเพาะ
ราคา
- ราคาพื้นฐาน
- $0.20 / การรัน
บริบทและ modalities
- อินพุต
- กำหนดตามสคีมา
- เอาต์พุต
- audio
ความสามารถ
- แชท
- ไม่รองรับ
- วิชัน
- ไม่รองรับ
- การให้เหตุผล
- ไม่รองรับ
- เอาต์พุตแบบมีโครงสร้าง
- ไม่รองรับ
- การเรียกใช้ฟังก์ชัน
- ไม่รองรับ
- อินพุตเสียง
- ไม่รองรับ
การเข้าถึง
- ผู้ให้บริการ
- Stability AI
- รหัสโมเดล
- stability-ai/stable-audio/2.5/inpaint
- การทำงาน
- async
- Base URL
- https://api.sandbase.ai
- API
- Unified Run API
- Endpoint
- /v1/run
API README
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.
เริ่มสร้าง
ส่งคำขอแรกของคุณ
เอ็นด์พอยต์ที่ใช้งานร่วมกับ OpenAI ได้ พร้อมการยืนยันตัวตนและการติดตามการใช้งานแบบรวมศูนย์
# 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"สคีมาขาเข้า
6 พารามิเตอร์ · จำเป็น 2 · ไม่บังคับ 4
| พารามิเตอร์ | ประเภท | จำเป็น | คำอธิบาย |
|---|---|---|---|
audio | string | จำเป็น | Source audio file or URL. Only the masked region is regenerated. |
prompt | string | จำเป็น | Text description of what the masked region should become. |
seed | integer | ไม่บังคับ | Random seed for reproducible outputs. |
duration | integer | ไม่บังคับ | Length of the generated audio in seconds (1–190). · ต่ำสุด: 1 · สูงสุด: 190 · ค่าเริ่มต้น: 190 |
mask_end | integer | ไม่บังคับ | End of the region to regenerate, in seconds (0–190). Must be greater than mask_start. · ต่ำสุด: 0 · สูงสุด: 190 · ค่าเริ่มต้น: 190 |
mask_start | integer | ไม่บังคับ | Start of the region to regenerate, in seconds (0–190). · ต่ำสุด: 0 · สูงสุด: 190 · ค่าเริ่มต้น: 30 |
สคีมาเอาต์พุต
| ฟิลด์ | ประเภท | คำอธิบาย |
|---|---|---|
id | string | ตัวระบุเฉพาะสำหรับงาน generation |
status | string | สถานะงาน: pending, running, completed, failed, timeout |
model | string | โมเดลที่ใช้สำหรับ generation |
outputs | array | อาร์เรย์ของรายการเอาต์พุต |
outputs[].url | string | URL ของอาร์ติแฟกต์ที่สร้างขึ้น |
outputs[].content_type | string | ประเภท MIME (เช่น image/png, video/mp4) |
error | object | null | รายละเอียดข้อผิดพลาดหากล้มเหลว, เป็น null เมื่อสำเร็จ |
error.type | string | รหัสประเภทข้อผิดพลาดที่เครื่องอ่านได้ |
error.message | string | คำอธิบายข้อผิดพลาดที่มนุษย์อ่านได้ |
เวิร์กโฟลว์แบบอะซิงก์
โมเดลนี้ทำงานแบบอะซิงโครนัส ส่งคำขอแล้วคอยตรวจผลลัพธ์
- ส่ง: POST ไปที่ /v1/run แล้วอ่าน
idที่ส่งกลับมา - คอยตรวจ: GET /v1/run/{id} จนกว่าสถานะจะเป็น
completed,failedหรือtimeout - ดึงข้อมูล: อ่าน
outputsจากการตอบกลับที่เสร็จสมบูรณ์
เลือกโมเดลของคุณ
เปรียบเทียบโมเดล
| โมเดล | ประเภท | ราคามาตรฐาน | เปิดตัว |
|---|---|---|---|
Stable Audio 2.5 Inpaintโมเดลนี้ Stability AI | เสียง | $0.20 / ครั้ง | 10 ก.ย. 2568 |
Stability AI | เสียง | $0.06 / ครั้ง | 3 มิ.ย. 2569 |
Stability AI | เสียง | $0.05 / ครั้ง | 3 มิ.ย. 2569 |
Stability AI | เสียง | $0.05 / ครั้ง | 3 มิ.ย. 2569 |
Stability AI | เสียง | $0.05 / ครั้ง | 3 มิ.ย. 2569 |
Stability AI | เสียง | $0.03 / ครั้ง | 3 มิ.ย. 2569 |
คำถาม
คำถามที่พบบ่อย
ฉันจะเรียก Stability AI Stable Audio 2.5 Inpaint ผ่าน SandBase ได้อย่างไร?
สร้าง SandBase API key แล้วส่งคำขอด้วย model ID "stability-ai/stable-audio/2.5/inpaint" ไปที่ Unified Run API (/v1/run) ที่ https://api.sandbase.ai ตัวอย่างคำขอบนหน้านี้แสดง payload ที่ถูกต้องทั้งหมด
ฉันจำเป็นต้องมีบัญชี Stability AI แยกต่างหากไหม?
ไม่จำเป็น SandBase API key และยอดคงเหลือหนึ่งชุดให้คุณเข้าถึง Stability AI Stable Audio 2.5 Inpaint และโมเดลอื่น ๆ ในแค็ตตาล็อกได้ คุณไม่ต้องสมัครใช้งานกับ Stability AI แยกต่างหาก
