[Integrations](https://spiral.ai/integrations) › [VS Code](https://spiral.ai/integrations/vscode) › [MOSS Image](https://spiral.ai/integrations/vscode/moss-image)

# How to Use MOSS Image in VS Code

MOSS Image creates text-heavy graphics such as bilingual posters, signs, and illustrated explainers. It runs MOSS-Image-SFT, with control over where text and objects appear through structured layout prompts.

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

## Prompts to try with MOSS Image in VS Code

- Read the homepage copy in this project and use MOSS Image to create a 1536 × 1024 launch graphic. Use the product name as the only visible text, place it at the upper left, and describe the main illustration from the product's documented purpose. Save the result with the site's image assets.
- Read the English and Chinese event translations in this project. Use MOSS Image to generate a 1024 × 1536 poster with the approved event titles at the top, an illustration in the middle, and the date and venue below. Preserve the supplied wording and line breaks.
- Read the onboarding documentation and use MOSS Image to make a 1536 × 1024 illustrated explainer with three labeled sections. Draft the exact short labels first, arrange the sections from left to right, and check the generated wording against the documentation.
- Use the book title, author name, and synopsis in this project to create a 1024 × 1536 cover concept with MOSS Image. Put the title in the top third, the scene in the center, and the author name at the bottom. Keep all visible text limited to the approved title and author.
- Read the campaign brief and use MOSS Image to generate a 1024 × 1024 announcement. Prepare a structured JSON layout that separates the exact headline, supporting line, and central illustration. Match the layout to the canvas dimensions and save the prompt beside the image.

## How to set up MOSS Image in VS Code

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

### Use Spiral's MCP server

1. **Add the hosted server**: Use Add to VS Code on the console's Agents & MCP page, or run:

```bash
code --add-mcp '{"name":"spiral","type":"http","url":"https://api.spiral.ai/mcp"}'
```

2. **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

1. **Send VS 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 MOSS Image**: 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/moss-image",
    "input": {
      "prompt": "A wide view of a refrigerator beside a kitchen counter with a fruit bowl. A small sticky note on the refrigerator door is handwritten in…"
    }
  }'
```

Then paste one of the prompts above: VS Code finds MOSS Image on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/vscode

## MOSS Image tools and prices

- [MOSS Image · Text to Image](https://spiral.ai/tools/fal/fal-ai/moss-image) (fal): $0.065 per megapixel. `image_size` presets count as 1 MP; custom sizes round up to whole megapixels. Billed on `num_images`, default 1.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| negative_prompt |  |  | Negative prompt. When empty, guidance uses transformer layer skipping for the negative branch. |
| enable_prompt_expansion |  | true | Plan a structured layout from your prompt before generation. Preserves requested visible text and uses the selected image dimensions. If enhancement is unavailable, uses the original prompt. |
| image_size |  | square_hd | Output image size. Width and height are rounded to multiples of 16 between 512 and 2048 pixels. |
| num_inference_steps | 1 to 100 | 50 | Number of denoising steps. |
| guidance_scale | 0 to 10 | 3 | Classifier-free guidance scale. |
| seed |  | — | Random seed for reproducible generation. |

## What can you do with MOSS Image in VS Code?

Create text-heavy visual assets from project copy, including bilingual announcements and illustrated explainers. A coding agent can read the relevant files and prepare a layout prompt with explicit text and object positions.

### Bilingual event posters

Create a new poster from approved Chinese and English copy, with separate areas for the headline, illustration, date, and location.

### Educational explainers

Turn a short explanation into an illustrated graphic with a title, labeled objects, and clearly separated reading sections. Check the labels against the source material.

### Store signs and notices

Draft opening-hours signs, pickup instructions, and bilingual notices from exact text. Specify line breaks and the relative size of each message.

### Product launch graphics

Generate promotional concepts from a written product description, a short headline, and a planned composition. Review the depicted product details before use.

### Editorial illustrations

Create an article illustration from a written brief, using a photorealistic or anime treatment and deliberate space for a short title.

### Book cover concepts

Explore cover compositions with an exact title, author name, and described scene. Specify the hierarchy and placement of the text before generating.

### Social campaign concepts

Generate separate square and portrait concepts from the same approved message. Adapt the composition to each canvas rather than assuming a crop will preserve the text.

## Overview

- [fal](https://spiral.ai/providers/fal)
- [All VS Code guides](https://spiral.ai/integrations/vscode)

## MOSS Image in other agents

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

## More VS Code guides

- [MAI Image 2.5](https://spiral.ai/integrations/vscode/mai-image-2-5)
- [Makeup Changer](https://spiral.ai/integrations/vscode/makeup-changer)
- [Luma Uni-1 Text to Image](https://spiral.ai/integrations/vscode/luma-uni-1-text-to-image)
- [Marigold V2](https://spiral.ai/integrations/vscode/marigold-v2)
- [Luma Uni-1 Max Edit](https://spiral.ai/integrations/vscode/luma-uni-1-max-edit)
- [MiniMax H3 Image Edit](https://spiral.ai/integrations/vscode/minimax-h3-image-edit)

## Questions about MOSS Image in VS Code

**Can VS Code use MOSS Image?**

Yes. Add Spiral to VS Code as an MCP server, and VS Code can find and run MOSS Image like any built-in tool.

**How much does MOSS Image cost in VS Code?**

$0.065 per megapixel. `image_size` presets count as 1 MP; custom sizes round up to whole megapixels. 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 MOSS Image in VS Code?**

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

**How long does it take to set up MOSS Image in VS Code?**

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

**Does VS Code wait while MOSS Image runs?**

MOSS Image runs in the background. VS Code starts the run, checks on it and gives you the image when it's ready.

**What is MOSS Image useful for?**

Consider MOSS Image for graphics where words and composition both matter: bilingual posters, signs, illustrated explainers, and promotional concepts. Chinese and English text rendering and controlled element placement are its documented specialties.

**Can MOSS Image put Chinese and English in the same graphic?**

MOSS Image specializes in both Chinese and English text rendering. Provide the exact copy for each language and describe where each text block should appear.

**How should I prompt MOSS Image for a specific layout?**

Describe the scene, exact visible text, and positions of the main elements. MOSS Image accepts natural language and structured JSON layouts, so an agent can turn a detailed brief into a layout prompt.

**How large can MOSS Image outputs be?**

Each dimension can range from 512 to 2048 pixels, rounded to a multiple of 16. A 1024 × 1536 poster or 1536 × 1024 landscape graphic fits those limits.

**Can MOSS Image edit a photo or follow an uploaded reference?**

MOSS Image does not directly condition generation on reference images or support image editing. Use it to generate a new composition from a text description.

