Vercel AI Gateway adds native image generation with Gemini and Flux
Vercel's AI Gateway now supports image generation natively, routing to Google Gemini 3.1 Flash Image Preview, Flux 2, and Imagen 4.0 through a unified API.
Original sourceThe Vercel AI Gateway, which already unified text generation across 100+ models, now handles image generation. Use the same gateway infrastructure — OIDC auth, cost tracking, failover — for generating images.
The recommended approach uses Gemini 3.1 Flash Image Preview as a multimodal LLM: pass text to generateText() and get images back in result.files. This is different from traditional image-only models and enables conversational image editing.
For dedicated image models, experimental_generateImage supports Imagen 4.0 and Flux 2. The gateway handles provider failover automatically — if one model is down, requests route to alternatives.
Panel Takes
The Builder
Developer Perspective
“One API for text and images, same auth, same billing. Simplifies the stack significantly for apps that need both.”
The Creator
Content & Design
“The conversational image editing through Gemini is the killer feature. Iterate on images with natural language instead of re-prompting from scratch.”
The Futurist
Big Picture
“Vercel is making AI infrastructure invisible. Developers don't manage models — they call functions. The gateway abstracts everything.”