# Genfill v2 · Image to Image

Edit and enhance images with Genfill v2 · Image to Image from fal through one Spiral API key. It runs in the background and returns images. Pay as you go, with no subscription.

- Provider: fal
- Category: Image
- Runs: In the background
- Returns: image
- Tool id: `fal` / `bria/genfill/v2`
- Page: https://spiral.ai/tools/fal/bria/genfill/v2

## Pricing

$0.052 per 1,048,576 megapixels. Minimum 1,048,576 pixels.

## Limits

- Longest queue wait: 1 hour
- Run deadline: 30 minutes
- Longest run, end to end: 225 minutes
- Largest inline input: 1 MB
- Largest input file: 2 GB
- Largest output: 5 GB

## Input

| Field | Kind | Allowed | Default | Description |
| --- | --- | --- | --- | --- |
| `image_url` (required) | URL or file |  | — | The source image. |
| `mask_url` (required) | URL or file |  | — | The mask image. |
| `instruction` (required) | text |  | — | Instruct what elements you would like to fill in your image based on the mask. |
| `seed` | number (whole) |  | 5555 | Random seed for reproducibility. |
| `steps_num` | number (whole) | 20 to 50 | 30 | Number of inference steps. |

## Example

```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": "bria/genfill/v2",
    "input": {
      "image_url": "https://bria-datasets.s3.us-east-1.amazonaws.com/Fibo_edit/flower.png",
      "mask_url": "https://bria-datasets.s3.us-east-1.amazonaws.com/Fibo_edit/flower_input_mask.png",
      "instruction": "A beautiful colorful butterfly"
    }
  }'
```

Try it in the Playground: https://spiral.ai/start?provider=fal&model=bria%2Fgenfill%2Fv2

## Common questions

### Genfill v2 · Image to Image

**How much does Genfill v2 · Image to Image cost?**

$0.052 per 1,048,576 megapixels. Minimum 1,048,576 pixels. You pay as you go from one Spiral balance, with no subscription, and a failed run is not charged.

**How do I use Genfill v2 · Image to Image through an API?**

Send `POST /v1/runs` with `"provider": "fal"`, `"model": "bria/genfill/v2"` and the input fields on this page, using one Spiral API key. It runs in the background: poll the run, or name a webhook to be told when it finishes.

**Do I need an account with fal to use Genfill v2 · Image to Image?**

No. Spiral runs it on its own fal account and charges your Spiral balance.

**Can my AI agent use Genfill v2 · Image to Image?**

Yes. Agents find and run it through Spiral's MCP server, CLI or agent skill, with the same API key.

