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 и задайте его в окружении сервера. Все запросы используют аутентификацию Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Храните ключ на сервере. Не раскрывайте его в коде браузера и не коммитьте в репозиторий.
Отправьте POST на /v1/run с этим ID модели и её входными данными. Пример запроса выше включает отправку и опрос.
Используйте возвращённый ID запуска, чтобы опрашивать статус до завершения, ошибки или таймаута. Читайте вывод только после завершения.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Передайте публично доступный URL файла в поле image, video или audio модели. Поддерживаемые форматы и лимиты показаны рядом с каждым полем Playground.
Используйте управление загрузкой или заменой в поддерживаемых полях изображений в Playground. Поля URL видео принимают размещённое видео для вождения; это не означает поддержку загрузки видео.
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"
}В завершённом запуске результат доступен в 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"
}
]