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

Codex · Image

How to Use Ideogram 3.0 Replace Background in Codex

Ideogram 3.0 Replace Background puts an existing foreground subject into a new setting described in words. Use it for product scenes, portrait backdrops, and campaign images when the subject should stay and the surroundings should change.

Prompts to try with Ideogram 3.0 Replace Background in Codex

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

Use Ideogram 3.0 Replace Background on public/images/coffee-maker.jpg. Request a pale gray kitchen counter, a plain tiled wall, and soft daylight from the left while keeping the coffee maker. Save the result beside the source for review.

Ideogram 3.0 Replace BackgroundCodex
Try asking
  • Use Ideogram 3.0 Replace Background on the portrait in public/team/maya.jpg. Replace the surroundings with a softly blurred office and neutral daylight. Show the source and result side by side on a local review page.

  • Use Ideogram 3.0 Replace Background on assets/chair.jpg. Create three separate background treatments: a plain studio wall, a reading nook, and a covered patio. Keep each description short and save the results for the furniture page.

  • Use Ideogram 3.0 Replace Background on public/products/bottle.jpg. Request a matte stone surface against a charcoal wall with soft side lighting. Disable prompt expansion so we can evaluate this exact description.

  • Use Ideogram 3.0 Replace Background on assets/headphones.jpg. Compare a plain gray studio setting with a tidy wooden desk setting, keeping the seed and other settings fixed. Add both candidates to a local image review page.

How to set up Ideogram 3.0 Replace Background 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 Ideogram 3.0 Replace Background

    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/ideogram/v3/replace-background",
        "input": {
          "prompt": "A beautiful sunset over mountains that writes Ideogram v3 in fal.ai",
          "image_url": "https://v3.fal.media/files/rabbit/F6dvKPFL9VzKiM8asJOgm_MJj6yUB6rGjTsv_1YHIcA_image.webp"
        }
      }'

Then paste one of the prompts above: Codex finds Ideogram 3.0 Replace Background on Spiral, shows the price and runs it.

Ideogram 3.0 Replace Background providers and prices

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

falImage
Ideogram Replace Background
fal-ai/ideogram/v3/replace-background

Settings you can ask for

Ideogram 3.0 Replace Background works from your image URLs, prompt, and image URL. Ask Codex for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Rendering speedTURBO, BALANCED, or QUALITYBALANCED

The rendering speed to use.

StyleAUTO, GENERAL, REALISTIC, or DESIGN

The style type to generate with. Cannot be used with style_codes.

Expand prompton or offon

Determine if MagicPrompt should be used in generating the request or not.

Number of images1 to 81

Number of images to generate.

Seeda whole number

Seed for the random number generator

Style preset80S_ILLUSTRATION, 90S_NOSTALGIA, ABSTRACT_ORGANIC, ANALOG_NOSTALGIA, ART_BRUT, ART_DECO, ART_POSTER, AURA and 54 more

Style preset for generation. The chosen style preset will guide the generation.

Every API field of Ideogram Replace Background is on its tool page: open its card above.

What can you do with Ideogram 3.0 Replace Background in Codex?

Create new settings for existing product and portrait assets while working on a website or app. A coding agent can use Ideogram 3.0 Replace Background to prepare image candidates and place selected results in the project's layouts.

Product listing scenes

Place an existing product photo against a simple studio background for a listing image. Review the result against the source before using it.

Seasonal campaign images

Use an approved product photo to explore spring gardens, autumn interiors, or winter window scenes around the same foreground subject.

Portrait backdrops

Replace a distracting setting behind an existing portrait with a plain studio wall or a softly blurred office.

Product lifestyle concepts

Try a kitchen setting behind a coffee maker or a reading nook behind a chair. Start with a source photo whose subject placement suits the proposed scene.

Advertising background tests

Compare restrained indoor and outdoor settings around one approved foreground image. Keep the description focused on the background being tested.

Website photography drafts

Explore alternative surroundings for existing product or team photography before placing the selected images in a page design.

Resale photo cleanup

Replace clutter behind a photographed item with a plain wall and simple floor. Compare the item with the original photo before publishing the result.

Questions about Ideogram 3.0 Replace Background in Codex

Can Codex use Ideogram 3.0 Replace Background?

Yes. Add Spiral to Codex as an MCP server, and Codex can find and run Ideogram 3.0 Replace Background like any built-in tool.

How much does Ideogram 3.0 Replace Background cost in Codex?

$0.039 per image. 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 Ideogram 3.0 Replace Background in Codex?

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

How long does it take to set up Ideogram 3.0 Replace Background in Codex?

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

Does Codex wait while Ideogram 3.0 Replace Background runs?

Ideogram 3.0 Replace Background runs in the background. Codex starts the run, checks on it and gives you the image when it's ready.

What does Ideogram 3.0 Replace Background preserve?

It identifies and keeps the foreground subject while generating new surroundings from your description. It fits tasks where the product or person should remain and the setting should change.

Do I need to draw a mask?

No. Ideogram 3.0 Replace Background detects the foreground subject automatically, so you do not need to paint the background selection.

Does background replacement create a transparent cutout?

Background replacement generates new surroundings from a prompt. Use background removal when the goal is an isolated subject on transparency.

How long should my background prompt be?

Keep it below about 150 words, roughly 200 tokens. Describe the intended setting clearly; Ideogram warns that 3.0 may weaken or ignore words beyond that length.

Why did extra scenery appear?

Vague or crowded descriptions leave details for Ideogram to invent, and Magic Prompt can add more. Simplify the scene and turn prompt expansion off when you want to test your exact wording.

Get started

Start using Ideogram 3.0 Replace Background 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