How to Use Grok Imagine Image 2.0 Edit in Gemini CLI
Grok Imagine Image 2.0 Edit revises existing artwork, restyles photos, and combines subjects from references. Unlike Grok Imagine Image 2.0 Text to Image, it starts with images you want to change.
Prompts to try with Grok Imagine Image 2.0 Edit in Gemini CLI
Copy an example into Gemini CLI, or ask in your own words.
Use Grok Imagine Image 2.0 Edit on the product photo in our assets directory. Replace the background with a dark oak tabletop, keeping the flask centered; request a square image at 2K with medium quality.
Use Grok Imagine Image 2.0 Edit to turn our existing garden illustration into a pencil drawing. Keep its main composition and request a 4:3 image at 2K.
Remove the background from the photo I attach with Grok Imagine Image 2.0 Edit and give me a transparent PNG. Save the result in ./assets.
Use Grok Imagine Image 2.0 Edit to clean up these product shots so they sit on pure white.
Edit this image with Grok Imagine Image 2.0 Edit: keep the subject, swap the background for a sunlit studio.
How to set up Grok Imagine Image 2.0 Edit in Gemini CLI
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- Add the server
Or add it to ~/.gemini/settings.json yourself:
gemini mcp add --scope user --transport http spiral https://api.spiral.ai/mcp
- Sign in
Start gemini and run:
/mcp auth spiral
- Check it
In Gemini CLI, run /mcp. From your shell:
gemini mcp list
Use the Spiral skill
- Send Gemini CLI this message
Your agent reads Spiral's skill and sets itself up.
set up https://spiral.ai/SKILL.md
- Sign in or paste a key
Approve Spiral in the browser, or give the agent a key from the console.
Use the Spiral CLI
- Install and sign in
Installs the Spiral CLI, signs you in and adds its skill to your coding agents.
npx -y spiral-cli@latest init
Call the Spiral API
- Create an API key
In the console, under API keys.
- Run Grok Imagine Image 2.0 Edit
One request; the result comes back by polling or a webhook.
curl https://api.spiral.ai/v1/runs \ -H "Authorization: Bearer $SPIRAL_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "provider": "fal", "model": "xai/grok-imagine-image/v2.0/edit", "input": { "prompt": "Make this scene more realistic but still keep the game vibes" } }'
Then paste one of the prompts above: Gemini CLI finds Grok Imagine Image 2.0 Edit on Spiral, shows the price and runs it.
Grok Imagine Image 2.0 Edit providers and prices
Spiral runs Grok Imagine Image 2.0 Edit through fal and xAI. Open a card for today's price, with every fee included. Name one in your prompt, or let Gemini CLI pick.
$0.052 per image at 1K, low quality ($0.065 at 1.5K, $0.078 at 2K); other qualities $0.078 at 1K ($0.091 at 1.5K, $0.104 at 2K). Each input image: $0.013 per output image.
$0.052 per image at 1K, low quality ($0.065 at 1.5K, $0.078 at 2K); other qualities $0.078 at 1K ($0.091 at 1.5K, $0.104 at 2K). Each input image: $0.013.
Settings you can ask for
Grok Imagine Image 2.0 Edit works from your prompt and image URLs. Ask Gemini CLI for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Number of images | 1 to 10 | 1 | Number of images to generate. |
| Aspect ratio | 2:1, 20:9, 19.5:9, 16:9, 4:3, 3:2, 1:1, 2:3 and 8 more | auto | Aspect ratio of the edited image. Standard auto uses the nearest supported ratio of the first reference. With image_passthrough=true, auto lets the provider choose a ratio, which may differ from the reference. |
| Resolution | 1k, 1.5k, or 2k | 1k | Resolution of the generated image: 1k, 1.5k, or 2k. |
| Output format | jpeg, png, or webp | jpeg | The format of the generated image. |
| Image passthrough | on or off | off | Send edit references and return provider images without resizing or re-encoding, preserving transparency and metadata. The returned native format may differ from output_format. |
| Quality | low, medium, or auto | medium | Quality level of the edited image. |
Every API field of Grok Imagine Image 2.0 · Edit Image is on its tool page: open its card above.
What can you do with Grok Imagine Image 2.0 Edit in Gemini CLI?
Create visual assets that match the project you are building with Grok Imagine Image 2.0. Turn design requirements into image briefs and review the results in the actual page layout.
Event poster concepts
Create a poster from a written brief or revise supplied artwork. Specify the event title, date, and text hierarchy, then proofread the lettering.
Packaging design exploration
Visualize a carton or label from text, or revise an existing packaging image. Describe the printing surface and provide the exact label copy.
Website header artwork
Generate a scene from a brief or rework supplied artwork for a website header. State where the subject sits and reserve a clear area for page copy.
Game art concepts
Develop a character, prop, or location from text, or restyle an existing concept. Specify one visual treatment and review each image for consistent details.
Product and setting composites
Combine a supplied product image with a separate setting reference. Identify each image by order and describe the intended placement.
Illustrated versions of existing photos
Turn a supplied photo into an oil painting, pencil drawing, or anime treatment. Use successive edits to refine the result.
Grok Imagine Image 2.0 Edit success rate and speed on Spiral
Success and speed over the last 24 hours, across every run of these tools on Spiral.
| Tool | Success | Median time | Runs |
|---|---|---|---|
| Grok Imagine Image 2.0 · Edit Image | 85.1% | 24.7s | 67 |
| Grok Imagine Image 2.0 · Edit | Not enough runs | ||
More on Grok Imagine Image 2.0 Edit and Gemini CLI
Overview
Grok Imagine Image 2.0 Edit in other agents
Questions about Grok Imagine Image 2.0 Edit in Gemini CLI
Can Gemini CLI use Grok Imagine Image 2.0 Edit?
Yes. Add Spiral to Gemini CLI as an MCP server, and Gemini CLI can find and run Grok Imagine Image 2.0 Edit like any built-in tool.
How much does Grok Imagine Image 2.0 Edit cost in Gemini CLI?
$0.052 per image at 1K, low quality ($0.065 at 1.5K, $0.078 at 2K); other qualities $0.078 at 1K ($0.091 at 1.5K, $0.104 at 2K). Each input image: $0.013 per output image. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Gemini CLI plan is separate.
Do I need a fal account to use Grok Imagine Image 2.0 Edit in Gemini CLI?
No. Spiral runs Grok Imagine Image 2.0 Edit on its own fal account. You sign in to Spiral once and never paste a key.
How long does it take to set up Grok Imagine Image 2.0 Edit in Gemini CLI?
About two minutes: add the server, then sign in, then check it.
Does Gemini CLI wait while Grok Imagine Image 2.0 Edit runs?
Grok Imagine Image 2.0 Edit runs in the background. Gemini CLI starts the run, checks on it and gives you the image when it's ready.
What is Grok Imagine Image 2.0 good at?
It is useful for visual work that combines pictures and lettering, such as posters and packaging concepts. The maker highlights typography, layout, and small text as strengths.
Can Grok Imagine Image 2.0 put words inside an image?
Yes. Supply the exact wording, then describe where it belongs and which line should be largest; proofread the result before using it.
How should I request fine detail?
Use medium quality and 2K output when small details need to be recognizable. Describe the details themselves, such as stitching or a brushed metal surface.
Is Grok Imagine Image 2.0 limited to realistic pictures?
No. It also supports illustrated treatments, including anime, oil painting, and pencil drawing.
What prompting habit should I avoid?
Avoid long lists of unwanted objects and effects. Describe the objects, materials, and composition you want to see instead.
Start using Grok Imagine Image 2.0 Edit in Gemini CLI
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into Gemini CLI:
set up https://spiral.ai/SKILL.md


