v4
latestOpenAPI 3.0.22026-08-02109239415.7 KBgenerate
Generate with FLUX.2-Klein
Generates images synchronously using the FLUX.2-Klein 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/flux-2-klein/generate
Request body
Example request
{
"prompt": "A photo of a tabby cat sleeping on a couch, soft daylight.",
"system_prompt": "Do not include any text in the image.",
"width": 1024,
"height": 1024,
"num_inference_steps": 4,
"custom_model_uri": "model/my-flux-klein-lora/version/0"
}Response
Image(s) generated successfully.
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"
}