[Integrations](https://spiral.ai/integrations) › [opencode](https://spiral.ai/integrations/opencode) › [Fibo 2.0 Edit](https://spiral.ai/integrations/opencode/fibo-2-0-edit)

# How to Use Fibo 2.0 Edit in opencode

Use Fibo 2.0 Edit to restage products, change materials, or combine up to four source images. Unlike Generate, it starts with existing images and supports masked changes to one image.

|  |  |
| --- | --- |
| Model | Fibo 2.0 Edit |
| Available through | fal |
| Category | Image |
| Price | $0.052 per image. |
| Returns | image |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Fibo 2.0 Edit in opencode

- Use Fibo 2.0 Edit on the project's chair photograph. Replace only the masked upholstery with forest-green velvet, keeping the original pixels outside the mask. Save the result at the source dimensions.
- Use Fibo 2.0 Edit to combine three project images: take the bottle from image 1, the tabletop setting from image 2, and the wordmark from image 3. Place the bottle centrally with the wordmark above it in a square composition.
- Remove the background from the photo I attach with Fibo 2.0 Edit and give me a transparent PNG. Save the result in ./assets.
- Use Fibo 2.0 Edit to clean up these product shots so they sit on pure white.
- Edit this image with Fibo 2.0 Edit: keep the subject, swap the background for a sunlit studio.

## How to set up Fibo 2.0 Edit in opencode

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

### Use Spiral's MCP server

1. **Add the server**: Leave out `--global` to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.

```bash
opencode mcp add spiral --global --url https://api.spiral.ai/mcp
```

2. **Sign in**: Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, `/mcps` starts the same sign-in.

```bash
opencode mcp auth spiral
```

3. **Check it**: Spiral shows as connected.

```bash
opencode mcp list
```

### Use the Spiral skill

1. **Send opencode 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 Fibo 2.0 Edit**: 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": "bria/fibo-2/edit",
    "input": {
      "image_urls": [
        "<image_urls>"
      ]
    }
  }'
```

Then paste one of the prompts above: opencode finds Fibo 2.0 Edit on Spiral, shows the price and runs it.

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

## Fibo 2.0 Edit tools and prices

- [Fibo 2.0 Edit](https://spiral.ai/tools/fal/bria/fibo-2/edit) (fal): $0.052 per image.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| instruction |  | — | The edit, in free-form text. It is expanded into a VGL, which is returned. With 'vgl', the change to make to it. 'prompt' is accepted as an alias. |
| aspect_ratio | 1:1, 1:2, 1:3, 1:4, 1:5, 2:1, 2:3, 3:1, 3:2, 3:4, 4:1, 4:3, 4:5, 5:1, 5:4, 9:16, 9:21, 10:16, 16:9, 16:10, 21:9 | — | Output aspect ratio, at about one megapixel. Left unset, the output keeps the ratio of the first image. A single image always keeps its own ratio. |
| seed | 0 to 2147483647 | 5555 | Random seed for reproducibility, 0 to 2147483647. |
| mask_url |  | — | Mask (file or URL) marking the region to regenerate: white where the model should edit, black elsewhere. Single-image requests only, at that image's size. A masked edit comes back at the image's own size, with its own pixels outside the mask. |
| vgl |  | — | A VGL (Visual Generation Language) document. Alone, it is the edit as-is and must carry its 'edit_instruction'. With 'instruction', it is the first image's VGL, the baseline the edit is written from. Accepts what a previous request returned. |

## What can you do with Fibo 2.0 Edit in opencode?

Create project illustrations and revise existing image assets from concrete visual briefs. Keep returned VGL descriptions and seeds beside the assets so later revisions have a reproducible starting point.

### Product restaging

Use Edit to place a product from one reference into a setting from another. Describe the product's placement and the details to retain.

### Controlled campaign variations

Save a generated image's VGL and seed, then change a selected scene detail to explore variations from the same brief.

### Localized asset revisions

Use a masked single-image edit to replace a selected region while retaining the source dimensions and original pixels elsewhere.

### Illustrations from visual briefs

Use Generate for scenes with specific subjects, materials, lighting, and composition. Inspect the returned scene description before deciding what to revise.

### Reference-led compositions

Combine a product, a setting, and lettering from three images with Edit. Assign each reference a distinct role in the instruction.

### Repeatable image production

Keep the VGL and seed alongside approved generated images so an agent can reproduce them and prepare controlled revisions.

## Overview

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

## Fibo 2.0 Edit in other agents

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

## More opencode guides

- [FeyNoBg](https://spiral.ai/integrations/opencode/feynobg)
- [Fibo 2.0 Generate](https://spiral.ai/integrations/opencode/fibo-2-0-generate)
- [Fal Color Correction](https://spiral.ai/integrations/opencode/fal-color-correction)
- [Fibo BBQ Preview](https://spiral.ai/integrations/opencode/fibo-bbq-preview)
- [Face Enhancement](https://spiral.ai/integrations/opencode/face-enhancement)
- [Fibo Edit](https://spiral.ai/integrations/opencode/fibo-edit)

## Questions about Fibo 2.0 Edit in opencode

**Can opencode use Fibo 2.0 Edit?**

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run Fibo 2.0 Edit like any built-in tool.

**How much does Fibo 2.0 Edit cost in opencode?**

$0.052 per image. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.

**Do I need a fal account to use Fibo 2.0 Edit in opencode?**

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

**How long does it take to set up Fibo 2.0 Edit in opencode?**

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

**Does opencode wait while Fibo 2.0 Edit runs?**

Fibo 2.0 Edit runs in the background. opencode starts the run, checks on it and gives you the image when it's ready.

**When should I use Generate instead of Edit?**

Choose Generate for a new scene from a written brief or visual reference. Choose Edit when an existing image supplies the product, subject, or composition you want to change.

**What resolution should I expect?**

Generate and multi-image edits are documented at approximately one megapixel. Masked single-image edits retain the source image's dimensions.

**What is VGL useful for?**

VGL is an editable JSON description of the scene. Save it with the seed to reproduce a generated result, then change selected details to make controlled variations.

**Can it combine several reference images?**

Edit accepts up to four images together. Give each image a clear role, such as the product, setting, or lettering to use in the result.

**Will a masked edit preserve the original image?**

Original pixels outside the mask are preserved, and the output retains the source dimensions. Inside the mask, the model generates new content, so treat the region as a replacement area.

