Spiral gives your agent every tool with one account. Browse the tools →

opencode · Image

How to Use Bria Replace Background V2 in opencode

Bria Replace Background V2 turns existing product photos into new studio or lifestyle scenes with realistic lighting and perspective. Use it to change the setting, then check the product for subtle changes.

Prompts to try with Bria Replace Background V2 in opencode

Copy an example into opencode, or ask in your own words.

Use Bria Replace Background V2 on the coffee maker photo in public/products. Generate a pale stone kitchen counter against a blue tile wall, with soft light from the left and a front-facing view. Save the result beside the original for comparison.

Bria Replace Background V2opencode
Try asking
  • Read the campaign brief in this project and use Bria Replace Background V2 to create a matching setting for the candle product photo. Specify the tabletop, wall color, and lighting in English. Flag any visible changes to the candle.

  • Use Bria Replace Background V2 to make three separate background studies for our speaker photo: an oak desk, a concrete studio surface, and a living room shelf. Create a local comparison page showing each result beside the original.

  • Use Bria Replace Background V2 on the skincare bottle photo in the project. Request a limestone bathroom shelf with soft morning light. Use the negative prompt to exclude extra bottles and decorative plants, then compare the label with the original.

  • Use Bria Replace Background V2 to give the product photos in assets/catalog the same scene brief: a light wood tabletop, a muted green wall, and diffuse daylight. Build a contact sheet and flag inconsistent backgrounds or changed product details.

How to set up Bria Replace Background V2 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.

    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.

    opencode mcp auth spiral
  3. Check it

    Spiral shows as connected.

    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.

    npx -y spiral-cli@latest init

Call the Spiral API

  1. Create an API key

    In the console, under API keys.

  2. Run Bria Replace Background V2

    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": "bria/replace-background",
        "input": {
          "prompt": "On a smooth kitchen counter in front of a blue and white patterned ceramic tile wall. A yellow ceramic mug sits to the right. Shot from a straight-on front…"
        }
      }'

Then paste one of the prompts above: opencode finds Bria Replace Background V2 on Spiral, shows the price and runs it.

Bria Replace Background V2 providers and prices

Spiral runs Bria Replace Background V2 through fal. Open a card for today's price, with every fee included.

falImage

Settings you can ask for

Bria Replace Background V2 works from your prompt and image URL. Ask opencode for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Seeda whole number4925634

Random seed for reproducibility.

Steps number ofa whole number30

Number of inference steps.

Negative promptwhat to leave out, in words

Negative prompt for background replacement.

Every API field of Replace Background V2 · Image to Image is on its tool page: open its card above.

What can you do with Bria Replace Background V2 in opencode?

Create new product photography settings from the images already in your project. Use the project's design brief to write scene descriptions, then compare the generated images with their originals.

Product page lifestyle photos

Use Bria Replace Background V2 to place an existing appliance photo in a kitchen scene with a specified counter, wall treatment, and lighting direction.

Studio backdrop studies

Try several studio settings around the same product photo with Bria Replace Background V2. Compare warm, cool, and dark backgrounds before selecting a direction.

Seasonal campaign imagery

Give an existing product photo an autumn tabletop or winter window setting with Bria Replace Background V2. Review the product against the original before using the image.

Ad background comparisons

Use Bria Replace Background V2 to create separate scene treatments for one product photo, such as a bathroom shelf and a studio pedestal, for a creative review.

Coordinated catalog scenes

Apply the same written surface, wall, and lighting brief to several product photos with Bria Replace Background V2. Review the results together for visual consistency.

Client scene proposals

Turn an existing product photo into concrete setting proposals with Bria Replace Background V2, such as a reading nook, an office desk, or an outdoor table.

Questions about Bria Replace Background V2 in opencode

Can opencode use Bria Replace Background V2?

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run Bria Replace Background V2 like any built-in tool.

How much does Bria Replace Background V2 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 Bria Replace Background V2 in opencode?

No. Spiral runs Bria Replace Background V2 on its own fal account. You sign in to Spiral once and never paste a key.

How long does it take to set up Bria Replace Background V2 in opencode?

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

Does opencode wait while Bria Replace Background V2 runs?

Bria Replace Background V2 runs in the background. opencode starts the run, checks on it and gives you the image when it's ready.

What is Bria Replace Background V2 best for?

It is designed for giving existing product photos new settings, such as a studio backdrop or a kitchen counter. Its stated strengths are realistic lighting and perspective.

How should I describe the new background?

Describe the surface beneath the product, the surroundings, any props, and the viewing angle. For example, ask for a wooden counter against a tiled wall, with a mug on the right and a front-facing view.

Will the product stay exactly unchanged?

Do not assume pixel-for-pixel preservation. Superside's integration documentation warns that the subject may change subtly, so compare the result with the original before using it.

Can it produce an exact brand-color background?

Treat a requested color as a visual direction. Superside's V2 documentation warns that an exact flat hex color is not guaranteed; use a cutout composited onto a solid color when exact pixels matter.

What language should I use, and how do I exclude unwanted details?

Write the background description in English without special characters, following Bria's guidance. Put unwanted scene elements, such as extra props or patterned walls, in the negative prompt.

Get started

Start using Bria Replace Background V2 in opencode

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into opencode:

Set up opencode

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options