Spiral gives your agent every tool with one account. Browse the tools →

Gemini CLI · ImageReleased 2026-05-06

How to Use Grok Imagine Image Quality Edit in Gemini CLI

Use Grok Imagine Image Quality Edit to change an existing picture's objects, lighting, or style. Unlike Grok Imagine Image Quality Text to Image, it starts with reference images so you can work from an existing composition.

Prompts to try with Grok Imagine Image Quality Edit in Gemini CLI

Copy an example into Gemini CLI, or ask in your own words.

Use Grok Imagine Image Quality Edit on the product image in public/assets. Replace the background with a pale gray studio setting and soft side lighting; retain the product shape and viewing angle. Save a 2K result beside the original.

Grok Imagine Image Quality EditGemini CLI
Try asking
  • Use Grok Imagine Image Quality Edit on the existing onboarding illustration. Change the red suitcase to mustard yellow and retain the character, pose, and composition. Produce a square 2K image for review.

  • Remove the background from the photo I attach with Grok Imagine Image Quality Edit and give me a transparent PNG. Save the result in ./assets.

  • Use Grok Imagine Image Quality Edit to clean up these product shots so they sit on pure white.

  • Edit this image with Grok Imagine Image Quality Edit: keep the subject, swap the background for a sunlit studio.

How to set up Grok Imagine Image Quality Edit in Gemini CLI

Pick the way that suits you. Each takes about two minutes.

Use Spiral's MCP server

  1. Add the server

    Or add it to ~/.gemini/settings.json yourself:

    gemini mcp add --scope user --transport http spiral https://api.spiral.ai/mcp
  2. Sign in

    Start gemini and run:

    /mcp auth spiral
  3. Check it

    In Gemini CLI, run /mcp. From your shell:

    gemini mcp list

Use the Spiral skill

  1. Send Gemini CLI this message

    Your agent reads Spiral's skill and sets itself up.

    set up https://spiral.ai/SKILL.md
  2. Sign in or paste a key

    Approve Spiral in the browser, or give the agent a key from the console.

Use the Spiral CLI

  1. 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

  1. Create an API key

    In the console, under API keys.

  2. Run Grok Imagine Image Quality 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/quality/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 Quality Edit on Spiral, shows the price and runs it.

Grok Imagine Image Quality Edit providers and prices

Spiral runs Grok Imagine Image Quality Edit through fal. Open a card for today's price, with every fee included.

falImage

Settings you can ask for

Grok Imagine Image Quality Edit works from your prompt and image URLs. Ask Gemini CLI for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Number of images1 to 41

Number of images to generate.

Aspect ratioauto, 2:1, 20:9, 19.5:9, 16:9, 4:3, 3:2, 1:1 and 6 moreauto

Aspect ratio of the edited image. When set to auto (the default), the output preserves the aspect ratio of the first input image.

Resolution1k or 2k1k

Resolution of the generated image. 1k for standard resolution, 2k for high resolution.

Output formatjpeg, png, or webpjpeg

The format of the generated image.

Every API field of Grok Imagine Image Editing Quality · Edit Image Quality is on its tool page: open its card above.

What can you do with Grok Imagine Image Quality Edit in Gemini CLI?

Create visual assets for a project while the coding agent handles layout and implementation. Grok Imagine Image Quality can supply photographic or illustrated artwork for a page, game, or prototype.

Product scene concepts

Explore a ceramic mug on a breakfast table, a perfume bottle by a window, or another product scene. Describe a new concept in words or edit an existing product image.

Campaign illustrations

Develop an illustrated campaign image with a specified medium, palette, and focal subject. Create the initial artwork or restyle an existing composition.

Poster concepts

Draft event posters with a short headline and a clear visual hierarchy. Start with a written brief or revise supplied artwork, then proofread the lettering.

Game art direction

Explore a location or character in pixel art, pencil, or painted styles. Generate a concept from a description or transform an existing concept image.

Editorial imagery

Create a visual metaphor for an article or newsletter. Specify one main subject and the desired photographic or illustrated treatment, or adapt an existing image.

Packaging mockups

Explore label placement, material appearance, and short packaging text. Generate a package concept or revise a supplied mockup before a designer prepares the final artwork.

Photo lighting revisions

Change the lighting in a supplied photograph, such as moving an outdoor scene toward midday sunlight. Ask to retain the subject and framing, then compare the result with the original.

Reference-based art direction

Combine a product reference with a visual style reference to explore an advertisement. Explain what each image contributes and keep the request within three reference images.

Questions about Grok Imagine Image Quality Edit in Gemini CLI

Can Gemini CLI use Grok Imagine Image Quality Edit?

Yes. Add Spiral to Gemini CLI as an MCP server, and Gemini CLI can find and run Grok Imagine Image Quality Edit like any built-in tool.

How much does Grok Imagine Image Quality Edit cost in Gemini CLI?

Up to $0.065 per run at the default inputs. `resolution`: 1k (default) $0.065, 2k $0.091. $0.065 per unit of `num_images`. Each item in `image_urls` adds $0.013. 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 Quality Edit in Gemini CLI?

No. Spiral runs Grok Imagine Image Quality 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 Quality Edit in Gemini CLI?

About two minutes: add the server, then sign in, then check it.

Does Gemini CLI wait while Grok Imagine Image Quality Edit runs?

Grok Imagine Image Quality 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 Quality good at?

Product imagery, realistic scenes, and illustrated concepts are useful starting points. It also supports lettering inside pictures, which makes posters and packaging concepts worth trying.

Can Grok Imagine Image Quality make illustrations instead of photographs?

Yes. Supported styles include anime, oil paintings, pencil sketches, 3D renders, and game art; name the desired medium in your prompt.

What resolution should I choose?

Use 1K for composition drafts and 2K when reviewing smaller visual details. Both are documented output resolutions.

Can Grok Imagine Image Quality render text in different languages?

Text rendering across languages is supported. Supply the exact wording you want and check every rendered word before using the image.

How should I check whether a result is usable?

Compare it with the original brief: check the subject, object count, materials, and composition. Repeat that check after revisions instead of judging only the latest change.

Get started

Start using Grok Imagine Image Quality 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 Gemini CLI

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options