[Integrations](https://spiral.ai/integrations) › [Muse Code](https://spiral.ai/integrations/muse-code) › [Grok Imagine Image 2.0 Edit](https://spiral.ai/integrations/muse-code/grok-imagine-image-2-0-edit)

# How to Use Grok Imagine Image 2.0 Edit in Muse Code

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.

|  |  |
| --- | --- |
| Model | Grok Imagine Image 2.0 Edit |
| Available through | fal |
| Category | Image |
| Price | $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. |
| Returns | image |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Grok Imagine Image 2.0 Edit in Muse Code

- 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 Muse Code

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

### Use Spiral's MCP server

1. **Install Muse Code**

```bash
curl -fsSL https://dev.meta.ai/install.sh | bash
```

2. **Ask Muse to add the server**: Start `muse` and ask:

```text
Add the Spiral MCP server at https://api.spiral.ai/mcp
```

3. **Sign in**: In your terminal, run:

```bash
muse mcp login spiral
```

### Use the Spiral skill

1. **Send Muse Code 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.

```bash
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 2.0 Edit**: One request; the result comes back by polling or a webhook.

```bash
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: Muse Code finds Grok Imagine Image 2.0 Edit on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/muse-code

## Grok Imagine Image 2.0 Edit tools and prices

- [Grok Imagine Image 2.0 · Edit Image](https://spiral.ai/tools/fal/xai/grok-imagine-image/v2.0/edit) (fal): $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.
- [Grok Imagine Image 2.0 · Edit](https://spiral.ai/tools/xai/grok-imagine-image-2.0/edit) (xAI): $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

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| image_urls |  | — | List of URLs of the images to edit. A maximum of 5 images are supported. |
| num_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, 3:4, 9:16, 9:19.5, 9:20, 1:2, auto, 21:9, 5:2 | 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, 2k | 1k | Resolution of the generated image: 1k, 1.5k, or 2k. |
| output_format | jpeg, png, webp | jpeg | The format of the generated image. |
| image_passthrough |  | false | 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. |

## What can you do with Grok Imagine Image 2.0 Edit in Muse Code?

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.

## Overview

- [fal](https://spiral.ai/providers/fal)
- [All Muse Code guides](https://spiral.ai/integrations/muse-code)

## Grok Imagine Image 2.0 Edit in other agents

- [Amp](https://spiral.ai/integrations/amp/grok-imagine-image-2-0-edit)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/grok-imagine-image-2-0-edit)
- [Claude](https://spiral.ai/integrations/claude-desktop/grok-imagine-image-2-0-edit)
- [Claude Code](https://spiral.ai/integrations/claude-code/grok-imagine-image-2-0-edit)
- [Cline](https://spiral.ai/integrations/cline/grok-imagine-image-2-0-edit)
- [Codex](https://spiral.ai/integrations/codex/grok-imagine-image-2-0-edit)
- [Cursor](https://spiral.ai/integrations/cursor/grok-imagine-image-2-0-edit)
- [Devin](https://spiral.ai/integrations/devin/grok-imagine-image-2-0-edit)
- [dots](https://spiral.ai/integrations/dots/grok-imagine-image-2-0-edit)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/grok-imagine-image-2-0-edit)
- [Gemini](https://spiral.ai/integrations/gemini/grok-imagine-image-2-0-edit)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/grok-imagine-image-2-0-edit)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/grok-imagine-image-2-0-edit)
- [goose](https://spiral.ai/integrations/goose/grok-imagine-image-2-0-edit)
- [Grok](https://spiral.ai/integrations/grok/grok-imagine-image-2-0-edit)
- [Grok Build](https://spiral.ai/integrations/grok-build/grok-imagine-image-2-0-edit)
- [Hermes](https://spiral.ai/integrations/hermes/grok-imagine-image-2-0-edit)
- [Instinct](https://spiral.ai/integrations/instinct/grok-imagine-image-2-0-edit)
- [Manus](https://spiral.ai/integrations/manus/grok-imagine-image-2-0-edit)
- [Muse](https://spiral.ai/integrations/muse/grok-imagine-image-2-0-edit)
- [n8n](https://spiral.ai/integrations/n8n/grok-imagine-image-2-0-edit)
- [Notion](https://spiral.ai/integrations/notion/grok-imagine-image-2-0-edit)
- [OpenClaw](https://spiral.ai/integrations/openclaw/grok-imagine-image-2-0-edit)
- [opencode](https://spiral.ai/integrations/opencode/grok-imagine-image-2-0-edit)
- [Perplexity](https://spiral.ai/integrations/perplexity/grok-imagine-image-2-0-edit)
- [Raycast](https://spiral.ai/integrations/raycast/grok-imagine-image-2-0-edit)
- [VS Code](https://spiral.ai/integrations/vscode/grok-imagine-image-2-0-edit)
- [Windsurf](https://spiral.ai/integrations/windsurf/grok-imagine-image-2-0-edit)
- [Zapier](https://spiral.ai/integrations/zapier/grok-imagine-image-2-0-edit)

## More Muse Code guides

- [Grok Imagine Image 2.0](https://spiral.ai/integrations/muse-code/grok-imagine-image-2-0)
- [Grok Imagine Image 2.0 Text to Image](https://spiral.ai/integrations/muse-code/grok-imagine-image-2-0-text-to-image)
- [Grok Imagine Image](https://spiral.ai/integrations/muse-code/grok-imagine-image)
- [Grok Imagine Image Edit](https://spiral.ai/integrations/muse-code/grok-imagine-image-edit)
- [Google Virtual Try-On](https://spiral.ai/integrations/muse-code/google-virtual-try-on)
- [Grok Imagine Image Quality Edit](https://spiral.ai/integrations/muse-code/grok-imagine-image-quality-edit)

## Questions about Grok Imagine Image 2.0 Edit in Muse Code

**Can Muse Code use Grok Imagine Image 2.0 Edit?**

Yes. Add Spiral to Muse Code as an MCP server, and Muse Code 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 Muse Code?**

$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 Muse Code plan is separate.

**Do I need a fal account to use Grok Imagine Image 2.0 Edit in Muse Code?**

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 Muse Code?**

About two minutes: install Muse Code, then ask Muse to add the server, then sign in.

**Does Muse Code wait while Grok Imagine Image 2.0 Edit runs?**

Grok Imagine Image 2.0 Edit runs in the background. Muse Code 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.

