How to Use Bria RMBG 2.0 in opencode
Bria RMBG 2.0 turns existing images into transparent cutouts for product listings, portraits, and design work. It preserves the original pixels and resolution, with optional wording to control which objects stay.
Prompts to try with Bria RMBG 2.0 in opencode
Copy an example into opencode, or ask in your own words.
Use Bria RMBG 2.0 on public/images/product.jpg and save the cutout beside the original for the catalog page.
Use Bria RMBG 2.0 on the team portraits in public/team, then build a preview so I can inspect hair edges.
Use Bria RMBG 2.0 on assets/room.jpg with the instruction 'only the chair' and preview the cutout.
Use Bria RMBG 2.0 on assets/yoga.jpg, keeping the person with the mat, for the exercise page.
Use Bria RMBG 2.0 to isolate the subject in assets/campaign.jpg, then place the cutout beside the existing campaign copy.
How to set up Bria RMBG 2.0 in opencode
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- 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
- 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
- Check it
Spiral shows as connected.
opencode mcp list
Use the Spiral skill
- Send opencode 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 Bria RMBG 2.0
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/bria/background/remove", "input": { "image_url": "https://fal.media/files/panda/K5Rndvzmn1j-OI1VZXDVd.jpeg" } }'
Then paste one of the prompts above: opencode finds Bria RMBG 2.0 on Spiral, shows the price and runs it.
Bria RMBG 2.0 providers and prices
Spiral runs Bria RMBG 2.0 through fal. Open a card for today's price, with every fee included.
What can you do with Bria RMBG 2.0 in opencode?
Create transparent image assets from photos already in your project. Have the coding agent place the cutouts in layouts and prepare previews for edge inspection.
Product listing cutouts
Isolate products from existing photos for placement in catalog layouts.
Portraits for team pages
Separate people from portrait backgrounds before arranging a consistent team page. Inspect loose hair before publishing.
Advertising compositions
Extract a photographed subject for placement alongside campaign copy and other design elements.
Stock-image collages
Turn subjects from stock images into transparent layers for editorial compositions.
Furniture selection
Keep one chair from a furnished-room photo using a specific selection instruction.
People with essential props
Keep a person together with a relevant object, such as a yoga mat, for instructional artwork.
More on Bria RMBG 2.0 and opencode
Overview
Bria RMBG 2.0 in other agents
Questions about Bria RMBG 2.0 in opencode
Can opencode use Bria RMBG 2.0?
Yes. Add Spiral to opencode as an MCP server, and opencode can find and run Bria RMBG 2.0 like any built-in tool.
How much does Bria RMBG 2.0 cost in opencode?
$0.03900078 per generation. 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 RMBG 2.0 in opencode?
No. Spiral runs Bria RMBG 2.0 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 RMBG 2.0 in opencode?
About two minutes: add the server, then sign in, then check it.
Does opencode wait while Bria RMBG 2.0 runs?
Bria RMBG 2.0 runs in the background. opencode starts the run, checks on it and gives you the image when it's ready.
What is Bria RMBG 2.0 useful for?
Use it to isolate subjects from existing images for product listings, advertising layouts, stock-image compositions, and design assets.
Does Bria RMBG 2.0 repaint the subject?
Background removal changes transparency while preserving the original image pixels. Treat the result as a cutout to compose elsewhere.
What resolution does the cutout have?
Bria documents output at the original image resolution. Background removal does not add image detail or enlarge the source.
How should I describe what to keep?
Name the objects that belong in the cutout, such as 'the person with the mat' or 'only the chair.' Describe selection changes rather than requesting a new scene.
Which details should I inspect before using a cutout?
Inspect loose hair, fur, glass, and fine edges. Bria reports cleaner results on these details with RMBG 3.0, so review them carefully in RMBG 2.0 output.
Start using Bria RMBG 2.0 in opencode
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into opencode:
set up https://spiral.ai/SKILL.md


