---
title: "Repaint a masked region with a custom Ideogram 3.0 model"
method: POST
path: "/v2/image/inpaint/ideogram-3-custom-model"
tags: ["images-inpaint"]
---

# Repaint a masked region with a custom Ideogram 3.0 model

`POST /v2/image/inpaint/ideogram-3-custom-model`

Repaint the masked region of a source image with a custom Ideogram 3.0
model the authenticated user or organization can access. Supply the
model URI returned by the custom-model API as `custom_model_uri`.

For each of the source image and mask, supply either an
`AssetIdentifier` reference (`image_asset_identifier` /
`mask_asset_identifier`) or raw bytes (`image` / `mask`, multipart
requests only). A reference wins if both forms are supplied.

Optional style controls are style codes, a style preset, or style
reference images. Supply style references as a saved style, existing
asset identifiers, or raw image bytes. Only one style control may be
used; when multiple reference forms are supplied, the collection wins
over identifiers, and identifiers win over bytes.

By default the request blocks until the images are ready. Set `async`
to true to return after dispatch and poll
`GET /v1/generations/{generation_id}`.

## Query parameters

- `dry_run` boolean

## Request body

- InpaintImageIdeogramV3CustomModelRequest — Supply the source image and mask as either `AssetIdentifier` references or raw bytes. At least one form of each input is required; references take priority over bytes when both are supplied.
  - `prompt` string, required — The prompt describing the repainted result.
  - `custom_model_uri` string, required — The custom model URI returned by the custom-model API, in the form `model/<model_name>/version/<version_name>`. The authenticated user or organization must have access to the model.
  - `image_asset_identifier` AssetIdentifier — An identifier for an ideogram asset.
    - `asset_type` 'ASSET' | 'CANVAS_ASSET' | 'LAYERED_ASSET' | 'RESPONSE' | 'UPLOAD', required
    - `asset_id` string, required
  - `image` string, binary — The source image to repaint (max size 25MB), as JPEG, PNG, or WEBP bytes. Multipart requests only; ignored when `image_asset_identifier` is supplied.
  - `mask_asset_identifier` AssetIdentifier — An identifier for an ideogram asset.
    - `asset_type` 'ASSET' | 'CANVAS_ASSET' | 'LAYERED_ASSET' | 'RESPONSE' | 'UPLOAD', required
    - `asset_id` string, required
  - `mask` string, binary — A black-and-white mask the same size as the source image, as JPEG, PNG, or WEBP bytes. Black marks the region to repaint. Multipart requests only; ignored when `mask_asset_identifier` is supplied.
  - `magic_prompt` 'auto' | 'on' | 'off' — Determine if MagicPrompt should be used in generating the request or not.
  - `num_images` integer — The number of images to generate.
  - `seed` integer — Random seed. Set for reproducible generation.
  - `rendering_speed` 'turbo' | 'default' | 'quality' — The rendering speed to use. When omitted, the server chooses a speed supported by the selected custom model.
  - `style_preset` '80s_illustration' | '90s_nostalgia' | 'abstract_organic' | 'analog_nostalgia' | 'art_brut' | 'art_deco' | 'art_poster' | 'aura' | 'avant_garde' | 'bauhaus' | 'blueprint' | 'blurry_motion' | 'bright_art' | 'c4d_cartoon' | 'childrens_book' | 'collage' | 'coloring_book_i' | 'coloring_book_ii' | 'cubism' | 'dark_aura' | 'doodle' | 'double_exposure' | 'dramatic_cinema' | 'editorial' | 'emotional_minimal' | 'ethereal_party' | 'expired_film' | 'flat_art' | 'flat_vector' | 'forest_reverie' | 'geo_minimalist' | 'glass_prism' | 'golden_hour' | 'graffiti_i' | 'graffiti_ii' | 'halftone_print' | 'high_contrast' | 'hippie_era' | 'iconic' | 'japandi_fusion' | 'jazzy' | 'long_exposure' | 'magazine_editorial' | 'minimal_illustration' | 'mixed_media' | 'monochrome' | 'nightlife' | 'oil_painting' | 'old_cartoons' | 'paint_gesture' | 'pop_art' | 'retro_etching' | 'riviera_pop' | 'spotlight_80s' | 'stylized_red' | 'surreal_collage' | 'travel_poster' | 'vintage_geo' | 'vintage_poster' | 'watercolor' | 'weird' | 'woodblock_print' — A predefined style preset that applies a specific artistic style to the generated image.
  - `style_codes` StyleCode[] — A list of 8-character hexadecimal codes representing the style of the image. Refer to each endpoint for supported combinations with style types, presets, and reference images.
  - `style_reference_collection_id` string — A saved style, by its URL-safe base64 collection id. Takes priority over asset identifiers and raw style reference images.
  - `style_reference_collection_version_id` string — Optional URL-safe base64 version id for the saved style. Ignored without `style_reference_collection_id`.
  - `style_reference_asset_identifiers` AssetIdentifier[] — Existing upload or generated image assets to use as style references. Takes priority over raw style reference images.
    - `asset_type` 'ASSET' | 'CANVAS_ASSET' | 'LAYERED_ASSET' | 'RESPONSE' | 'UPLOAD', required
    - `asset_id` string, required
  - `style_reference_images` string[] — Images to use as style references (max 10, max size 25MB each), as JPEG, PNG, or WEBP bytes. Multipart requests only; ignored if a collection or asset identifiers are supplied.
  - `enable_copyright_detection` boolean, nullable — Optional. Opt this request into post-generation copyright detection. Adds detection latency; flagged images return `is_image_safe: false`.
  - `async` boolean — When false, block until the images are ready. When true, return after dispatch and poll `GET /v1/generations/{generation_id}`.
  - `private` boolean, nullable — When true or omitted, the output is kept private to your account. Set to false to publish it. Enterprise accounts always generate privately.
  - `target_collection_id` string — A collection you can write to, by its URL-safe base64 collection id. Completed images are added to it.

