> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.ideogram.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.ideogram.ai/_mcp/server.

# Describe with Ideogram 4.0

POST https://api.ideogram.ai/v1/ideogram-v4/describe
Content-Type: multipart/form-data

Describe an image with Ideogram 4.0 and return a structured
`V4JsonPrompt`. The returned `json_prompt` is a working JSON prompt
that can be passed directly as `json_prompt` to the
`/v1/ideogram-v4/generate` family of endpoints.

Supported image formats include JPEG, PNG, and WebP.


Reference: https://developer.ideogram.ai/v1/api-reference/describe-prompts/describe-v4

## Authentication

- `Api-Key` header (required) — API key for access control. Use in the header with the name \"Api-Key\"

## Request

### Body (multipart/form-data)

This endpoint expects a multipart form containing a file.

- `image_file` (file, required) — An image binary (max size 25MB); only JPEG, WebP and PNG formats are supported at this time.
- `include_bbox` (boolean, optional) — When true (default), the response preserves bounding boxes on each element so the prompt can be pasted into `/v1/ideogram-v4/generate` as `json_prompt` and reproduce the source layout. Set to false to drop bounding boxes and let the sampler place elements freely.

## Response

### 200

Structured V4 prompt generated successfully.

- `json_prompt` (V4JsonPrompt, required) — Structured prompt for Ideogram 4.0 generation. When `json_prompt` is supplied, magic-prompt is disabled and the diffusion model consumes the JSON contract directly. Mutually exclusive with `text_prompt` and the legacy `prompt` field.

## Errors

### 400 Bad Request Error

Invalid input provided.

- `any`

### 422 Unprocessable Entity Error

Image failed the safety check.

- `error` (string, required)

### 429 Too Many Requests Error

Too many requests.

- `any`

### 503 Service Unavailable Error

Took too long to finish.

- `any`

## Types

### V4JsonPrompt

Structured prompt for Ideogram 4.0 generation. When `json_prompt` is supplied, magic-prompt is disabled and the diffusion model consumes the JSON contract directly. Mutually exclusive with `text_prompt` and the legacy `prompt` field.

- `high_level_description` (string, required) — One- or two-sentence overall description of the desired image.
- `compositional_deconstruction` (V4CompositionalDeconstruction, required) — The compositional breakdown of a V4 prompt — background plus an ordered list of elements.
- `style_description` (V4StyleDescription, optional) — Optional style description supplied alongside a V4 JSON prompt.

### V4CompositionalDeconstruction

The compositional breakdown of a V4 prompt — background plus an ordered list of elements.

- `background` (string, required) — Description of the background of the scene.
- `elements` (list of V4PromptElement, required) — Ordered list of elements (objects and text) composing the scene.

### V4StyleDescription

Optional style description supplied alongside a V4 JSON prompt.

- `aesthetics` (string, optional) — Aesthetic notes (mood, vibe, references).
- `art_style` (string, optional) — Optional art-style hint (e.g., illustration, oil painting).
- `lighting` (string, optional) — Lighting description.
- `medium` (string, optional) — Medium description (e.g., photograph, digital art).
- `photo` (string, optional) — Optional photographic style notes (e.g., lens, film stock).
- `color_palette` (list of string, optional) — Optional list of hex color strings (e.g. "#FFD700") that bias the Ideogram 4.0 output toward this palette. Applied as a soft color bias, not an exact per-pixel lock.

### V4PromptElement

A single element in the V4 prompt's compositional deconstruction. Discriminated by the `type` field.

- `type`: `obj` (V4ObjPromptElement)
  - `desc` (string, required) — Description of the object element.
  - `bbox` (list of integer, optional) — Bounding box for an element, expressed as four integers in `[0, 1000]` with `[y_min, x_min, y_max, x_max]` semantics (row-first). Values are normalized so the canvas is `1000 x 1000` regardless of the final resolution.
  - `color_palette` (list of string, optional) — Optional list of hex color strings (e.g. "#FFD700") that bias the Ideogram 4.0 output toward this palette. Applied as a soft color bias, not an exact per-pixel lock.
