maskstring
Mask matching the source dimensions. Black edits, white preserves. Must contain both regions after rounding.
ideogram/4.6/editIdeogram 4.6 Edit changes an image from a text instruction, with optional mask and reference images, keeping text rendering sharp.
Probar el modelo
PNG, JPEG, WebP o GIF · máximo 20 MiB
PNG, JPEG, WebP o GIF · máximo 20 MiB
PNG, JPEG, WebP, or GIF · 20 MiB maximum each
Seleccione un ejemplo para cargar sus entradas y el resultado en el playground.
{
"aspect_ratio": "16:9",
"image": "https://static.sandbase.ai/examples/3ee7e615-fd9a-4e53-b457-2790e4b945ba/input/1afe56cd-80cf-44e1-a55d-3218e5c95995.png",
"prompt": "add the word SALE in red"
}{
"aspect_ratio": "16:9",
"image": "https://static.sandbase.ai/examples/88ea41ea-fbce-48a9-a5fe-45dadc09e9fa/input/ed5f398b-7d7a-4621-923c-ef7950f6a04b.png",
"prompt": "change the background to a snowy street at night"
}Ideogram 4.6 edit: change an image from an instruction, with an optional mask and style references.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 10,000 characters. |
image | image URL, required | — | Image to edit. JPEG, PNG, or WebP URL. |
mask | image URL | — | Optional mask; white areas are edited. |
edit_precision | regular / high | regular | high keeps unmasked areas closer to the original. |
reference_image_urls | image URL[] | — | Optional style references. |
quality | very_low / very_low / low / medium / high | medium | Sets the per-image rate. |
aspect_ratio | 21:9 / 16:9 / 3:2 / 4:3 / 5:4 / 1:1 / 4:5 / 3:4 / 2:3 / 9:16 | — | Output shape. |
seed | integer | random | Fix it to compare prompt changes. |
Per image: $0.008 very_low, $0.03 low, $0.06 medium, $0.22 high.
| Quality | Price |
|---|---|
| very_low | $0.008 |
| low | $0.03 |
| medium | $0.06 |
| high | $0.22 |
| Failed runs are not charged. |
Related: ideogram/4.6, ideogram/4.5/edit.
Empiece a construir
Envíe este modelo a través de la API de ejecución unificada de SandBase.
# 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/4.6/edit",
"prompt": "A colorful storefront with a sign reading hello",
"quality": "medium",
"edit_precision": "regular"
}
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"Cree una clave de API de SandBase y configúrela en el entorno de su servidor. Todas las solicitudes usan autenticación Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conserve la clave en el servidor. No la exponga en código del navegador ni la confirme en un repositorio.
Haga un POST a /v1/run con este ID de modelo y sus entradas. El ejemplo de solicitud anterior incluye el envío y el sondeo.
Use el ID de ejecución devuelto para sondear hasta que el estado sea completed, failed o timeout. Lea la salida solo después de completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Proporcione una URL de archivo accesible públicamente en el campo de imagen, video o audio del modelo. Los formatos y límites admitidos se muestran junto a cada entrada de Playground.
Use el control de subir o reemplazar en los campos de imagen admitidos en Playground. Los campos de URL de video aceptan un video de conducción alojado; no implican compatibilidad con la subida de video.
maskstringMask matching the source dimensions. Black edits, white preserves. Must contain both regions after rounding.
seedintegerRandom seed. Omit to choose automatically.
imagestringrequeridoPrimary source image to edit.
promptstringrequeridoThe generation or editing prompt.
qualitystringQuality tier for either edit precision. Defaults to medium.
Valor predeterminado: "medium"
Valores posibles: "very_low", "low", "medium", "high"
aspect_ratiostringThe aspect ratio of the generated image.
Valores posibles: "21:9", "16:9", "3:2", "4:3", "5:4", "1:1", "4:5", "3:4", "2:3", "9:16"
edit_precisionstringregular uses Generate; high uses Precise Edit with unchanged-pixel restoration. Both always prepare structured edit instructions.
Valor predeterminado: "regular"
Valores posibles: "regular", "high"
reference_image_urlsarrayUp to four references plus the primary source, or three references plus the primary source and mask.
{
"model": "ideogram/4.6/edit",
"prompt": "A colorful storefront with a sign reading hello",
"quality": "medium",
"edit_precision": "regular"
}Una ejecución completada expone su resultado en la salida. Lo siguiente es el ejemplo guardado del modelo, no una nueva generación.
[
{
"url": "https://static.sandbase.ai/examples/3ee7e615-fd9a-4e53-b457-2790e4b945ba/output/22ae9074-722b-4433-8b1a-eaa223ddf6d6.png"
}
]