Helicone's AI Gateway supports image generation through models with native image output capabilities. Use the unified OpenAI-compatible API to generate images - the Gateway handles provider-specific translations automatically.
Image generation is currently supported for Nano Banana Pro (gemini-3-pro-image-preview) via Google AI Studio. Support for additional providers will be added in future updates.
Quick Start#
Configuration#
To enable image generation:
- Set the
modelto one that supports image output (currentlygemini-3-pro-image-preview/google-ai-studio, also known as Nano Banana Pro) - Optionally configure
image_generationto control aspect ratio and size
image_generation#
| Parameter | Type | Description |
|---|---|---|
aspect_ratio | string | Image aspect ratio (e.g., "16:9", "1:1", "9:16") |
image_size | string | Image resolution (e.g., "2K", "1K") |
The image_generation field is optional. If omitted, the model uses default settings. However, if you specify image_generation, both aspect_ratio and image_size are required.
Handling Responses#
Chat Completions#
When streaming, images arrive in chunks via the images delta field:
Non-streaming responses include images in the message:
Responses API#
Streaming events follow the Responses API format:
Supported Models#
| Model | Provider Route | Description |
|---|---|---|
gemini-3-pro-image-preview/google-ai-studio | Google AI Studio | Nano Banana Pro - Google's multimodal model with native image generation |
Related#
- Reasoning - Enable reasoning for complex tasks
- Responses API - Alternative API format with image support
