---
title: "Generate with FLUX.2-Klein (undistilled base)"
method: POST
path: "/v1/flux-2-klein-base/generate"
tags: ["generate"]
---

# Generate with FLUX.2-Klein (undistilled base)

`POST /v1/flux-2-klein-base/generate`

Generates images synchronously using the UNDISTILLED FLUX.2-Klein base — the 50-step quality tier (vs the distilled /v1/flux-2-klein fast tier). 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.

## Request body

- GenerateImageRequestFlux2KleinBase — Request body for the undistilled FLUX.2-Klein base generate endpoint (50-step quality tier). The base model is pinned server-side; supply `custom_model_uri` to layer a registered FLUX.2-Klein LoRA finetune on the base. Width and height must each be a positive multiple of 16; the total area must not exceed 1,048,576 pixels (1024×1024). When `width` and `height` are omitted, the server uses the model's default 1024×1024.
  - `prompt` string, required — A natural-language prompt for image generation.
  - `system_prompt` string, 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.
  - `width` integer, nullable — Output width in pixels; must be a positive multiple of 16.
  - `height` integer, nullable — Output height in pixels; must be a positive multiple of 16.
  - `num_inference_steps` integer, nullable — Optional diffusion step count. When omitted, the server uses the model's default. Higher values trade latency for quality.
  - `seed` integer, nullable — Random seed for reproducibility.
  - `num_images` integer, nullable — Number of images to generate.
  - `custom_model_uri` string, 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 FLUX.2-Klein base model; the fine-tune's LoRA checkpoint is layered on the base. When omitted, the FLUX.2-Klein base is used with no LoRA.

## Response `200`

Image(s) generated successfully.

- ImageGenerationResponse — The response for self-hosted open-source model generation endpoints. Uses a free-form resolution string (not a grid enum) because these models accept arbitrary dimensions.
  - `created` string, date-time, required — The time the request was created.
  - `data` ImageGenerationObject[], required — A list of ImageObjects that contain the generated image(s).
    - `object_type` 'image.generation' — Discriminator marking this entry as a generated image in the polling endpoint's mixed data array.
    - `url` string, uri, nullable — The direct link to the image generated.
    - `prompt` string, required — The prompt used for the generation. This may be different from the original prompt.
    - `resolution` string, required — The resolution of the generated image, formatted as "{width}x{height}".
    - `is_image_safe` boolean, required — Whether this image passes safety checks. If false, the url field will be empty.
    - `seed` integer, required — Random seed. Set for reproducible generation.

## Other responses

- `400` — Invalid input provided.
- `401` — Not authorized.
- `422` — Prompt failed the safety check.
- `429` — Too many requests.

---

[API](https://skmtc.net/ideogram/apis/ideogram-openapi-3-0.md) · [All operations](https://skmtc.net/ideogram/apis/ideogram-openapi-3-0/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ideogram/ideogram-openapi-3-0/versions/bd40f367a834/schema)