- `type`: `text` (V4TextPromptElement)
  - `desc` (string, required) — Description of the text element (style, role, placement notes).
  - `text` (string, required) — The literal text to render in the image.
  - `bbox` (list of integer, optional) — Bounding box for an element, expressed as four integers in `[0, 1000]` with `[y_min, x_min, y_max, x_max]` semantics (row-first). Values are normalized so the canvas is `1000 x 1000` regardless of the final resolution.
  - `color_palette` (list of string, optional) — Optional list of hex color strings (e.g. "#FFD700") that bias the Ideogram 4.0 output toward this palette. Applied as a soft color bias, not an exact per-pixel lock.

## Examples

**Request**

```json
{
  "image_file": "<file: string>"
}
```

**Response**

```json
{
  "json_prompt": {
    "high_level_description": "high_level_description",
    "compositional_deconstruction": {
      "background": "background",
      "elements": [
        {
          "type": "obj",
          "desc": "desc",
          "bbox": [
            0,
            0,
            1000,
            1000
          ],
          "color_palette": [
            "#FFD700",
            "#FFD700"
          ]
        },
        {
          "type": "obj",
          "desc": "desc",
          "bbox": [
            0,
            0,
            1000,
            1000
          ],
          "color_palette": [
            "#FFD700",
            "#FFD700"
          ]
        }
      ]
    },
    "style_description": {
      "aesthetics": "aesthetics",
      "art_style": "art_style",
      "lighting": "lighting",
      "medium": "medium",
      "photo": "photo",
      "color_palette": [
        "#FFD700",
        "#FFD700"
      ]
    }
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.ideogram.ai/v1/ideogram-v4/describe"

files = { "image_file": "open('string', 'rb')" }
payload = { "include_bbox":  }
headers = {"Api-Key": "<apiKey>"}

response = requests.post(url, data=payload, files=files, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.ideogram.ai/v1/ideogram-v4/describe';
const form = new FormData();
form.append('image_file', 'string');
form.append('include_bbox', '');

const options = {method: 'POST', headers: {'Api-Key': '<apiKey>'}};

options.body = form;

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.ideogram.ai/v1/ideogram-v4/describe"

	payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image_file\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_bbox\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Api-Key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.ideogram.ai/v1/ideogram-v4/describe")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Api-Key"] = '<apiKey>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image_file\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_bbox\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.ideogram.ai/v1/ideogram-v4/describe")
  .header("Api-Key", "<apiKey>")
  .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image_file\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_bbox\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.ideogram.ai/v1/ideogram-v4/describe', [
  'multipart' => [
    [
        'name' => 'image_file',
        'filename' => 'string',
        'contents' => null
    ]
  ]
  'headers' => [
    'Api-Key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.ideogram.ai/v1/ideogram-v4/describe");
var request = new RestRequest(Method.POST);
request.AddHeader("Api-Key", "<apiKey>");
request.AddParameter("undefined", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image_file\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_bbox\"\r\n\r\n\r\n-----011000010111000001101001--\r\n", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Api-Key": "<apiKey>"]
let parameters = [
  [
    "name": "image_file",
    "fileName": "string"
  ],
  [
    "name": "include_bbox",
    "value": 
  ]
]

let boundary = "---011000010111000001101001"

var body = ""
var error: NSError? = nil
for param in parameters {
  let paramName = param["name"]!
  body += "--\(boundary)\r\n"
  body += "Content-Disposition:form-data; name=\"\(paramName)\""
  if let filename = param["fileName"] {
    let contentType = param["content-type"]!
    let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8)
    if (error != nil) {
      print(error as Any)
    }
    body += "; filename=\"\(filename)\"\r\n"
    body += "Content-Type: \(contentType)\r\n\r\n"
    body += fileContent
  } else if let paramValue = param["value"] {
    body += "\r\n\r\n\(paramValue)"
  }
}

let request = NSMutableURLRequest(url: NSURL(string: "https://api.ideogram.ai/v1/ideogram-v4/describe")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```