[Integrations](https://spiral.ai/integrations) › [Codex](https://spiral.ai/integrations/codex) › [Image Editing Reframe](https://spiral.ai/integrations/codex/image-editing-reframe)

# How to Use Image Editing Reframe in Codex

Image Editing Reframe adapts an existing image to a different aspect ratio while aiming to maintain the main subject. Use it to rework a photo for a banner, square tile, or portrait layout.

|  |  |
| --- | --- |
| Model | Image Editing Reframe |
| Available through | fal |
| Category | Image |
| Price | $0.052 per image. |
| Returns | image |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Image Editing Reframe in Codex

- Use Image Editing Reframe to make a 16:9 version of the homepage hero photo in this project. Save it as a separate asset and show me the result beside the original.
- Find the product photo used by the collection card and use Image Editing Reframe to make a square version. Preview it in the existing card component.
- Use Image Editing Reframe on the article cover image to create a 3:4 composition. Add it to the mobile article preview so I can assess the subject placement.
- Use Image Editing Reframe to prepare a 21:9 composition of the campaign image in the assets directory. Show a preview in the campaign banner.
- Use Image Editing Reframe to create a 9:16 composition from the project's promotional photo. Report the returned pixel dimensions and show me the result.

## How to set up Image Editing Reframe in Codex

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

### Use Spiral's MCP server

1. **Add the hosted server**

```bash
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.

```bash
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.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run Image Editing Reframe**: One request; the result comes back by polling or a webhook.

```bash
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/image-editing/reframe",
    "input": {
      "image_url": "https://v3.fal.media/files/elephant/7ekErKT--mhgKJ5kgtvU__image.webp"
    }
  }'
```

Then paste one of the prompts above: Codex finds Image Editing Reframe on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/codex

## Image Editing Reframe tools and prices

- [Image Editing Reframe](https://spiral.ai/tools/fal/fal-ai/image-editing/reframe) (fal): $0.052 per image.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| guidance_scale | 0 to 20 | 3.5 | The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. |
| num_inference_steps | 1 to 50 | 30 | Number of inference steps for sampling. |
| safety_tolerance | 1, 2, 3, 4, 5, 6 | 2 | The safety tolerance level for the generated image. 1 being the most strict and 6 being the most permissive. |
| output_format | jpeg, png | jpeg | The format of the generated image. |
| aspect_ratio | 21:9, 16:9, 4:3, 3:2, 1:1, 2:3, 3:4, 9:16, 9:21 | 16:9 | The desired aspect ratio for the reframed image. |
| seed |  | — | The same seed and the same prompt given to the same version of the model will output the same image every time. |

## What can you do with Image Editing Reframe in Codex?

Adapt existing project images to the layouts your site needs. Ask the agent to identify the intended placement, reframe the source, and check the result in context.

### Website hero images

Adapt an existing campaign photo to a wide banner, then review how the main subject fits the page.

### Portrait social images

Reframe a landscape campaign image for a portrait social layout while aiming to retain the main subject.

### Square product tiles

Prepare square compositions from existing product photos for a catalog or collection page.

### Editorial image placements

Adapt an existing article photo to the wide and portrait placements in an editorial layout.

### Presentation visuals

Rework an existing photo into a widescreen composition for a presentation slide.

### Poster compositions

Turn an existing promotional image into a tall composition for a poster draft.

## Overview

- [fal](https://spiral.ai/providers/fal)
- [All Codex guides](https://spiral.ai/integrations/codex)

## Image Editing Reframe in other agents

- [Amp](https://spiral.ai/integrations/amp/image-editing-reframe)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/image-editing-reframe)
- [Claude](https://spiral.ai/integrations/claude-desktop/image-editing-reframe)
- [Claude Code](https://spiral.ai/integrations/claude-code/image-editing-reframe)
- [Cline](https://spiral.ai/integrations/cline/image-editing-reframe)
- [Cursor](https://spiral.ai/integrations/cursor/image-editing-reframe)
- [Devin](https://spiral.ai/integrations/devin/image-editing-reframe)
- [dots](https://spiral.ai/integrations/dots/image-editing-reframe)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/image-editing-reframe)
- [Gemini](https://spiral.ai/integrations/gemini/image-editing-reframe)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/image-editing-reframe)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/image-editing-reframe)
- [goose](https://spiral.ai/integrations/goose/image-editing-reframe)
- [Grok](https://spiral.ai/integrations/grok/image-editing-reframe)
- [Grok Build](https://spiral.ai/integrations/grok-build/image-editing-reframe)
- [Hermes](https://spiral.ai/integrations/hermes/image-editing-reframe)
- [Instinct](https://spiral.ai/integrations/instinct/image-editing-reframe)
- [Manus](https://spiral.ai/integrations/manus/image-editing-reframe)
- [Muse](https://spiral.ai/integrations/muse/image-editing-reframe)
- [Muse Code](https://spiral.ai/integrations/muse-code/image-editing-reframe)
- [n8n](https://spiral.ai/integrations/n8n/image-editing-reframe)
- [Notion](https://spiral.ai/integrations/notion/image-editing-reframe)
- [OpenClaw](https://spiral.ai/integrations/openclaw/image-editing-reframe)
- [opencode](https://spiral.ai/integrations/opencode/image-editing-reframe)
- [Perplexity](https://spiral.ai/integrations/perplexity/image-editing-reframe)
- [Raycast](https://spiral.ai/integrations/raycast/image-editing-reframe)
- [VS Code](https://spiral.ai/integrations/vscode/image-editing-reframe)
- [Windsurf](https://spiral.ai/integrations/windsurf/image-editing-reframe)
- [Zapier](https://spiral.ai/integrations/zapier/image-editing-reframe)

## More Codex guides

- [Image Editing Realism](https://spiral.ai/integrations/codex/image-editing-realism)
- [Image Editing Time of Day](https://spiral.ai/integrations/codex/image-editing-time-of-day)
- [Image Background Remover](https://spiral.ai/integrations/codex/image-background-remover)
- [Image to SVG](https://spiral.ai/integrations/codex/image-to-svg)
- [Image Apps v2 Virtual Try-on](https://spiral.ai/integrations/codex/image-apps-v2-virtual-try-on)
- [Juggernaut Flux Base](https://spiral.ai/integrations/codex/juggernaut-flux-base)

## Questions about Image Editing Reframe in Codex

**Can Codex use Image Editing Reframe?**

Yes. Add Spiral to Codex as an MCP server, and Codex can find and run Image Editing Reframe like any built-in tool.

**How much does Image Editing Reframe cost in Codex?**

$0.052 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 Image Editing Reframe in Codex?**

No. Spiral runs Image Editing Reframe on its own fal account. You sign in to Spiral once and never paste a key.

**How long does it take to set up Image Editing Reframe in Codex?**

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

**Does Codex wait while Image Editing Reframe runs?**

Image Editing Reframe runs in the background. Codex starts the run, checks on it and gives you the image when it's ready.

**What is Image Editing Reframe useful for?**

Use it to adapt an existing image to a different layout, such as turning a portrait photo into a wide banner or a landscape image into a square tile.

**What does Image Editing Reframe try to preserve?**

fal describes preservation of the main subject's position, composition, pose, and perspective. Compare the result with the original to decide whether it meets your needs.

**How should I phrase a request for Image Editing Reframe?**

Tell your agent which image to use and where the result will appear. Reframe's published schema has no text prompt input, so make the requested layout clear, such as a wide presentation image or a portrait poster.

**Can I specify an exact output size in pixels?**

The documentation describes aspect ratios but does not publish an exact pixel-size control or a fixed output resolution. Check the returned image's dimensions before using it in a layout with strict size requirements.

**When should I choose Image Editing Reframe?**

Choose it when you already have the subject and scene you want, but need a different image shape. Its documented task is changing aspect ratio while maintaining the subject.

