xai/grok-imagine-image-quality

grok-imagine-image-quality
Docs
Schema

[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).

$0.0575~$0.0805/img
text-to-image

Input

Text description of the image to generate
Aspect ratio of the generated image
aspect_ratio
Number of images to generate (official examples use 4; no fixed upper limit)
Output resolution tier
1k
Format of the returned image data
response_format

Result

No results yet

Run the model to preview the output here.

Next:

README

What Grok Imagine Image Quality Does

Grok Imagine Image Quality is xAI’s high-fidelity text-to-image generation model. It produces richly detailed images from text prompts, prioritizing visual quality and detail over raw speed — the recommended choice when output fidelity matters most.

Key Features

  • High-Fidelity Output: Generates richer detail and refinement than the standard Grok Imagine Image model.
  • Batch Output: Generate multiple images per request via the n parameter.
  • 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, plus ultrawide options like 19.5:9 and 20:9, and auto.
  • Selectable Resolution: Choose 1K or 2K output.
  • Flexible Response Format: Return results as a url or base64 b64_json.
  • Asynchronous Architecture: Uses a “Create Task → Poll Result” API workflow for reliable integration.

How to Use Grok Imagine Image Quality

  1. Write a detailed text prompt describing the subject, style, and composition you want.
  2. Submit a POST request to the /xai/grok-imagine-image-quality endpoint with your prompt and optional n, aspect_ratio, resolution, and response_format.
  3. Receive a task_id and polling URL in the response.
  4. Poll the returned URL with a GET request to monitor the task.
  5. Once complete, retrieve the image as a URL or base64 string.

Best Use Cases

  • Concept Art: Produce detailed, polished visuals for creative and pre-production work.
  • Marketing Visuals: Create high-quality campaign and promotional imagery.
  • Editorial & Illustration: Generate refined images where detail and finish matter.
  • Hero & Showcase Imagery: Make standout visuals that benefit from extra fidelity.

Tips for Better Results

  • Don’t Use It When Latency Is Critical: Generation is slower than the standard model — for fast iteration, use Grok Imagine Image instead.
  • Lean on the Detail Advantage: Use this variant by default when users emphasize quality or detail.
  • Choose 2K for Final Renders: Generate at 2K resolution to preserve the model’s fine detail.
  • Write Rich Prompts: Specify lighting, materials, mood, and composition to make the most of the higher fidelity.
  • Set the Right Aspect Ratio: Match the ratio to your final placement rather than relying on auto.

Parameters

Name Description Type Required Enums
prompt Text description of the image to generate string Yes -
aspect_ratio Aspect ratio of the generated image string No 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 No -
resolution Output resolution tier string No 1k, 2k
response_format Format of the returned image data string No url, b64_json

Pricing

Unit: $/img

