images

Generate images from text

Generate one or more images from a text prompt. Supported models include flux-2 (and its pro, max, flex, flash, turbo and klein variants), gpt-image-2, grok-imagine, nano-banana, nano-banana-2, nano-banana-2-lite, recraft, ideogram, seedream, z-image-turbo and kling. Credits vary by model, from 2 to about 63 per image.

post/images/generations

Request

  • Base URL
    https://api.krater.ai/v1
  • Auth
    HTTP bearer

Request body

promptstring required

Text description of the image to generate.

modelstring

Image model identifier.

sizestring

Output size or aspect ratio, model dependent.

ninteger

Number of images to generate.

resolutionstring

Output resolution for models that support it, for example 1K, 2K or 4K.

qualitystring

Quality setting for models that support it, for example low, medium or high.

rendering_speedstring

Rendering speed for Ideogram models, for example TURBO.

stylestring

Style preset for models that support it.

versionstring

Specific model version to pin, when the model has multiple versions.

Example request

{
  "model": "flux-2",
  "size": "1024x1024"
}

Response

Generated image URLs.

createdinteger required

Unix timestamp.

Changes

No recorded changes to this operation across all 1 revision of this API.