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.
Essayer le modèle
PNG, JPEG, WebP ou GIF · 20 MiB maximum
PNG, JPEG, WebP ou GIF · 20 MiB maximum
PNG, JPEG, WebP, or GIF · 20 MiB maximum each
Sélectionnez un exemple pour charger ses entrées et son résultat dans le 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.
Commencer à construire
Soumettez ce modèle via l'API Unified Run 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"Créez une clé API SandBase et définissez-la dans l'environnement de votre serveur. Toutes les requêtes utilisent l'authentification Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conservez la clé sur votre serveur. Ne l'exposez pas dans le code du navigateur et ne la committez pas dans un dépôt.
Faites un POST sur /v1/run avec cet ID de modèle et ses entrées. L'exemple de requête ci-dessus inclut la soumission et le polling.
Utilisez l'ID d'exécution renvoyé pour interroger jusqu'à ce que le statut soit completed, failed ou timeout. Ne lisez la sortie qu'une fois completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Passez une URL de fichier accessible publiquement dans le champ image, video ou audio du modèle. Les formats pris en charge et les limites sont indiqués à côté de chaque entrée du Playground.
Utilisez le contrôle upload ou replace sur les champs image pris en charge dans le Playground. Les champs URL vidéo acceptent une vidéo de conduite hébergée ; cela n'implique pas la prise en charge de l'importation vidéo.
maskstringMask matching the source dimensions. Black edits, white preserves. Must contain both regions after rounding.
seedintegerRandom seed. Omit to choose automatically.
imagestringobligatoirePrimary source image to edit.
promptstringobligatoireThe generation or editing prompt.
qualitystringQuality tier for either edit precision. Defaults to medium.
Par défaut : "medium"
Valeurs possibles : "very_low", "low", "medium", "high"
aspect_ratiostringThe aspect ratio of the generated image.
Valeurs possibles : "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.
Par défaut : "regular"
Valeurs possibles : "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"
}Une exécution terminée expose son résultat dans output. Ce qui suit est l'exemple enregistré du modèle, et non une nouvelle génération.
[
{
"url": "https://static.sandbase.ai/examples/3ee7e615-fd9a-4e53-b457-2790e4b945ba/output/22ae9074-722b-4433-8b1a-eaa223ddf6d6.png"
}
]