Request
Response
Image from base64 data

Image generation with additional parameters for supported gemini models
Request
Response

Parameters
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
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.The number of images to generate. Must be between 1 and 10.
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.Image quality level. Higher quality increases cost and latency.Allowed values:
low, medium, high, autoBackground behavior for the generated image.Allowed values:
opaque, autoCompression level (0–100). Only applies when
output_format is jpeg.Stream partial images as they are generated. Use with
--no-buffer in curl.Number of partial images to emit during streaming. Value between
0 and 3. Only used when stream is true.Content moderation strictness.Allowed values:
auto, lowOptional configuration parameters for supported Gemini image models.
Params to Avoid
| Param | Reason |
|---|---|
response_format: "url" | ZnapAI image endpoint only returns b64_json |
background: "transparent" | Not supported by OpenAI/Gemini image generation models |
output_format: "webp" | WebP output format is not supported |
style | Vivid or natural style configurations are DALL-E 3 exclusive and not supported |
