Grok Imagine Image
Grok Imagine Image is xAI's image generation model. It creates images from text descriptions through the Grok Imagine API, delivering fast generation for creative and production workflows.
import { experimental_generateImage as generateImage } from 'ai';
const result = await generateImage({ model: 'xai/grok-imagine-image', prompt: 'A red balloon on a wooden table.'});Frequently Asked Questions
What types of images can Grok Imagine Image generate?
Grok Imagine Image generates images from text descriptions across a range of styles including photorealistic, illustrative, artistic, and graphic design. It handles diverse subjects and compositions based on prompt instructions.
How does Grok Imagine Image differ from Grok Imagine Image Pro?
Grok Imagine Image is the standard generation model optimized for speed and versatility. The Pro variant provides higher-fidelity output with more detail and refinement at higher cost.
Can I control the style and composition of generated images?
Yes. Include specific style, composition, lighting, and subject details in your text prompt. The model follows detailed instructions to shape the output.
How do I call Grok Imagine Image through Vercel AI Gateway?
Use your Vercel AI Gateway API key with
xai/grok-imagine-imageas the model identifier. Integrate through the AI SDK'sgenerateImagefunction or other API formats. AI Gateway handles provider routing automatically.Can Grok Imagine Image edit existing images?
The Grok Imagine API is primarily a text-to-image generation interface. For editing existing images, check the current API documentation for supported editing capabilities.
What output resolutions are available?
Check the Vercel AI Gateway documentation for current supported resolutions and aspect ratios for Grok Imagine Image.
Does Vercel AI Gateway support Zero Data Retention for Grok Imagine Image?
Zero Data Retention is not currently available for this model. ZDR on AI Gateway applies to direct gateway requests; BYOK flows aren't covered. See https://vercel.com/docs/ai-gateway/capabilities/zdr for details.