## Response `200`

The repainted images, or an acknowledgement for an asynchronous request.

- InpaintImageIdeogramV3CustomModelResponse — Response returned by `POST /v2/image/inpaint/ideogram-3-custom-model`. Synchronous requests include the repainted images in `data`; asynchronous requests omit `data` and can be polled with `GET /v1/generations/{generation_id}`.
  - `generation_id` string, required — URL-safe base64 ID accepted by the generation polling endpoint.
  - `data` InpaintedImageObject[] — The repainted images, in generation order. Present only for synchronous requests.
    - `url` string, uri, nullable — The direct link to the repainted image. Empty when the image did not pass safety checks.
    - `prompt` string, required — The final prompt the image was generated from.
    - `resolution` string, required — The resolution of the repainted image, formatted as "WIDTHxHEIGHT".
    - `is_image_safe` boolean, required — Whether the image passed safety checks. If false, `url` is empty.
    - `seed` integer, required — Random seed. Set for reproducible generation.
  - `seed` integer, required — Random seed. Set for reproducible generation.
  - `width` integer, required — The output width in pixels.
  - `height` integer, required — The output height in pixels.

## Other responses

- `400` — Invalid input provided.
- `401` — Unauthorized.
- `402` — Insufficient credits or quota.
- `403` — The caller cannot use the requested custom model.
- `404` — A referenced asset or style collection was not found.
- `422` — The prompt did not pass safety checks.
- `429` — Too many requests.
- `500` — Internal server error.
- `503` — The endpoint is temporarily unavailable.

## Changes

- **2026-09-19** `4e95197be44a` — 10 breaking, 4 warning, 8 info
  - added `#/components/schemas/IdeogramV3StylePreset` to the `style_preset` request property `allOf` list (media type: multipart/form-data)
  - added `#/components/schemas/IdeogramV3StylePreset` to the `style_preset` request property `allOf` list (media type: application/json)
  - added `#/components/schemas/MagicPromptMode` to the `magic_prompt` request property `allOf` list (media type: multipart/form-data)
  - added `#/components/schemas/MagicPromptMode` to the `magic_prompt` request property `allOf` list (media type: application/json)
  - …18 more
- **2026-09-17** `9d3ff2d98e27` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/ideogram/apis/ideogram-openapi-3-0/changes/v2/image/inpaint/ideogram-3-custom-model/post.md)

---

[API](https://skmtc.dev/ideogram/apis/ideogram-openapi-3-0.md) · [All operations](https://skmtc.dev/ideogram/apis/ideogram-openapi-3-0/llms.txt) · [OpenAPI document](https://skmtc.dev/ideogram/apis/ideogram-openapi-3-0/revisions/987f73fc82de?raw)
