For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Manage API keysIdeogram
  • Ideogram API
    • API Overview
    • API Setup
    • Account API Page
    • API Pricing
    • API Status
  • Tutorials
    • Custom Model Training
  • API Reference
    • POSTGenerate with Ideogram 3.0
    • POSTGenerate with Ideogram 3.0 (Transparent Background)
    • POSTInpaint with Ideogram 3.0
    • POSTRemix with Ideogram 3.0
    • POSTReframe with Ideogram 3.0
    • POSTReplace Background with Ideogram 3.0
    • POSTRemove Background
    • POSTLayerize Text
    • POSTEdit images with a prompt
    • POSTUpscale
    • POSTDescribe
    • POSTGenerate (legacy)
    • POSTEdit with Ideogram 3.0 (legacy)
    • POSTEdit (legacy)
    • POSTRemix (legacy)
    • POSTReframe (legacy)
  • Custom Model Training
    • GETList datasets
    • POSTCreate a new dataset
    • GETGet a dataset
    • POSTUpload assets to a dataset
    • POSTTrain a custom Ideogram v3 model
    • GETList models
    • GETGet model details
LogoLogo
LogoLogo
Manage API keysIdeogram
API Reference

Layerize Text

POST
https://api.ideogram.ai/v1/ideogram-v3/layerize-text
POST
/v1/ideogram-v3/layerize-text
$curl -X POST https://api.ideogram.ai/v1/ideogram-v3/layerize-text \
> -H "Api-Key: <apiKey>" \
> -H "Content-Type: multipart/form-data" \
> -F image=@string
1{
2 "base_image_url": "https://openapi-generator.tech",
3 "seed": 12345,
4 "original_image_url": "https://openapi-generator.tech",
5 "text_blocks": [
6 {
7 "role": "heading",
8 "color": "#212121",
9 "font_alternatives": [
10 "font_alternatives",
11 "font_alternatives"
12 ],
13 "font_size": 2,
14 "font_name": "font_name",
15 "line_height": 7.0614014,
16 "x": 0,
17 "width": 1,
18 "y": 6,
19 "angle": 5.637377,
20 "text": "Hello World",
21 "alignment": "left",
22 "formatting": [
23 "bold",
24 "bold"
25 ],
26 "height": 5
27 },
28 {
29 "role": "heading",
30 "color": "#212121",
31 "font_alternatives": [
32 "font_alternatives",
33 "font_alternatives"
34 ],
35 "font_size": 2,
36 "font_name": "font_name",
37 "line_height": 7.0614014,
38 "x": 0,
39 "width": 1,
40 "y": 6,
41 "angle": 5.637377,
42 "text": "Hello World",
43 "alignment": "left",
44 "formatting": [
45 "bold",
46 "bold"
47 ],
48 "height": 5
49 }
50 ]
51}
Analyzes an image to detect text regions, then returns each detected text block with its position, content, font information, and styling. The response includes a text-erased base image (background with all text removed) and a flat list of detected text blocks. Supported image formats include JPEG, PNG, and WebP (max size 10MB). Image links are available for a limited period of time; if you would like to keep the image, you must download it.
Was this page helpful?
Previous

Edit images with a prompt

Next
Built with

Analyzes an image to detect text regions, then returns each detected text block with its position, content, font information, and styling.

The response includes a text-erased base image (background with all text removed) and a flat list of detected text blocks.

Supported image formats include JPEG, PNG, and WebP (max size 10MB).

Image links are available for a limited period of time; if you would like to keep the image, you must download it.

Authentication

Api-Keystring

API key for access control. Use in the header with the name “Api-Key”

Request

A request to detect and extract text layers from an image.
imagefileRequired

The image to analyze for text detection. The image should be in JPEG, PNG, or WebP format (max size 10MB).

promptstringOptional

An optional text description of the image. If not provided, a description will be auto-generated from the image.

seedintegerOptional0-2147483647
Random seed. Set for reproducible generation.

Response

Text layers detected and extracted successfully.
base_image_urlstringformat: "uri"
URL of the image with all detected text removed.
seedinteger0-2147483647
Random seed. Set for reproducible generation.
original_image_urlstring or nullformat: "uri"
URL of the original image with text intact.

Errors

400
Bad Request Error
401
Unauthorized Error
429
Too Many Requests Error