Ideogram AI Ideogram V4.5 Edit API Documentation
Playground
Try it on WaveSpeedAI!Ideogram V4.5 Image Edit transforms images with written instructions, reference images, masks, and precision controls, supporting targeted edits, visual refinements, composition changes, and professional creative workflows. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
Features
Ideogram V4.5 Edit modifies an existing image using natural-language instructions, with optional reference images and mask-based control. Use it to change objects, colors, materials, text, layouts, and other visual elements while keeping the source image as the foundation.
Choose between regular editing and high-precision editing depending on how strongly unchanged areas need to be preserved.
Why Choose This?
-
Prompt-based image editing
Modify an existing image with natural-language instructions. -
Targeted visual changes
Change objects, colors, materials, text, styling, and other image elements. -
Reference-image guidance
Add supporting images to guide appearance, products, subjects, or visual direction. -
Mask-based editing
Restrict changes to specific regions while preserving the rest of the image. -
High-precision mode
Useedit_precision=highwhen preserving unaffected image regions is especially important. -
Four quality tiers
Choosevery_low,low,medium, orhighdepending on cost and output requirements.
Parameters
| Parameter | Required | Description |
|---|---|---|
| image | Yes | Public URL of the source image to edit. |
| prompt | Yes | Text instructions describing the desired edit. Supports 1–10000 characters. |
| reference_images | No | Optional reference image URLs. Supports up to 4 images without a mask, or up to 3 when mask_url is provided. |
| mask_url | No | Mask matching the source image dimensions. Black regions may be edited; white regions are preserved. The mask must contain both editable and preserved areas. |
| size | No | Optional output dimensions in width*height format, e.g. 2048*2048. Leave empty to follow the source image. |
| edit_precision | No | Editing precision: regular or high. Default: regular. |
| quality | No | Generation quality: very_low, low, medium, or high. Default: medium. |
How to Use
- Upload the source image — Provide the image you want to modify.
- Write the edit instruction — Describe what should change and what should remain unchanged.
- Add reference images optional — Supply supporting images when appearance or style guidance is useful.
- Add a mask optional — Restrict editing to specific regions when precise localization is needed.
- Choose edit precision — Use
regularfor standard editing orhighwhen preservation of unaffected details matters more. - Choose quality — Select
very_low,low,medium, orhigh. - Submit — Generate and retrieve the edited image.
Pricing
Pricing is based only on the selected quality tier.
| Quality | Price per Image |
|---|---|
| Very Low | $0.008 |
| Low | $0.03 |
| Medium | $0.06 |
| High | $0.22 |
The default medium quality edit costs $0.06 per image.
edit_precision, size, mask_url, and the number of reference_images do not add separate charges.
Best Use Cases
- Product variations — Change product colors, materials, finishes, or visual styling.
- Advertising edits — Revise layouts, graphics, text, and campaign imagery.
- Selective corrections — Modify a specific area while preserving the rest of the source image.
- Interior styling — Change furniture, materials, colors, or decorative elements.
- Typography edits — Revise text or designed visual elements inside an existing image.
- Reference-guided editing — Use supporting images to guide products, subjects, or style changes.
Pro Tips
- State the requested change directly instead of redescribing the entire source image.
- Mention what should remain unchanged when preservation matters.
- Use
edit_precision=highwhen unaffected regions need stronger preservation. - Use a mask when the edit should be limited to a specific part of the image.
- Keep reference images closely related to the requested change.
- Use
very_loworlowquality for rapid iteration before moving to higher-quality output. - Check text, small details, and masked boundaries before publishing the final result.
Notes
- Custom sizes are supported only for regular edits without a mask. Dimensions must be at least 256px and multiples of 32, with a maximum of 4,194,304 pixels and an aspect ratio no greater than 6:1.
- Leave
sizeempty to follow the source image. - For high-precision or masked edits, leave
sizeunset. - Masks must match the source image dimensions and contain both black areas to edit and white areas to preserve.
- Up to 4 reference images are supported, or 3 when using a mask. Only the source
imageis edited. - Large input images may be downscaled.
Related Models
- Ideogram V4.5 — Generate images from text with typography, composition, and prompt control.
- Ideogram V4.5 Edit — Edit existing images with prompts, references, masks, and precision control.
Authentication
For authentication details, please refer to the Authentication Guide.
API Endpoints
Submit Task & Query Result
set -euo pipefail
export WAVESPEED_API_KEY="your-api-key"
REQUEST_BODY=$(cat <<'JSON'
{
"image": "https://interactive-examples.mdn.mozilla.net/media/cc0-images/painted-hand-298-332.jpg",
"prompt": "A cinematic ocean wave at sunrise, highly detailed",
"aspect_ratio": "1:1",
"resolution": "1k",
"edit_precision": "regular",
"quality": "medium"
}
JSON
)
# 1. Submit the prediction once. Never retry this request automatically:
# a retry after an unclear failure can create a second, billed task.
CHECK='The task may already exist. Check History or the predictions list before submitting again.'
if ! SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
--connect-timeout 10 --max-time 60 \
-X POST "https://api.wavespeed.ai/api/v3/ideogram-ai/ideogram-v4.5/edit" \
-H "Authorization: Bearer ${WAVESPEED_API_KEY}" \
-H "Content-Type: application/json" \
-d "${REQUEST_BODY}"); then
printf 'Submit failed. %s\n' "${CHECK}" >&2
exit 1
fi
TASK=$(printf '%s' "${SUBMIT_RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
PREDICTION_ID=$(printf '%s' "${TASK}" | jq -r '.id // empty')
if [ -z "${PREDICTION_ID}" ]; then
printf 'Submission response did not contain a prediction id. %s\n' "${CHECK}" >&2
exit 1
fi
RESULT_URL="https://api.wavespeed.ai/api/v3/predictions/${PREDICTION_ID}/result"
# 2. Poll until the prediction reaches a final status.
BODY_FILE=$(mktemp)
trap 'rm -f "${BODY_FILE}"' EXIT
while true; do
# Transient errors (429, 5xx) are retried, honoring Retry-After.
HTTP_CODE=$(curl --silent --show-error --fail-with-body \
--connect-timeout 10 --max-time 60 --retry 5 --retry-delay 2 \
--output "${BODY_FILE}" --write-out '%{http_code}' \
"${RESULT_URL}" \
-H "Authorization: Bearer ${WAVESPEED_API_KEY}" || true)
case "${HTTP_CODE}" in
2??) ;;
000|429|5??) # dropped connection or temporary error: keep polling
printf 'Task %s: HTTP %s, polling again in 10s\n' "${PREDICTION_ID}" "${HTTP_CODE}" >&2
sleep 10; continue ;;
*) printf 'Task %s: HTTP %s\n' "${PREDICTION_ID}" "${HTTP_CODE}" >&2
cat "${BODY_FILE}" >&2; exit 1 ;;
esac
RESULT=$(jq 'if type == "object" and has("data") then .data else . end' "${BODY_FILE}")
STATUS=$(printf '%s' "${RESULT}" | jq -r '.status // empty')
case "${STATUS}" in
completed) printf '%s\n' "${RESULT}" | jq '.outputs'; break ;;
failed|cancelled|timeout|deleted)
printf 'Task %s ended with status %s\n' "${PREDICTION_ID}" "${STATUS}" >&2
printf '%s\n' "${RESULT}" | jq . >&2; exit 1 ;;
*) sleep 2 ;;
esac
doneRetry temporary errors only while polling, never the submit request. Errors, retries and timeouts
Parameters
Task Submission Parameters
Request Parameters
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
| image | string | Yes | 1 ~ unlimited characters | Source image to edit. Supply a publicly accessible image URL. | |
| prompt | string | Yes | 1 ~ 10000 characters | Describe the changes to make to the source image. | |
| reference_images | array<string> | No | - | 0 ~ 4 items · each item: 1 ~ unlimited characters | Optional guidance images. Up to four without a mask, or three when mask_url is supplied. |
| mask_url | string | No | - | 1 ~ unlimited characters | Upload a mask image or provide its URL. Use the same dimensions as the source. Black pixels mark the edit area and white pixels preserve the image. Include both black and white regions. |
| aspect_ratio | string | No | - | 1:1, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16 | The aspect ratio of the generated image. If not specified, it is determined automatically from the input image. |
| resolution | string | No | 1k | 1k, 2k | Output size tier. Does not change the price. Ignored when mask_url is set or edit_precision is high, which keep the source image's size. |
| edit_precision | string | No | regular | regular, high | Regular applies prompt-based edits. High restores unchanged pixels and keeps the source image's size. |
| quality | string | No | medium | very_low, low, medium, high | Editing quality and price tier. |
Conditional constraints
- Not allowed:
reference_imageshas at least 4 items andmask_urlis provided.
Every model also accepts the global request options enable_sync_mode and enable_base64_output; see their pages for details.
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data.id | string | Unique identifier for the prediction, Task Id |
| data.model | string | Model ID used for the prediction |
| data.outputs | array | Output values, usually URL strings; some models return text strings or structured result objects (empty when status is not completed) |
| data.urls | object | Object containing related API endpoints |
| data.status | string | Task status. completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses. |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |
Result Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | Yes | - | Task ID |
Result Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data | object | The prediction data object containing all details |
| data.id | string | Unique identifier for the prediction |
| data.model | string | Model ID used for the prediction |
| data.outputs | array<string | object> | Array of generated outputs (empty when status is not completed). Items are usually URL strings, but may be text strings or structured result objects, depending on the model. |
| data.urls | object | Object containing related API endpoints |
| data.status | string | Status: completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses |
| data.created_at | string | ISO timestamp of when the request was created |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |