[Integrations](https://spiral.ai/integrations) › [Gemini CLI](https://spiral.ai/integrations/gemini-cli) › [Sana](https://spiral.ai/integrations/gemini-cli/sana)

# How to Use Sana in Gemini CLI

Sana turns detailed text descriptions into images for illustrations, concept art, and large backgrounds. Use it to explore visual ideas, with extra review for lettering, hands, and crowded compositions.

|  |  |
| --- | --- |
| Model | Sana |
| Available through | fal |
| Category | Image |
| Price | $0.0013 per megapixel. `image_size` presets count as 1 MP; custom sizes round up to whole megapixels. Default 8 MP per image. Billed on `num_images`, default 1. |
| Returns | image |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Sana in Gemini CLI

- Read the homepage copy and theme colors in this project. Use Sana to create a 3840 × 2160 background showing folded paper hills under soft morning light, with the main forms on the right and clear space on the left for the existing headline.
- Read the game's forest-level brief. Use Sana to create a 1024 × 1024 environment concept: a mossy stone gateway, wet roots, distant mist, and pale afternoon light. Use a painted fantasy treatment and exclude lettering.
- Use Sana to create a 1024 × 1024 illustration for this project's empty search state: one brass telescope beside a closed notebook on a simple blue surface, soft side lighting, and no words. Match the colors in the theme file.
- Read the product brief and use Sana to create a 1024 × 1024 concept of the proposed desk lamp. Describe its brushed aluminum body, linen shade, rounded base, and warm light precisely; show it alone against a plain background.
- Use Sana to generate two versions of a 1024 × 1024 mountain observatory illustration for this project. Keep the prompt and seed unchanged, compare guidance values of 4 and 6, and show both results beside the page's existing colors.

## How to set up Sana 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:

```bash
gemini mcp add --scope user --transport http spiral https://api.spiral.ai/mcp
```

2. **Sign in**: Start `gemini` and run:

```text
/mcp auth spiral
```

3. **Check it**: In Gemini CLI, run `/mcp`. From your shell:

```bash
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.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run Sana**: 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/sana",
    "input": {
      "prompt": "Underwater coral reef ecosystem during peak bioluminescent activity, multiple layers of marine life - from microscopic plankton to massive coral structures,…"
    }
  }'
```

Then paste one of the prompts above: Gemini CLI finds Sana on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/gemini-cli

## Sana tools and prices

- [Sana · Base](https://spiral.ai/tools/fal/fal-ai/sana) (fal): $0.0013 per megapixel. `image_size` presets count as 1 MP; custom sizes round up to whole megapixels. Default 8 MP per image. Billed on `num_images`, default 1.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| negative_prompt |  |  | The negative prompt to use. Use it to address details that you don't want in the image. This could be colors, objects, scenery and even the small details (e.g. moustache, blurry, low resolution). |
| image_size |  | {"width":3840,"height":2160} | The size of the generated image. |
| num_inference_steps | 1 to 50 | 18 | The number of inference steps to perform. |
| seed |  | — | The same seed and the same prompt given to the same version of the model will output the same image every time. |
| guidance_scale | 0 to 20 | 5 | The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. |
| num_images | 1 to 4 | 1 | The number of images to generate. |

## What can you do with Sana in Gemini CLI?

Create artwork that fits the page or game you are building with Sana. A coding agent can turn project copy and design tokens into a detailed visual brief, then place the selected image in the layout.

### Website background concepts

Generate a wide landscape or still life with an uncluttered area for a headline. Add the headline in the page layout after choosing the artwork.

### Editorial illustrations

Turn an article's central idea into a single visual metaphor, such as a paper boat crossing a sea of receipts.

### Game environment concepts

Explore the lighting, terrain, and architecture of one location before committing to production artwork.

### Product design sketches

Explore the silhouette, materials, and color of an imagined lamp, chair, or household object from a written brief.

### Cover artwork

Create an illustration for a book or podcast cover, leaving clear space for titles added during layout.

### Interior mood studies

Compare wood, stone, fabric, and lighting choices for a proposed room. Keep each scene focused on a few main elements.

## Overview

- [fal](https://spiral.ai/providers/fal)
- [All Gemini CLI guides](https://spiral.ai/integrations/gemini-cli)

## Sana in other agents

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

## More Gemini CLI guides

- [SAM 3.1 Image to RLE](https://spiral.ai/integrations/gemini-cli/sam-3-1-image-to-rle)
- [Sana 1.5 1.6B](https://spiral.ai/integrations/gemini-cli/sana-1-5-1-6b)
- [SAM 3.1 Image](https://spiral.ai/integrations/gemini-cli/sam-3-1-image)
- [Sana 1.5 4.8B](https://spiral.ai/integrations/gemini-cli/sana-1-5-4-8b)
- [SAM 3 Image](https://spiral.ai/integrations/gemini-cli/sam-3-image)
- [Sana Sprint](https://spiral.ai/integrations/gemini-cli/sana-sprint)

## Questions about Sana in Gemini CLI

**Can Gemini CLI use Sana?**

Yes. Add Spiral to Gemini CLI as an MCP server, and Gemini CLI can find and run Sana like any built-in tool.

**How much does Sana cost in Gemini CLI?**

$0.0013 per megapixel. `image_size` presets count as 1 MP; custom sizes round up to whole megapixels. Default 8 MP 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 Sana in Gemini CLI?**

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

**How long does it take to set up Sana in Gemini CLI?**

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

**Does Gemini CLI wait while Sana runs?**

Sana runs in the background. Gemini CLI starts the run, checks on it and gives you the image when it's ready.

**What is Sana useful for?**

Try Sana for illustrations, concept art, and visual design exploration. Treat these as creative drafts that you select and refine.

**How detailed should a Sana prompt be?**

The maker recommends longer, more detailed descriptions. Describe the subject, setting, framing, materials, lighting, and visual style instead of relying on a few keywords.

**What should I check in Sana images?**

Inspect hands, lettering, and crowded compositions, which the maker identifies as weak spots. For designs with essential wording, generate the artwork and add the text separately.

**How large can Sana images be?**

The maker documents image generation up to 4096 × 4096 pixels. That describes Sana's published capability; inspect the generated image at its intended display size before using it.

**Does higher guidance always improve Sana results?**

Higher guidance pushes the image toward the prompt, but the pipeline documentation warns that image quality can suffer. Compare a small adjustment with your starting result before increasing it further.

