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.
Prompts to try with Marigold V2 in Claude Code
Copy an example into Claude Code, or ask in your own words.
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
- Add the hosted server
This adds Spiral to the current project. Add --scope user to use it in every project.
claude mcp add --transport http spiral https://api.spiral.ai/mcp
- 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
- Send Claude Code 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 Marigold V2
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": "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.
Marigold V2 providers and prices
Spiral runs Marigold V2 through fal. Open a card for today's price, with every fee included.
Settings you can ask for
Marigold V2 works from your image URL. Ask Claude Code for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Prediction type | depth, see-through-depth, normals, or albedo | depth | Prediction map to generate. |
| Seed | a whole number | 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. |
Every API field of Marigold V2 Depth is on its tool page: open its card above.
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.
More on Marigold V2 and Claude Code
Overview
Marigold V2 in other agents
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.
Start using Marigold V2 in Claude Code
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into Claude Code:
set up https://spiral.ai/SKILL.md


