Request
Response
Image from base64 data

Image generation with additional parameters for supported gemini models
Request
Response

Parameters
header
An optional header used for spend logging metadata, containing JSON properties like
user_id, project_id, and env.string
required
Name of the model to use (for example: gpt-image-2). To see the complete list of supported image generation models, visit: https://znapai.com/models/image_generation
string
required
A text description of the desired image(s). The maximum length is 32,000 characters for the GPT image models, 1,000 characters for
dall-e-2 and 4,000 characters for dall-e-3.integer
default:1
The number of images to generate. Must be between 1 and 10.
string
default:"1024x1024"
Output image dimensions. Supports arbitrary
WIDTHxHEIGHT where both edges are multiples of 16, aspect ratio between 1:3 and 3:1, max edge 3840.Standard values: 1024x1024, 1536x1024, 1024x1536, auto.Supported values depend on the selected model. See the OpenAI image generation guide for the latest model-specific ranges.string
default:"auto"
Image quality level. Higher quality increases cost and latency.Allowed values:
low, medium, high, autostring
default:"auto"
Background behavior for the generated image.Allowed values:
opaque, autointeger
Compression level (0–100). Only applies when
output_format is jpeg.boolean
default:false
Stream partial images as they are generated. Use with
--no-buffer in curl.integer
Number of partial images to emit during streaming. Value between
0 and 3. Only used when stream is true.string
default:"auto"
Content moderation strictness.Allowed values:
auto, lowobject
Optional configuration parameters for supported Gemini image models.
