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

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

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

Accepts an undistilled-base FLUX.2-Klein generation request for asynchronous processing and
returns immediately with a generation_id. The generated images are POSTed to
the supplied `webhook_url` once ready, in a payload that mirrors the
synchronous response with an added generation_id for correlation.

See [Webhooks](/ideogram-api/webhooks) for the delivery payload and how to verify webhook signatures.

## Query parameters

- `webhook_url` string, uri, required — HTTPS URL that Ideogram delivers the generated result to. Ideogram sends a JSON POST to this URL once all images for the request have finished generating. The body mirrors the synchronous generate response: `request_id`, `created`, and a `data` array containing every generated image (`url`, `prompt`, `resolution`, `seed`, `is_image_safe`). Each delivery is signed with Ed25519 and verifiable against the public keys at `https://api.ideogram.ai/v1/.well-known/jwks.json`. Must be HTTPS; private and loopback hosts and the cloud metadata service are rejected.

## 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`

Request accepted for asynchronous delivery.

- AsyncImageGenerationResponseV4 — Acknowledgement returned by the async (webhook) generation endpoints. The request is accepted for asynchronous processing and the generated images are POSTed to the supplied `webhook_url` once ready; this body carries only the generation_id so the caller can correlate the eventual webhook delivery.
  - `generation_id` string, required — URL-safe base64 ID of the accepted generation. Matches the `generation_id` field delivered in the webhook payload, and the `generation_id` accepted by the generation polling endpoint.

## 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)
