Ideogram Layerize Text API

Layerize Text API

Extract editable text layers from any image. Upload a poster, marketing asset, or branded design and get back a clean base image with text removed.

Overview

The Layerize Text endpoint detects text regions in an image and returns a clean base image with all text removed. Pass any image with visible text: your own branded assets, marketing materials, generated designs, or uploaded artwork. The endpoint handles detection and removal in one call.

1 Upload an image
2 Get text-free base
3 Overlay your own text

Endpoint reference

Endpoint Method Description
/v1/ideogram-v3/layerize-text POST Extract text layers from an image

Request

Send the image as multipart/form-data.

Parameter Type Required Description
image binary Yes The image to analyze. JPEG, PNG, or WebP (max 10 MB).
prompt string No Description of the image. Improves detection accuracy. Auto-generated if omitted.
seed integer No Random seed for reproducible results.

Response

Field Type Description
base_image_url string URL of the image with all detected text removed.
original_image_url string | null URL of the original image with text intact.
seed integer Seed used for this layerization.

Layerize an image

Upload any image that contains text. This can be a branded poster, a marketing email screenshot, product packaging, or anything with visible typography.

Format: multipart/form-data
Max size: 10 MB per image
Accepted: JPEG, PNG, WebP
import requests

# Upload your image directly
with open("poster.png", "rb") as f:
  response = requests.post(
    "https://api.ideogram.ai/v1/ideogram-v3/layerize-text",
    headers={"Api-Key": "<apiKey>"},
    files={"image": ("poster.png", f, "image/png")},
    data={"prompt": "A concert poster with event details"}
  )

layers = response.json()
print(f"Base image (text removed): {layers['base_image_url']}")

Use the output

The response gives you a base image with text cleanly removed and the original for reference. Use the base image as a background and overlay your own text with any font, size, or language. Useful for localization, A/B testing copy, or repurposing designs across campaigns.

# Example response
{
  "base_image_url": "https://ideogram.ai/assets/image/...",
  "original_image_url": "https://ideogram.ai/assets/image/...",
  "seed": 42
}

# Download the base image for compositing
base_img = requests.get(layers["base_image_url"]).content
with open("base_no_text.png", "wb") as f:
  f.write(base_img)

# Now overlay your own text using Pillow, Cairo, or any compositing tool

Combine with Generate

You can also generate a design first and then layerize it. This is useful when you want Ideogram to handle the visual design and you need to swap out the copy afterward.

# Generate a design
gen = requests.post(
  "https://api.ideogram.ai/v1/ideogram-v3/generate",
  headers={"Api-Key": "<apiKey>"},
  data={
    "prompt": "A travel poster with the text 'Visit Tokyo'",
    "aspect_ratio": "2:3"
  }
).json()

# Download and layerize
img_data = requests.get(gen["data"][0]["url"]).content
layers = requests.post(
  "https://api.ideogram.ai/v1/ideogram-v3/layerize-text",
  headers={"Api-Key": "<apiKey>"},
  files={"image": ("design.png", img_data, "image/png")}
).json()

# base_image_url now has the design without text
print(layers["base_image_url"])

Tips

  • Works on any image with text. Uploaded photos, screenshots, branded assets, AI-generated designs. The image does not need to come from Ideogram.
  • Pass a prompt to improve detection accuracy. A short description of the image helps the model distinguish text from visual elements.
  • Set a seed for reproducible results. The same image + seed will produce the same output.
  • Use for localization. Layerize once, then overlay translated copy in any language without regenerating the design.

Start layerizing text via the API.