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

Codex · Image

How to Use Object Removal Prompt in Codex

fal Object Removal cleans up existing photos by removing an object named in a text prompt. It fills the removed area with scene-appropriate content and targets the object's visual effects too.

Prompts to try with Object Removal Prompt in Codex

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

Use fal Object Removal on the homepage photo in this project's assets to remove the traffic cone. Save the result separately and prepare an original-and-edited comparison.

Object Removal PromptCodex
Try asking
  • Use fal Object Removal to remove the cup beside the product in the catalog image. Keep the original asset and show me the reconstructed tabletop.

  • Use fal Object Removal on the team portrait to remove the trash can. Prepare a close-up comparison around the removed object before changing the website image.

  • Use fal Object Removal to remove the backpack from the office photo in this project. Save a review copy and show the filled chair area.

  • Use fal Object Removal on the product photo to remove the bottle. If its outline remains, try a slightly larger mask expansion and compare the results.

How to set up Object Removal Prompt in Codex

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

Use Spiral's MCP server

  1. Add the hosted server
    codex mcp add spiral --url https://api.spiral.ai/mcp
  2. 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

  1. Send Codex 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 Object Removal Prompt

    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/object-removal",
        "input": {
          "image_url": "https://v3.fal.media/files/zebra/o0DORfJawy-T9P_-NsvLY.png",
          "prompt": "Dog"
        }
      }'

Then paste one of the prompts above: Codex finds Object Removal Prompt on Spiral, shows the price and runs it.

Object Removal Prompt providers and prices

Spiral runs Object Removal Prompt through fal. Open a card for today's price, with every fee included.

falImage
Object Removal · Prompt
fal-ai/object-removal

Settings you can ask for

Object Removal Prompt works from your image URL and prompt. Ask Codex for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Modellow_quality, medium_quality, high_quality, or best_qualitybest_quality
Mask expansion0 to 5015

Amount of pixels to expand the mask by. Range: 0-50

Every API field of Object Removal · Prompt is on its tool page: open its card above.

What can you do with Object Removal Prompt in Codex?

Prepare cleaner website and app images by removing named distractions with fal Object Removal. A coding agent can work through project assets and prepare original-and-edited comparisons for review.

Product photo cleanup

Remove a stray prop, such as a cup beside a product, then inspect the reconstructed tabletop.

Portrait cleanup

Remove a distracting object, such as a trash can behind the subject. Review the subject's outline afterward.

Interior photo cleanup

Remove a temporary object, such as a backpack on a chair, and review the exposed furniture.

Landscape cleanup

Remove litter from a scenic photo and inspect the filled ground or vegetation.

Food photo cleanup

Remove a distracting table accessory, such as a condiment bottle beside a plated meal.

Website image preparation

Remove a temporary traffic cone from an exterior photo before reviewing it for a website.

Questions about Object Removal Prompt in Codex

Can Codex use Object Removal Prompt?

Yes. Add Spiral to Codex as an MCP server, and Codex can find and run Object Removal Prompt like any built-in tool.

How much does Object Removal Prompt cost in Codex?

$0.0078 per image. 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 Object Removal Prompt in Codex?

No. Spiral runs Object Removal Prompt on its own fal account. You sign in to Spiral once and never paste a key.

How long does it take to set up Object Removal Prompt in Codex?

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

Does Codex wait while Object Removal Prompt runs?

Object Removal Prompt runs in the background. Codex starts the run, checks on it and gives you the image when it's ready.

What is fal Object Removal useful for?

Use it to remove unwanted objects from existing photos and fill the space they occupied. Suggested jobs include clearing a stray prop from a product shot or removing litter from a landscape.

What should I write in the removal prompt?

Name the unwanted object directly, such as 'traffic cone' or 'backpack.' As a practical starting point, keep the instruction focused on the removal target.

What replaces the removed object?

fal Object Removal fills the area with content suited to the surrounding scene. Review the reconstructed area before using the result.

How does fal Object Removal locate the object?

It uses Florence-2 for detection and SAM2 for segmentation. The text prompt identifies what to remove.

When should I adjust mask expansion?

Mask expansion increases the removal mask's coverage in pixels. As a practical troubleshooting step, try a small increase if an outline remains, and check nearby details after each attempt.

Get started

Start using Object Removal Prompt in Codex

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

Paste this into Codex:

Set up Codex

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