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.
model को आज़माएँ
PNG, JPEG, WebP, या GIF · अधिकतम 20 MiB
PNG, JPEG, WebP, or GIF · 20 MiB maximum each
PNG, JPEG, WebP, या GIF · अधिकतम 20 MiB
प्लेग्राउंड में इसके इनपुट और परिणाम लोड करने के लिए कोई उदाहरण चुनें।
{
"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).
बिल्डिंग शुरू करें
इस model को 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 बनाएँ और इसे अपने server environment में सेट करें। सभी requests Bearer authentication का उपयोग करती हैं।
export SANDBASE_API_KEY="YOUR_API_KEY"Key को सर्वर पर रखें। इसे browser code में expose न करें या repository में commit न करें।
इस model ID और इसके inputs के साथ /v1/run पर POST करें। ऊपर दिया गया request example submission और polling दोनों शामिल करता है।
Completed, failed या timeout होने तक poll करने के लिए लौटाए गए run ID का उपयोग करें। Output केवल completed होने के बाद पढ़ें।
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Model के image, video या audio field में सार्वजनिक रूप से उपलब्ध फ़ाइल URL पास करें। समर्थित formats और limits प्रत्येक Playground input के पास दिखाए गए हैं।
Playground में समर्थित image fields पर upload या replace control का उपयोग करें। Video URL fields hosted driving video स्वीकार करते हैं; इससे video-upload support का संकेत नहीं मिलता।
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 में दिखाता है। नीचे दिया गया model का सेव किया हुआ example है, नई generation नहीं।
[
{
"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"
}
]