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.'});What To Consider When Choosing a Provider
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.
Imagen 4.0 Generate is a pure image generation model: pass a text prompt to generateImage and receive image data. Unlike multimodal models that can generate both text and images, there is no mixed-modality response to manage.
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.
FAQ
The standard tier delivers strong photorealistic quality suitable for most commercial photography use cases, including product shots, scenes, and environmental images. The ultra tier (google/imagen-4.0-ultra-generate-001) targets the absolute fidelity ceiling: fine texture detail, color depth, and rendering precision that matters in print, large-format display, or publication contexts. For web and digital applications, the standard tier is often sufficient.
Imagen 4 follows complex prompts closely. The model renders specific lighting descriptions, material properties, compositional directions, and subject characteristics faithfully. For production workflows where prompt investment is significant, this reliability matters.
Yes. Commercial product photography is a well-suited use case, with accurate material rendering, controlled backgrounds, and consistent quality across SKUs. For catalog-scale generation with high quality, this is the standard tier to evaluate first.
Use experimental_generateImage (aliased as generateImage) with model: 'google/imagen-4.0-generate-001'.
This is a text-to-image generation model. For editing and inpainting, check the AI Gateway model catalog for models that explicitly support those workflows.
No. AI Gateway handles all provider authentication. Connect using your Vercel API key or OIDC token.
Imagen 4.0 Generate is an image-only model: the only output is image data. Multimodal models like google/gemini-3-pro-image can generate images alongside text explanations, analysis, or instructions. Use the image-only model when you want clean, structured image output without a text layer.
Yes. Visit https://ai-sdk.dev/playground/vertex:imagen-4.0-generate-001 to generate images directly from the AI Gateway model playground without writing code.