v4

latestOpenAPI 3.0.22026-08-02109239415.7 KB
generate

Generate with Z-Image

Generates images synchronously using the Z-Image model. Width and height must each be a positive multiple of 16 and the total area must not exceed 1,048,576 pixels (1024×1024); the server validates these against the model's resolution constraints.

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

post/v1/z-image/generate

Request body

promptstring required

A natural-language prompt for image generation.

system_promptstring nullable

An optional system prompt applied alongside the prompt — use it for standing instructions such as style constraints or "do not render text". When omitted, no system prompt is applied. If you trained a LoRA with a system prompt, supply the same one here for best results.

widthinteger nullable

Output width in pixels; must be a positive multiple of 16.

heightinteger nullable

Output height in pixels; must be a positive multiple of 16.

num_inference_stepsinteger nullable

Optional diffusion step count. When omitted, the server uses the model's default. Higher values trade latency for quality.

seedinteger nullable

Random seed for reproducibility.

num_imagesinteger nullable

Number of images to generate.

custom_model_uristring nullable

A custom model URI in the format model/<model_name>/version/<version_name>. When provided, the URI must resolve to a registered fine-tune of the Z-Image base model; the fine-tune's LoRA checkpoint is layered on the base. When omitted, the Z-Image base is used with no LoRA.

Example request

{
  "prompt": "A futuristic cityscape at golden hour, highly detailed.",
  "system_prompt": "Do not include any text in the image.",
  "width": 1024,
  "height": 1024,
  "num_inference_steps": 8,
  "custom_model_uri": "model/my-z-image-lora/version/0"
}

Response

Image(s) generated successfully.

createdstring date-time required

The time the request was created.

Example response

{
  "data": [
    {
      "seed": 12345,
      "object_type": "image.generation",
      "prompt": "prompt",
      "resolution": "2048x2048",
      "url": "https://ideogram.ai/api/images/ephemeral/xtdZiqPwRxqY1Y7NExFmzB.png?exp=1743867804&sig=e13e12677633f646d8531a153d20e2d3698dca9ee7661ee5ba4f3b64e7ec3f89",
      "is_image_safe": true
    },
    {
      "seed": 12345,
      "object_type": "image.generation",
      "prompt": "prompt",
      "resolution": "2048x2048",
      "url": "https://ideogram.ai/api/images/ephemeral/xtdZiqPwRxqY1Y7NExFmzB.png?exp=1743867804&sig=e13e12677633f646d8531a153d20e2d3698dca9ee7661ee5ba4f3b64e7ec3f89",
      "is_image_safe": true
    }
  ],
  "created": "2000-01-23T04:56:07+00:00"
}