What Grok Imagine Image Does
Grok Imagine Image is xAI’s standard text-to-image generation model. It generates images from text prompts through an asynchronous task interface, balancing speed and quality for everyday, general-purpose image creation.
Key Features
- General-Purpose Generation: Produces solid images from text for a wide range of everyday creative needs.
- Batch Output: Generate multiple images per request via the
nparameter. - Wide Aspect-Ratio Support: Offers many ratios — 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 2:1, 1:2, and ultrawide options like 19.5:9 and 20:9, plus
auto. - Selectable Resolution: Choose 1K or 2K output.
- Flexible Response Format: Return results as a
urlor base64b64_json. - Asynchronous Architecture: Uses a “Create Task → Poll Result” API workflow for reliable integration.
How to Use Grok Imagine Image
- Write a text prompt describing the image you want.
- Submit a
POSTrequest to the/api/v1/xai/grok-imagine-imageendpoint with yourpromptand optionaln,aspect_ratio,resolution, andresponse_format. - Receive a
task_idand polling URL in the response. - Poll the returned URL with a
GETrequest to monitor the task. - Once complete, retrieve the image as a URL or base64 string.
Best Use Cases
- Rapid Prototyping: Quickly test visual ideas and concepts.
- Social Media Content: Generate on-trend graphics across many aspect ratios.
- General-Purpose Imagery: Cover everyday image needs where balanced speed and quality matter.
- Batch Asset Creation: Produce multiple variations in a single request.
Tips for Better Results
- Use the Quality Variant for Max Fidelity: When maximum detail is required, switch to Grok Imagine Image Quality — the standard model trades some fidelity for speed.
- Set the Right Aspect Ratio: Pick a ratio that matches the final placement (e.g., 9:16 for stories, 16:9 for banners) instead of leaving it on
auto. - Generate in Batches: Increase
nto compare several options from one prompt. - Choose 2K for Detail: Use 2K resolution when you need sharper output.
- Be Specific: Describe subject, style, lighting, and mood clearly for the cleanest results.
参数
| 参数名 | 描述 | 类型 | 必填 | 枚举值 |
|---|---|---|---|---|
| prompt | Text description of the image to generate | string | 是 | - |
| aspect_ratio | Aspect ratio of the generated image | string | 否 | 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 2:1, 1:2, 19.5:9, 9:19.5, 20:9, 9:20, auto |
| n | Number of images to generate (official examples use 4; no fixed upper limit) | integer | 否 | - |
| resolution | Output resolution tier | string | 否 | 1k, 2k |
| response_format | Format of the returned image data | string | 否 | url, b64_json |
价格
单位: $/img
| 维度 | 价格 |
|---|---|
| resolution: 1k | 0.0230 |
| resolution: 2k | 0.0230 |
相关模型
- xai/grok-imagine-image-quality: [Core Function] Grok Imagine Image (Quality) is xAI’s high-fidelity text-to-image generation model. [Strengths] It excels at producing richly detailed, high-quality images from a text prompt, with flexible aspect ratios and an optional 2K resolution. [Best For] Highly recommended for: detailed concept art, marketing visuals, and any scenario where image quality is prioritized over generation speed. [Limitations] Do NOT use this model when latency is critical, as generation is slower than the standard model. [Routing] Use this model by default when the user emphasizes quality or detail. For faster, lighter generation use Grok Imagine Image (standard).
- xai/grok-imagine-video: [Core Function] Grok Imagine Video is xAI’s text-to-video generation model. [Strengths] It excels at generating short, dynamic video clips directly from a text prompt, with controllable duration, aspect ratio, and resolution. [Best For] Highly recommended for: short social clips, animated concepts, and dynamic scene generation from a description. [Limitations] Do NOT use this model when you have a starting image or reference subjects, or when you need resolutions above 720p or clips longer than 15 seconds; it is limited to 480p/720p and 15s. [Routing] Use this model when the user wants a video from text only. If a starting image is provided, route to the Image-to-Video model; for reference-driven character video, use Reference-to-Video.
- xai/grok-imagine-image-edit: [Core Function] Grok Imagine Image Edit is xAI’s standard image editing model. [Strengths] It excels at quickly applying prompt-guided edits and style changes to one or more source images. [Best For] Highly recommended for: fast restyling, quick variations, and lightweight image edits. [Limitations] Do NOT use this model when maximum edit fidelity is required; the Quality variant preserves more detail. A maximum of 3 source images is supported. [Routing] Choose this model for fast edits. When the user demands maximum fidelity, route to Grok Imagine Image Edit (Quality).
- xai/grok-imagine-image-quality-edit: [Core Function] Grok Imagine Image Edit (Quality) is xAI’s high-fidelity image editing model. [Strengths] It excels at applying detailed, prompt-guided edits and style transformations to one or more source images while preserving fine detail. [Best For] Highly recommended for: high-quality restyling, detailed inpainting-style edits, and combining up to 3 source images. [Limitations] Do NOT use this model when latency is critical, as it is slower than the standard edit variant; a maximum of 3 source images is supported. [Routing] Use this model by default for quality-sensitive edits. For faster edits, route to Grok Imagine Image Edit (standard).
- xai/grok-imagine-video-1.5-i2v: [Core Function] Grok Imagine Video 1.5 I2V animates a single starting image into a video using the Grok Imagine 1.5 generation backbone. [Strengths] It excels at producing motion from one starting frame with the improved 1.5 model. [Best For] Highly recommended for: animating a photo or illustration when the 1.5 generation backbone is preferred. [Limitations] Do NOT use this model for text-only generation, for resolutions above 1080p, or for clips longer than 15 seconds; it requires a starting image and is limited to 480p/720p/1080p and 15s. [Routing] Use this model when the user provides one starting image and prefers the 1.5 backbone.
- xai/grok-imagine-video-i2v: [Core Function] Grok Imagine Video I2V animates a single starting image into a video. [Strengths] It excels at producing smooth motion from one starting frame, guided by a text prompt for the desired movement. [Best For] Highly recommended for: bringing a photo or illustration to life, dynamic product showcases, and quick cinematic motion from a still. [Limitations] Do NOT use this model for text-only generation, for resolutions above 720p, or for clips longer than 15 seconds; it requires a starting image and is limited to 480p/720p and 15s. [Routing] Use this model when the user provides exactly one starting image. For reference-driven character video, use Reference-to-Video; for text-only video, use Text-to-Video.
- xai/grok-imagine-video-r2v: [Core Function] Grok Imagine Video R2V generates a video from a text prompt while preserving the subjects shown in up to 7 reference images. [Strengths] It excels at keeping character/subject identity consistent across a newly generated scene driven by the prompt. [Best For] Highly recommended for: character-driven video, placing a specific subject into a new scene, and blending features from multiple references. [Limitations] Do NOT use this model to simply animate a single image as-is (use Image-to-Video), or for clips longer than 10 seconds or resolutions above 720p; duration is capped at 10s and resolution at 480p/720p. [Routing] Use this model when the user provides reference images of a subject and wants a new action/scene described by a prompt. To simply animate a single image as-is, use Image-to-Video.
- xai/grok-imagine-video-edit: [Core Function] Grok Imagine Video Edit applies a prompt-guided transformation to an input video. [Strengths] It excels at restyling and modifying an existing video while keeping its original duration and aspect ratio. [Best For] Highly recommended for: restyling clips, applying visual effects, and prompt-driven video edits. [Limitations] Do NOT use this model to change the duration, aspect ratio, or resolution; the output preserves the input video’s duration and aspect ratio, and those parameters are not configurable. Input video constraints (e.g. format/length) are enforced by the upstream provider. [Routing] Use this model when the user provides a video and wants it edited/restyled. To make a video longer, use Video Extend.
- xai/grok-imagine-video-extend: [Core Function] Grok Imagine Video Extend continues an existing video, generating additional footage beyond its end. [Strengths] It excels at seamlessly extending a clip with new prompt-guided motion. [Best For] Highly recommended for: lengthening short clips, continuing a scene, and adding follow-on action. [Limitations] Do NOT use the
durationparameter expecting it to set the total video length; it only controls the length of the appended segment (2-10 seconds). Input video constraints are enforced by the upstream provider. [Routing] Use this model when the user wants to make a video longer. To restyle or modify an existing video, use Video Edit.




