Image Generator

Generate stunning images from text prompt


CURL

curl \
  --request POST \
  --url 'https://app.imggen.ai/v1/generate-image' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{"prompt":"close up photo of a rabbit", "samples": 1, "aspect_ratio": "square", "model": "imggen-base" }'
💡

Authenticate with Authorization: Bearer YOUR_API_KEY (legacy keys may use X-IMGGEN-KEY: YOUR_API_KEY). Unlike the image tools, the generator takes a JSON body — set Content-Type: application/json.

Request body

prompt

textRequired

Text description to generate image.


samples

number
No. of images to generate (1–4). Defaults to 1.

aspect_ratio

text
Aspect ratio for output image. Defaults to square.
Available Options
squareportraitlandscape

model

text
Generative AI model used. Defaults to imggen-base.
Available Options
imggen-baseimggen-base-fastimggen-xl

Results

When images generated successfully, you’ll receive a JSON response:

{
  "success": true,
  "message": "Images generated successfully",
  "images": ["iVBORw0KGgoAAA...SUVORK5CYII="]
}