Grok Imagine Text to Image
High-quality text-to-image generation with vivid scenes, characters, and strong lighting. Returns 6 images per call.
The Grok Imagine API gives you programmatic access to xAI's Grok Imagine model family — text-to-image, image-to-image, text-to-video, image-to-video, video extension, and Grok Imagine Image 2.0's precise generation and chained follow-up editing, all through one Muapi API key, from $0.05 per call.
High-quality text-to-image generation with vivid scenes, characters, and strong lighting. Returns 6 images per call.
High-fidelity text-to-image mode prioritizing accuracy and detail over speed, with sharper lighting and depth.
xAI's next-generation image model with precise instruction-following, sharp typography, and multi-reference editing across up to 5 input images.
Edit an existing image with natural-language instructions while preserving scene structure, perspective, and lighting.
Apply a targeted follow-up edit to a prior Image 2.0 generation, optionally scoped with mask_indexs, while preserving the rest of the image.
Fast text-to-video generation with synchronized ambient audio, smooth motion, and expressive lighting, from 6 to 30 seconds.
Animate a still image into cinematic video with synchronized ambient audio and fluid, realistic motion, from 6 to 30 seconds.
Preview of Grok Imagine's next video model with multiple aspect ratios and resolutions, up to 15 seconds.
Continue an existing Grok Imagine video generation while maintaining visual style and motion.
The Grok Imagine API gives applications programmatic access to xAI's Grok Imagine model family. Generate images and video from a text prompt, edit an existing image with natural-language instructions, or animate a still image into a cinematic clip with synchronized ambient audio.
Muapi exposes the complete Grok Imagine endpoint catalogue through one REST API. Use the image and video playgrounds to compare endpoints, then combine generation, editing, and video extension in your own workflow.
Turn a prompt into vivid, stylish images, with a dedicated high-fidelity Quality mode and 6 images per call.
Image 2.0 follows detailed prompts down to fine layout and typography, ideal for posters and dense compositions.
Edit an existing image or chain a targeted follow-up edit to a prior Image 2.0 generation by its request_id.
Generate 6-30 second video clips from a prompt or an image, with synchronized ambient audio and fluid motion.
Continue an existing Grok Imagine video generation while maintaining its visual style and motion.
Every endpoint uses Muapi's standard asynchronous submit-and-poll pattern — no chat interface or manual prompting.
| Endpoint | Input | Output | Price | Best For |
|---|---|---|---|---|
| grok-imagine-text-to-image | prompt, aspect_ratio | 6 images | $0.05/call | Vivid scenes and characters from a prompt |
| grok-imagine-text-to-image-quality | prompt, aspect_ratio | High-fidelity image | $0.05/call | Accuracy and detail over speed |
| grok-imagine-image-2 | prompt, aspect_ratio | New image + request_id | $0.05/call | Sharp typography and layout planning |
| grok-imagine-image-to-image | prompt, images_list | Edited image | $0.05/call | Natural-language edits to an existing image |
| grok-imagine-image-2-edit | prompt, request_id, mask_indexs | Refined image + request_id | $0.05/call | Chained follow-up edits to an Image 2.0 generation |
| grok-imagine-text-to-video | prompt, aspect_ratio, duration | 6-30s video | $0.15/call | Cinematic clips from a text prompt |
| grok-imagine-image-to-video | prompt, images_list, duration | 6-30s video | $0.15/call | Animating a reference image |
| grok-imagine-video-1-5-preview | prompt, images_list, duration | Up to 15s video | $0.64/call | Testing the next-generation video model |
| grok-imagine-extend | request_id, prompt, extend_times | Extended video | $0.05/call | Continuing an existing video generation |
Prices and supported fields are model-specific. Review the live Playground schema before shipping generated media in production.
Submit a JSON request with your Muapi API key, save the request ID, and poll the shared result endpoint. Provide a publicly reachable image URL for image-to-image, image-to-video, and follow-up edit requests.
curl -X POST https://api.muapi.ai/api/v1/grok-imagine-text-to-image \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt":"A vivid neon-lit alley in a cyberpunk city, rain-soaked pavement reflecting signage","aspect_ratio":"16:9"}'
# Response: {"request_id":"REQUEST_ID"}Call grok-imagine-text-to-image with a prompt and aspect ratio. Returns 6 images per call.
curl -X POST https://api.muapi.ai/api/v1/grok-imagine-text-to-video \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt":"A hawk gliding low over a canyon at sunrise, ambient wind","aspect_ratio":"16:9","duration":6}'
# Response: {"request_id":"REQUEST_ID"}Call grok-imagine-text-to-video with a prompt, aspect ratio, and duration.
curl https://api.muapi.ai/api/v1/predictions/REQUEST_ID/result \ -H "x-api-key: YOUR_API_KEY" # Poll until status is completed, then read the generated image/video URL from outputs.
Poll until the task is completed, then read the returned image or video URL.
Yes. grok-imagine-text-to-image returns 6 images per call; grok-imagine-text-to-image-quality trades speed for higher fidelity and detail.
Image 2.0 (grok-imagine-image-2) focuses on precise instruction-following, sharp typography and layout planning, and has a dedicated chained follow-up edit endpoint (grok-imagine-image-2-edit) that edits by request_id rather than a re-uploaded image.
Yes. grok-imagine-image-to-image accepts an uploaded image plus natural-language instructions. grok-imagine-image-2-edit instead chains a targeted edit off a prior Image 2.0 generation's request_id, optionally scoped with mask_indexs.
Yes. grok-imagine-text-to-video and grok-imagine-image-to-video generate 6-30 second clips with synchronized ambient audio. grok-imagine-video-1-5-preview is a preview of the next video model, and grok-imagine-extend continues an existing video generation.
Image endpoints (text-to-image, quality mode, Image 2.0, image-to-image, and Image 2.0 edits) cost $0.05 per call. Text-to-video, image-to-video, and video extension cost $0.15-$0.05 per call depending on the endpoint. The video 1.5 preview model costs $0.64 per call.
No. Muapi exposes Grok Imagine as standard asynchronous REST endpoints. Create an API key, submit JSON, and poll the returned request ID without a chat UI or manual prompting.
Create one Muapi API key and connect image generation, editing, video generation, and video extension in a single asynchronous workflow.