[Integrations](https://spiral.ai/integrations) › [Claude Code](https://spiral.ai/integrations/claude-code) › [Marigold V2](https://spiral.ai/integrations/claude-code/marigold-v2)

# How to Use Marigold V2 in Claude Code

Marigold V2 turns a single image into a depth visualization for reviewing scene structure. It also supports normal and albedo predictions, but its output is a viewable image rather than numerical geometry data.

|  |  |
| --- | --- |
| Model | Marigold V2 |
| Available through | fal |
| Category | Image |
| Price | $0.039 per image. |
| Returns | image |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Marigold V2 in Claude Code

- Use Marigold V2 on assets/room.jpg to generate a depth visualization, then add an original-and-result comparison to our review page.
- Use Marigold V2 to create a normal visualization from assets/product.png and save it beside the source for review.
- Use Marigold V2 on assets/material.jpg for an albedo prediction, then build a labeled comparison with the original.
- Use Marigold V2 on assets/scene.jpg to compare depth and see-through depth at identical dimensions.
- Use Marigold V2 on our sample photograph at 1024 by 1024 with seed 42, and record the prediction choice with the result.

## How to set up Marigold V2 in Claude Code

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

### Use Spiral's MCP server

1. **Add the hosted server**: This adds Spiral to the current project. Add `--scope user` to use it in every project.

```bash
claude mcp add --transport http spiral https://api.spiral.ai/mcp
```

2. **Sign in**: Start `claude`, type `/mcp`, choose spiral and Authenticate. Sign in to Spiral in the browser and click Authorize. No API key.

### Use the Spiral skill

1. **Send Claude 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 Marigold V2**: 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": "fal-ai/marigold-v2",
    "input": {
      "image_url": "https://storage.googleapis.com/falserverless/example_inputs/dog.png"
    }
  }'
```

Then paste one of the prompts above: Claude Code finds Marigold V2 on Spiral, shows the price and runs it.

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

## Marigold V2 tools and prices

- [Marigold V2 Depth](https://spiral.ai/tools/fal/fal-ai/marigold-v2) (fal): $0.039 per image.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| prediction_type | depth, see-through-depth, normals, albedo | depth | Prediction map to generate. |
| image_size |  | — | Inference size as an explicit `{width, height}` object or a preset string (e.g. `"square_hd"`, `"landscape_4_3"`). Both dimensions must be multiples of 16 and no larger than 2048 pixels on either side, with an aspect ratio between 1:16 and 16:1. Defaults to the input image's dimensions rounded to the nearest multiple of 16. |
| seed |  | — | Random seed. Only affects the VAE encoder's latent sampling (the forward pass itself is a single deterministic step); the same seed and image reproduce the same output. |

## What can you do with Marigold V2 in Claude Code?

Build visual inspection tools around image predictions. Your coding agent can pair project images with results and record the settings used.

### Compositing references

Generate a depth visualization from a photograph as a visual reference while planning foreground and background edits.

### Surface prediction review

Request a normal visualization from a product photograph for inspection alongside the original.

### Albedo studies

Compare an albedo prediction with its source photograph during an image analysis study.

### Depth teaching materials

Pair photographs with depth visualizations for a lesson on interpreting scene structure.

### Prediction comparison sheets

Place depth and see-through depth predictions beside the same source image for manual comparison.

### Repeatable image reviews

Record the source image, prediction choice, dimensions, and seed with each visualization for later reproduction.

## Overview

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

## Marigold V2 in other agents

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

## More Claude Code guides

- [Makeup Changer](https://spiral.ai/integrations/claude-code/makeup-changer)
- [MiniMax H3 Image Edit](https://spiral.ai/integrations/claude-code/minimax-h3-image-edit)
- [MOSS Image](https://spiral.ai/integrations/claude-code/moss-image)
- [MiniMax H3 Image Highspeed Edit](https://spiral.ai/integrations/claude-code/minimax-h3-image-highspeed-edit)
- [MAI Image 2.5](https://spiral.ai/integrations/claude-code/mai-image-2-5)
- [MiniMax H3 Image Highspeed Text to Image](https://spiral.ai/integrations/claude-code/minimax-h3-image-highspeed-text-to-image)

## Questions about Marigold V2 in Claude Code

**Can Claude Code use Marigold V2?**

Yes. Add Spiral to Claude Code as an MCP server, and Claude Code can find and run Marigold V2 like any built-in tool.

**How much does Marigold V2 cost in Claude Code?**

$0.039 per image. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Claude Code plan is separate.

**Do I need a fal account to use Marigold V2 in Claude Code?**

No. Spiral runs Marigold V2 on its own fal account. You sign in to Spiral once and never paste a key.

**How long does it take to set up Marigold V2 in Claude Code?**

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

**Does Claude Code wait while Marigold V2 runs?**

Marigold V2 runs in the background. Claude Code starts the run, checks on it and gives you the image when it's ready.

**What is Marigold V2 useful for?**

It produces visual maps for inspecting an image's depth, normals, or albedo. Use these as review aids when planning image work.

**Does Marigold V2 return numerical geometry data?**

The documented output is a PNG visualization rather than a lossless numerical tensor. Check that distinction before using it in a geometry pipeline.

**Can Marigold V2 process a 4K image at full resolution?**

Inference is limited to 2048 pixels on either side, with dimensions divisible by 16. Choose a smaller size that preserves the composition.

**How do I reproduce a Marigold V2 result?**

Keep the image, prediction choice, dimensions, and seed fixed. The seed controls latent sampling in the image encoder.

**Does Marigold V2 need multiple camera views?**

Depth estimation starts from a single image. You can request a depth visualization without supplying a second viewpoint.

