Gemini image overview
Common ways to call Gemini image models on Omniall AI:
Aspect ratio / resolution via
extra_body.google.image_config (Chat) or generationConfig.imageConfig (native), e.g. aspect_ratio / aspectRatio, image_size / imageSize (1K / 2K / 4K).
Pick model from the Model Square.
Banana 2.1 (gemini-nano-banana-2.1)
Supports text-to-image, image-to-image, plus PDF and short video reference generation.
Chat: PDF URL
Chat: video URL
- Pass
video_urlas a string, not{ "url": "..." } filerequires bothfilenameandfile_data- URLs must be publicly downloadable; default download limit ~64MB; prefer short MP4 / small PDF
- Full curl / native examples: Gemini native format and Chat image generation
Optional: Thinking levels
gemini-nano-banana-2.1 supports official Thinking. For typical integrations you can omit this config and use the default level.
Usage may include
reasoning_tokens / thoughtsTokenCount for thinking cost, regardless of whether thought text is returned.
Native — under generationConfig.thinkingConfig:
extra_body.google.thinking_config (snake_case required):
thinking_config / thinking_level — camelCase thinkingConfig is rejected. When parsing the response, walk all parts and skip items with thought: true before reading the image.
Other model examples: gemini-3.1-flash-image-preview, gemini-3-pro-image-preview (per Model Square).