How to Use Google Virtual Try-On in Gemini CLI
Google Virtual Try-On creates an image of a person wearing clothing shown in a separate product photo. Use it for apparel previews, wardrobe comparisons, and styling shortlists guided by actual garment images.
Prompts to try with Google Virtual Try-On in Gemini CLI
Copy an example into Gemini CLI, or ask in your own words.
Use Google Virtual Try-On with person.jpg and sweater.jpg in the project's assets folder. Save the preview beside both originals for review.
Use Google Virtual Try-On to preview each shirt in assets/shirts on assets/person.jpg separately. Build a comparison page labeled with the source filenames.
Use Google Virtual Try-On with the blue and green product photos in this project, keeping the person image fixed. Place both previews side by side.
Use Google Virtual Try-On to preview the catalog sweater on each person image in assets/people. Keep each result linked to its source pair.
Use Google Virtual Try-On to add the project's top first, then use that result to preview the trousers. Save both stages for inspection.
How to set up Google Virtual Try-On 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 Google Virtual Try-On
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": "google/virtual-try-on", "input": { "person_image_url": "https://storage.googleapis.com/falserverless/model_tests/leffa/person_image.jpg", "product_image_url": "https://storage.googleapis.com/falserverless/model_tests/leffa/tshirt_image.jpg" } }'
Then paste one of the prompts above: Gemini CLI finds Google Virtual Try-On on Spiral, shows the price and runs it.
Google Virtual Try-On providers and prices
Spiral runs Google Virtual Try-On through fal. Open a card for today's price, with every fee included.
Settings you can ask for
Ask Gemini CLI for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Number of images | 1 to 4 | 1 | The number of virtual try-on images to generate. |
Every API field of Google Virtual Try On is on its tool page: open its card above.
What can you do with Google Virtual Try-On in Gemini CLI?
Create apparel previews from the project's person and product images. Your coding agent can organize comparisons and retain the originals beside each result for review.
Product page previews
Pair a clothing product photo with a selected person image to prepare an apparel preview for review.
Wardrobe comparisons
Preview several garments separately on the same person, then arrange the results side by side.
Color comparisons
Use product photos of different garment colors with the same person image to compare the resulting looks.
Stylist shortlists
Turn a selection of clothing product images into visual options for a client's styling review.
Catalog casting reviews
Preview one garment on several supplied person images to review potential catalog presentations.
Outfit planning
Add a top first, then use the resulting image for a second pass with bottoms. Review the clothing after each pass.
More on Google Virtual Try-On and Gemini CLI
Overview
Google Virtual Try-On in other agents
Questions about Google Virtual Try-On in Gemini CLI
Can Gemini CLI use Google Virtual Try-On?
Yes. Add Spiral to Gemini CLI as an MCP server, and Gemini CLI can find and run Google Virtual Try-On like any built-in tool.
How much does Google Virtual Try-On cost in Gemini CLI?
$0.0975 per image. Billed on `num_images`, default 1. 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 Google Virtual Try-On in Gemini CLI?
No. Spiral runs Google Virtual Try-On on its own fal account. You sign in to Spiral once and never paste a key.
How long does it take to set up Google Virtual Try-On in Gemini CLI?
About two minutes: add the server, then sign in, then check it.
Does Gemini CLI wait while Google Virtual Try-On runs?
Google Virtual Try-On runs in the background. Gemini CLI starts the run, checks on it and gives you the image when it's ready.
What is Google Virtual Try-On useful for?
It creates images of a person wearing clothing from a product photo. Use those previews to compare garments, prepare styling shortlists, or review apparel imagery.
How should I guide the clothing's appearance?
Supply a product photo showing the garment you want to preview. For a color comparison, use a separate product image for each color and keep the person image the same.
Can I build an outfit in stages?
Yes. Google's tutorial demonstrates generating a top first, then using that result as the person image when adding bottoms.
What resolution and shape do the images have?
Google documents the output resolution and aspect ratio as matching the input image. Choose your source image with the intended final framing in mind.
What should I check before using a result?
Compare the person's body shape and the garment's identity with the originals. Google has specifically updated preservation of both, so include them in your review.
Start using Google Virtual Try-On 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


