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
textRequiredText description to generate image.
samples
number1.aspect_ratio
textsquare.Available Options
squareportraitlandscape
model
textimggen-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="]
} On This Page