How to Use Bria GenFill in Codex
Bria GenFill adds or replaces objects inside a masked part of an existing image. Use it for targeted changes such as swapping a prop or adding seasonal details while working with the surrounding scene.
Prompts to try with Bria GenFill in Codex
Copy an example into Codex, or ask in your own words.
Use Bria GenFill on the homepage photo in this project. Mask the vase and replace it with a short matte ceramic vase, matching the table contact and window lighting. Save a separate edited image and show it in the page preview.
Use Bria GenFill to edit the product photo in the project assets. Replace the selected wooden tray with a shallow white ceramic dish, matching its scale and contact shadow. Show the original and edited photos side by side.
Use Bria GenFill on the campaign image in this repository. Add a small wrapped gift inside a blob-shaped selection beside the product, with paper texture and a shadow that matches the scene.
Use Bria GenFill to compare two descriptions for the selected lamp in the project photo: brushed steel and matte ceramic. Keep the source image, mask, and seed fixed, then put both results in a review page.
Use Bria GenFill on the dessert photo in the project. Add one red cherry to the selected area on top of the cupcake, with realistic size and a small contact shadow. Update the preview to use the edited photo.
How to set up Bria GenFill in Codex
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- Add the hosted server
codex mcp add spiral --url https://api.spiral.ai/mcp
- Sign in
Codex opens the browser: sign in to Spiral and click Authorize. No API key. codex mcp list then shows Spiral.
codex mcp login spiral
Use the Spiral skill
- Send Codex 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 GenFill
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/genfill", "input": { "image_url": "https://storage.googleapis.com/falserverless/bria/bria_genfill_img.png", "mask_url": "https://storage.googleapis.com/falserverless/bria/bria_genfill_mask.png", "prompt": "A red delicious cherry" } }'
Then paste one of the prompts above: Codex finds Bria GenFill on Spiral, shows the price and runs it.
Bria GenFill providers and prices
Spiral runs Bria GenFill through fal. Open a card for today's price, with every fee included.
Settings you can ask for
Bria GenFill works from your image URL, mask URL, and prompt. Ask Codex for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Negative prompt | what to leave out, in words | The negative prompt you would like to use to generate images. | |
| Seed | 0 to 2147483647 | The same seed and the same prompt given to the same version of the model will output the same image every time. | |
| Number of images | 1 to 4 | 1 | Number of Images to generate. |
Every API field of Bria GenFill is on its tool page: open its card above.
What can you do with Bria GenFill in Codex?
Revise existing project images with targeted object additions or replacements. A coding agent can pair those edits with a page preview so you can judge the result in context.
Product photo prop changes
Select a prop beside a product and replace it with a different object. For example, try a ceramic dish in place of a wooden tray.
Seasonal campaign edits
Add a pumpkin, wrapped gift, or spring arrangement to a selected area of an existing campaign photo.
Interior styling previews
Replace a vase or table decoration in a room photo to compare styling ideas before arranging a shoot.
Food photo additions
Add a cherry or another garnish to a selected area of a food photo. Describe its size, surface contact, and shadow.
Localized campaign details
Try a different decorative object in an existing campaign image to explore a regional creative brief.
Website image revisions
Replace a distracting decorative object in an existing website photo with a simpler prop that suits the page.
Material concept previews
Regenerate a selected object as ceramic, wood, or brushed metal to compare material directions in the same scene.
More on Bria GenFill and Codex
Overview
Bria GenFill in other agents
Questions about Bria GenFill in Codex
Can Codex use Bria GenFill?
Yes. Add Spiral to Codex as an MCP server, and Codex can find and run Bria GenFill like any built-in tool.
How much does Bria GenFill cost in Codex?
$0.052 per generation. 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 Codex plan is separate.
Do I need a fal account to use Bria GenFill in Codex?
No. Spiral runs Bria GenFill 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 GenFill in Codex?
About two minutes: add the hosted server, then sign in.
Does Codex wait while Bria GenFill runs?
Bria GenFill runs in the background. Codex starts the run, checks on it and gives you the image when it's ready.
What is Bria GenFill useful for?
Use Bria GenFill to add or replace an object within a selected part of an existing image. Practical examples include replacing a table prop, changing a decorative object, or adding seasonal campaign details.
What kind of mask works best?
Bria recommends blob-shaped masks for GenFill. Start with a compact region around the intended object rather than asking one selection to cover several unrelated changes.
How should I write a Bria GenFill prompt?
Describe the object you want inside the selected area, including its material and size. Explain how it should sit on the surface and ask for a contact shadow that matches the scene.
Does Bria GenFill increase image resolution?
Bria documents GenFill as returning the edited image at its original resolution. Treat it as an editing tool rather than an upscaling step.
How can I repeat a result?
Keep the source image, mask, prompt, and seed unchanged, and use the same model version. The documented repeatability guarantee depends on keeping the seed, prompt, and model version the same.
Start using Bria GenFill in Codex
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into Codex:
set up https://spiral.ai/SKILL.md


