maskstring
The mask URL to inpaint the image. MUST have the exact same dimensions (width and height) as the input image.
ideogram-ai/ideogram-v3/editIdeogram V3 Edit by ideogram-ai - AI-powered image editing, style transfer, and transformation. Edit photos with natural language instructions, remove backgrounds, change styles, and enhance images effortlessly.
ลองใช้โมเดล
PNG, JPEG, WebP หรือ GIF · สูงสุด 20 MiB
PNG, JPEG, WebP, or GIF · 20 MiB maximum each
PNG, JPEG, WebP หรือ GIF · สูงสุด 20 MiB
เลือกตัวอย่างเพื่อโหลดอินพุตและผลลัพธ์ลงใน playground
{
"image": "https://static.sandbase.ai/examples/fef92fd9-0a39-4571-841d-06952aa5e9c6/input/e6ec02d2-e595-4933-8819-321bf1c82b1a.png",
"prompt": "black bag"
}Ideogram 3.0 edit: inpaint a masked region of an image from a prompt.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Text instruction. |
image | image URL, required | — | Image to edit. JPEG, PNG, or WebP URL. |
images | image URL[] | — | Optional style references. |
mask | image URL | — | Area to edit. |
rendering_speed | TURBO / BALANCED / QUALITY | BALANCED | Sets the per-image rate. |
seed | integer | random | Fix it to compare prompt changes. |
Per image: $0.03 Turbo, $0.06 Balanced, $0.09 Quality.
| Speed | Price |
|---|---|
| TURBO | $0.03 |
| BALANCED | $0.06 |
| QUALITY | $0.09 |
Failed runs are not charged.
Related: ideogram/4.5 (newer).
เริ่มสร้าง
ส่งโมเดลนี้ผ่าน SandBase Unified Run API
# 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": "ideogram-ai/ideogram-v3/edit",
"mask": "https://static.sandbase.ai/examples/ideogram-ai/ideogram-v3/edit/input_mask_1.png",
"image": "https://static.sandbase.ai/examples/ideogram-ai/ideogram-v3/edit/output_url_0.png",
"prompt": "black bag",
"rendering_speed": "BALANCED"
}
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"สร้าง SandBase API key และตั้งค่าไว้ในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอทั้งหมดใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์หรือคอมมิตลง repository
POST ไปที่ /v1/run ด้วย model ID นี้และอินพุตของมัน ตัวอย่างคำขอด้านบนมีทั้งการส่งและการ polling
ใช้ run ID ที่ส่งกลับมาเพื่อ polling จนกว่าสถานะจะเป็น completed, failed หรือ timeout ให้อ่าน output หลังจาก completed เท่านั้น
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"ส่ง URL ไฟล์ที่เข้าถึงได้สาธารณะในช่อง image, video หรือ audio ของโมเดล รูปแบบและข้อจำกัดที่รองรับแสดงอยู่ข้างแต่ละอินพุตใน Playground
ใช้ตัวควบคุม upload หรือ replace ในช่องรูปภาพที่รองรับใน Playground ช่อง URL ของวิดีโอรองรับวิดีโอ driving ที่โฮสต์ไว้; ไม่ได้หมายความว่าสามารถอัปโหลดวิดีโอได้
maskstringThe mask URL to inpaint the image. MUST have the exact same dimensions (width and height) as the input image.
seedintegerSeed for the random number generator
imagestringจำเป็นThe image URL to generate an image from. MUST have the exact same dimensions (width and height) as the mask image.
imagesarrayA set of images to use as style references (maximum total size 10MB across all style references). The images should be in JPEG, PNG or WebP format
promptstringจำเป็นThe prompt to fill the masked part of the image.
rendering_speedstringThe rendering speed to use.
ค่าเริ่มต้น: "BALANCED"
ค่าที่เป็นไปได้: "TURBO", "BALANCED", "QUALITY"
{
"model": "ideogram-ai/ideogram-v3/edit",
"mask": "https://static.sandbase.ai/examples/ideogram-ai/ideogram-v3/edit/input_mask_1.png",
"image": "https://static.sandbase.ai/examples/ideogram-ai/ideogram-v3/edit/output_url_0.png",
"prompt": "black bag",
"rendering_speed": "BALANCED"
}run ที่เสร็จสมบูรณ์จะแสดงผลลัพธ์ใน output ต่อไปนี้เป็นตัวอย่างที่บันทึกไว้ของโมเดล ไม่ใช่การสร้างใหม่
[
{
"source": "Ideogram schema mirror",
"source_url": "https://developer.ideogram.ai/",
"url": "https://static.sandbase.ai/examples/fef92fd9-0a39-4571-841d-06952aa5e9c6/output/5ffb7ae6-c5f7-4ea5-8883-ec92c71a6572.png"
}
]