Dimension Pricing
resolution: 1k 0.0575
resolution: 2k 0.0805
  • xai/grok-imagine-image: [Core Function] Grok Imagine Image is xAI’s standard text-to-image generation model. [Strengths] It excels at quickly generating solid, visually appealing images from a text prompt across a wide range of aspect ratios. [Best For] Highly recommended for: rapid prototyping, social media content, and general-purpose image generation. [Limitations] Do NOT use this model when maximum detail or fidelity is required; the Quality variant produces richer detail. [Routing] Choose this model for fast, general image generation. When the user demands maximum fidelity, route to Grok Imagine Image (Quality).
  • 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 duration parameter 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.
  • google/nano-banana-2: [Core Function] Nano Banana 2 (Gemini 3.1 Flash Image) is an extremely fast text-to-image model. [Strengths] It is optimized for high-speed, high-volume visual generation, creative prompting, and rapid stylistic experimentation. [Best For] Highly recommended for: rapid creative iteration, generating large batches of images quickly, and artistic/stylized graphics. [Limitations] Do NOT use this model if you require strict, high-end photorealism (use the Imagen 4 series instead). [Routing] Route to this model for ‘fast’, ‘creative’, or ‘stylized’ high-volume requests.
  • google/nano-banana-pro: [Core Function] Nano Banana Pro (Gemini 3 Pro Image) is a high-capability creative image model. [Strengths] It balances the creative flexibility and speed of the Nano series with higher fidelity output. [Best For] Highly recommended for: high-quality stylized art and complex creative compositions. [Limitations] Do NOT use for absolute photorealism (use Imagen 4). [Routing] Use this model for high-quality, creative, non-photorealistic requests.
  • kling/kling-v3-t2i: [Core Function] Kling V3 T2I is the flagship text-to-image generation model. [Strengths] It delivers state-of-the-art aesthetic quality, high-resolution outputs (up to 2K), and exceptional prompt adherence. [Best For] Highly recommended for: professional concept art, photorealistic portraits, and high-fidelity image generation. [Limitations] Do NOT use this model if you need to strictly reference or edit an existing image. [Routing] Use this as the default model for all text-to-image requests on the Kling platform.
  • bytedance/seedream-4.5-t2i: [Core Function] Seedream 4.5 T2I is a high-fidelity visual creation model. [Strengths] It provides all-round improvements in consistency, aesthetics, and photorealism, supporting high-definition outputs up to 4K resolution. [Best For] Highly recommended for: professional visual creatives, photorealistic artwork, and high-res commercial graphics. [Limitations] It lacks the real-time web search and advanced reasoning capabilities of the 5.0 Lite model. [Routing] Use this model when the priority is absolute visual fidelity, resolution (4K), and consistency without the need for real-time search.
  • openai/gpt-image-2: [Core Function] GPT Image 2 is a state-of-the-art text-to-image generation model. [Strengths] It excels at generating highly detailed, photorealistic images from text descriptions, with native support for ultra-high resolutions including 2K and 4K (up to 3840x2160). [Best For] Highly recommended for: cinematic landscapes, detailed character portraits, high-end commercial concept art, and any scenario requiring maximum resolution and visual fidelity. [Limitations] Do NOT use this model if you need a transparent background (e.g., for icons or UI assets), as it does not support the background: transparent parameter. [Routing] Use this model by default for all high-quality image generation requests. If the user explicitly asks for an image with a transparent background, route to GPT Image 1.5 instead.
  • microsoft/mai-image-2.5: [Core Function] MAI Image 2.5 is Microsoft’s flagship text-to-image generation model. [Strengths] It excels at producing high-quality, detailed images from a text prompt with precise control over output dimensions. [Best For] Highly recommended for: concept art, marketing visuals, and high-fidelity image generation. [Limitations] Do NOT request dimensions below 768 on any side or a width x height product above 1,048,576 pixels (e.g. beyond 1024x1024); output is always PNG. [Routing] Use this model by default for quality-sensitive generation. For faster, cheaper generation, route to MAI Image 2.5 Flash.
  • google/imagen-4.0-generate-001: [Core Function] Imagen 4.0 is Google’s flagship professional-grade text-to-image model designed for high-fidelity visual generation. [Strengths] It excels at industry-leading photorealism, exceptional typography/text rendering inside images, and strong prompt adherence, supporting up to 2K resolution and batch generation. [Best For] Highly recommended for general high-quality image generation, marketing assets (posters, product labels, menus, signage), and product photography mockups where readable text is required. [Limitations] Do NOT use this model if you need instant/real-time generation, native image editing (inpainting/outpainting), or negative prompts. It is strictly an image-only output model. [Routing] Use this model by default for high-quality, photorealistic text-to-image requests. If the user emphasizes speed or needs lower cost, route to Imagen 4.0 Fast. If the user demands the absolute highest detail and prompt precision, route to Imagen 4.0 Ultra.
  • google/imagen-4.0-ultra-generate-001: [Core Function] Imagen 4.0 Ultra is Google’s premium text-to-image model optimized for the highest quality and instruction alignment. [Strengths] It delivers ultimate photorealistic detail, superior texture rendering, and extremely strict adherence to complex, multi-part prompt instructions, supporting up to 2K resolution. [Best For] Highly recommended for high-end commercial marketing assets, professional design, intricate artistic compositions, and scenarios where precise instruction-following is paramount. [Limitations] Do NOT use this model if you need instant/real-time generation, native image editing (inpainting/outpainting), or negative prompts. It is the most expensive tier in the Imagen family. [Routing] Choose this model when the user demands the absolute highest quality, ultimate detail, or has highly complex prompt instructions. Otherwise, default to standard Imagen 4.0 or Imagen 4.0 Fast.
  • bytedance/seedream-5.0-lite: [Core Function] Seedream 5.0 Lite is a smart, reasoning-enhanced image generation model with real-time web search capabilities. [Strengths] It excels at generating time-sensitive imagery, infographics, and content requiring deep world knowledge or online search, boasting superior prompt understanding and reasoning. [Best For] Highly recommended for: current-event posters, text-heavy designs, and concept art requiring complex logical reasoning. [Limitations] As a ‘Lite’ model, its absolute photorealistic aesthetic ceiling might be slightly lower than the specialized 4.5 model. [Routing] Use this model by default when the user needs real-time information, deep reasoning, or complex intent understanding in their image.
  • alibaba/qwen-image-2.0-pro: [Core Function] Qwen Image 2.0 Pro is a professional-grade, highly controllable image generation model. [Strengths] It provides exquisite photorealism, professional infographics generation, supports NEGATIVE prompts, and can generate up to 6 image variants per API call. [Best For] Highly recommended for: workflows requiring strict negative prompt exclusion, batch generation (6 variants), and highly detailed infographics. [Limitations] Does not natively output 4K resolution (max is 2K). Does not have the explicit ‘Thinking Mode’ of Wan 2.7. [Routing] Route to this model specifically when the user provides a ‘negative prompt’ or asks for ‘batch generation of 6 images’.

More in this series