v4

latestOpenAPI 3.0.22026-08-02109239415.7 KB
object-removal

Remove a masked object from an image, by asset id or by uploaded bytes

Remove a masked object from an image. For each of the source image and the mask, supply either an AssetIdentifier reference (image_asset_identifier / mask_asset_identifier) or the raw image bytes directly (image / mask, multipart requests only) — callers are never required to call POST /v2/assets first. If both a reference and bytes are supplied for the same input, the reference wins and the bytes are ignored.

Poll for completion with GET /v1/generations/{generation_id} using the returned generation_id.

This is the /v2 capability-first shape; no model or model_uri field is exposed until a second backend exists.

post/v2/object-removal

Request body

imagestring binary

The source image to remove an object from (max size 10MB), as raw bytes; only JPEG, PNG, and WEBP formats are supported. Multipart requests only; ignored if image_asset_identifier is also supplied.

maskstring binary

A binary mask the same size as the image, as raw bytes; white (>= 128) marks the region to remove. Only JPEG, PNG, and WEBP formats are supported. Multipart requests only; ignored if mask_asset_identifier is also supplied.

seedinteger

Random seed. Set for reproducible generation.

store_assetsboolean

Whether to store resulting generation assets on Ideogram. Defaults to false for API developers; first-party mini-apps should pass true. Reserved in the schema for an upcoming storage-control rollout — currently accepted but not yet enforced.

Example request

{
  "image_asset_identifier": {
    "asset_type": "RESPONSE",
    "asset_id": "7uS_VESkRI6O3-sVgHQp_A"
  },
  "mask_asset_identifier": {
    "asset_type": "RESPONSE",
    "asset_id": "7uS_VESkRI6O3-sVgHQp_A"
  },
  "seed": 12345
}

Response

Object removal request accepted; poll for completion with GET /v1/generations/{generation_id}.

generation_idstring required

URL-safe base64 ID of the accepted generation. Accepted by the GET /v1/generations/{generation_id} polling endpoint.

Example response

{
  "generation_id": "generation_id"
}