How to Use Sana in VS Code
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.
Prompts to try with Sana in VS Code
Copy an example into VS Code, or ask in your own words.
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 VS Code
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- Add the hosted server
Use Add to VS Code on the console's Agents & MCP page, or run:
code --add-mcp '{"name":"spiral","type":"http","url":"https://api.spiral.ai/mcp"}' - Sign in
VS Code asks you to sign in when it first starts the server: sign in to Spiral and click Authorize. No API key. Run MCP: List Servers from the Command Palette to check that Spiral is running.
Use the Spiral skill
- Send VS 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 Sana
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/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: VS Code finds Sana on Spiral, shows the price and runs it.
Sana providers and prices
Spiral runs Sana through fal. Open a card for today's price, with every fee included.
$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
Sana works from your prompt. Ask VS Code for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Negative prompt | what to leave out, in words | 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). | |
| Number of inference steps | 1 to 50 | 18 | The number of inference steps to perform. |
| Seed | a whole number | The same seed and the same prompt given to the same version of the model will output the same image every time. | |
| Guidance scale (CFG) | 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. |
| Number of images | 1 to 4 | 1 | The number of images to generate. |
| Output format | jpeg or png | jpeg | The format of the generated image. |
| Style name | (No style), Cinematic, Photographic, Anime, Manga, Digital Art, Pixel art, Fantasy art and 2 more | (No style) | The style to generate the image in. |
Every API field of Sana · Base is on its tool page: open its card above.
What can you do with Sana in VS Code?
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.
More on Sana and VS Code
Overview
Sana in other agents
Questions about Sana in VS Code
Can VS Code use Sana?
Yes. Add Spiral to VS Code as an MCP server, and VS Code can find and run Sana like any built-in tool.
How much does Sana cost in VS Code?
$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 VS Code plan is separate.
Do I need a fal account to use Sana in VS Code?
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 VS Code?
About two minutes: add the hosted server, then sign in.
Does VS Code wait while Sana runs?
Sana runs in the background. VS Code 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.
Start using Sana in VS Code
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into VS Code:
set up https://spiral.ai/SKILL.md


