Imagen 4
Imagen 4 is Google's standard-tier image generation model, the default production choice in the Imagen 4 family, balancing photorealistic quality with practical generation speed for commercial photography, scene generation, and everyday visual asset pipelines.
import { experimental_generateImage as generateImage } from 'ai';
const result = await generateImage({ model: 'google/imagen-4.0-generate-001', prompt: 'A red balloon on a wooden table.'});Playground
Try out Imagen 4 by Google. Usage is billed to your team at API rates. Free users (those who haven't made a payment) get $5 of credits every 30 days.
Your generated image will appear here
Providers
Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.
| Provider |
|---|
More models by Google
| Model |
|---|
About Imagen 4
Imagen 4 is the standard tier in Google's Imagen 4 image generation family. It represents the typical production choice when neither speed nor quality is at an extreme. It launched alongside the fast and ultra variants as part of a new category of image-only models on AI Gateway, distinct from multimodal models that generate images as one output type among several.
The standard tier covers a wide range of commercial use cases: product photography with accurate color reproduction and material rendering, scene generation for e-commerce and marketing, editorial illustrations, and visual asset creation for content platforms. It delivers photorealistic quality across nature, wildlife, and cinematic scenes without requiring the ultra tier's additional cost.
Prompt adherence is a core strength of Imagen 4. The model renders complex descriptions (specific lighting conditions, material properties, background environment, and subject pose) with fidelity to the written description. For production pipelines where prompt engineering is a significant investment, this reliability means a refined prompt produces consistent, repeatable output.
As an image-only model, integration is straightforward. Pass prompts via experimental_generateImage (aliased as generateImage) from the AI SDK. There's no text response to parse, no modality configuration to establish, and no reasoning overhead.
What To Consider When Choosing a Provider
- Configuration: Imagen 4.0 Generate is a pure image generation model: pass a text prompt to
generateImageand receive image data. Unlike multimodal models that can generate both text and images, there is no mixed-modality response to manage. - Zero Data Retention: AI Gateway supports Zero Data Retention for this model via direct gateway requests (BYOK is not included). To configure this, check the documentation.
- Authentication: AI Gateway authenticates requests using an API key or OIDC token. You do not need to manage provider credentials directly.
When to Use Imagen 4
Best For
- Commercial product photography: Photorealistic quality is required at a standard generation cost
- Marketing and editorial images: Generation across a range of subjects, scenes, people, objects, and environments
- Content platform asset pipelines: Consistent, reliable quality across large batches
- General-purpose image generation: Neither the fast tier's trade-offs nor the ultra tier's premium is justified
- Quality-first default migration: Applications moving from other image generation APIs that want reliable defaults
Consider Alternatives When
- Throughput or speed primary: Generation speed or volume is the main constraint (consider
google/imagen-4.0-fast-generate-001) - Publication-grade detail required: Print quality or absolute maximum fidelity is necessary (consider
google/imagen-4.0-ultra-generate-001) - Text output alongside images: Mixed-modality output is needed (consider
google/gemini-3-pro-image) - Video generation required: Still images are not sufficient (consider the Veo model family)
Conclusion
Imagen 4 is the sensible default for production image generation on AI Gateway. It delivers Imagen 4's photorealistic quality at a cost and speed profile that makes it broadly applicable. It's the right choice until a specific workload gives you a clear reason to move to the fast or ultra tier.