# GPT Image 2 image edit

Needs prompt and image urls. Served by fal.ai.

GPT Image 2 (OpenAI), image edit, served by fal.ai. The OpenAPI schema for the openai/gpt-image-2/edit queue. Price: Billed on image tokens; fal's canonical table gives per image (low / medium / high): 1024x768 $0.005 / $0.037 / $0.145, 1024x1024 $0.006 / $0.053 / $0.211, 1024x1536 $0.005 / $0.042 / $0.165, 1920x1080 $0.005 / $0.040 / $0.158, 2560x1440 $0.007 / $0.056 / $0.222, 3840x2160 $0.012 / $0.101 / $0.401. Presets other than square_hd render at 0.66 to 0.79 megapixel (measured 2026-09-04: square 816x816, 4:3 1024x768, 16:9 1088x608) and are priced at the 1024x768 tier; explicit sizes are the canonical ones in either orientation. Text tokens $5 per 1M input: $0.002 allowance per call. 'auto' size and quality are not offered: not priceable in advance. Input image tokens $8 per 1M: $0.012 allowance per call. Waits up to 40 s for the result; if the generation takes longer, the run stays RUNNING and returns a request_id; poll fal/status and fetch fal/result with model "openai/gpt-image-2" and that request_id. Billed once, when the result is ready; a generation that fails is refunded.

- Tool ID: `fal/gpt-image-2-edit`
- Name in the catalog: GPT Image 2 (OpenAI), image edit
- Provider: [fal.ai](/providers/fal.md)
- Capability: [GPT Image](/tools/image-generation/gpt-image.md)
- Price: usage based, the maximum is shown before a run
- Authentication: an authorised Agentik workspace is required for execution, including zero-price tools.

## Pricing contract

The provider’s price, with no markup. Billed for measured usage.


```json
{
  "model": "per_unit",
  "amountUsd": 0.145,
  "unitsField": "num_images",
  "unitsDefault": 1,
  "maxUnits": 4,
  "multipliers": [
    {
      "all": [
        {
          "field": "quality",
          "equals": "low"
        },
        {
          "field": "image_size",
          "in": [
            "square",
            "portrait_4_3",
            "portrait_16_9",
            "landscape_4_3",
            "landscape_16_9",
            "1024x768",
            "768x1024"
          ]
        }
      ],
      "setUsd": 0.005
    },
    {
      "all": [
        {
          "field": "quality",
          "equals": "medium"
        },
        {
          "field": "image_size",
          "in": [
            "square",
            "portrait_4_3",
            "portrait_16_9",
            "landscape_4_3",
            "landscape_16_9",
            "1024x768",
            "768x1024"
          ]
        }
      ],
      "setUsd": 0.037
    },
    {
      "all": [
        {
          "field": "quality",
          "equals": "high"
        },
        {
          "field": "image_size",
          "in": [
            "square",
            "portrait_4_3",
            "portrait_16_9",
            "landscape_4_3",
            "landscape_16_9",
            "1024x768",
            "768x1024"
          ]
        }
      ],
      "setUsd": 0.145
    },
    {
      "all": [
        {
          "field": "quality",
          "equals": "low"
        },
        {
          "field": "image_size",
          "in": [
            "square_hd",
            "1024x1024"
          ]
        }
      ],
      "setUsd": 0.006
    },
    {
      "all": [
        {
          "field": "quality",
          "equals": "medium"
        },
        {
          "field": "image_size",
          "in": [
            "square_hd",
            "1024x1024"
          ]
        }
      ],
      "setUsd": 0.053
    },
    {
      "all": [
        {
          "field": "quality",
          "equals": "high"
        },
        {
          "field": "image_size",
          "in": [
            "square_hd",
            "1024x1024"
          ]
        }
      ],
      "setUsd": 0.211
    },
    {
      "all": [
        {
          "field": "quality",
          "equals": "low"
        },
        {
          "field": "image_size",
          "in": [
            "1024x1536",
            "1536x1024"
          ]
        }
      ],
      "setUsd": 0.005
    },
    {
      "all": [
        {
          "field": "quality",
          "equals": "medium"
        },
        {
          "field": "image_size",
          "in": [
            "1024x1536",
            "1536x1024"
          ]
        }
      ],
      "setUsd": 0.042
    },
    {
      "all": [
        {
          "field": "quality",
          "equals": "high"
        },
        {
          "field": "image_size",
          "in": [
            "1024x1536",
            "1536x1024"
          ]
        }
      ],
      "setUsd": 0.165
    },
    {
      "all": [
        {
          "field": "quality",
          "equals": "low"
        },
        {
          "field": "image_size",
          "in": [
            "1920x1080",
            "1080x1920"
          ]
        }
      ],
      "setUsd": 0.005
    },
    {
      "all": [
        {
          "field": "quality",
          "equals": "medium"
        },
        {
          "field": "image_size",
          "in": [
            "1920x1080",
            "1080x1920"
          ]
        }
      ],
      "setUsd": 0.04
    },
    {
      "all": [
        {
          "field": "quality",
          "equals": "high"
        },
        {
          "field": "image_size",
          "in": [
            "1920x1080",
            "1080x1920"
          ]
        }
      ],
      "setUsd": 0.158
    },
    {
      "all": [
        {
          "field": "quality",
          "equals": "low"
        },
        {
          "field": "image_size",
          "in": [
            "2560x1440",
            "1440x2560"
          ]
        }
      ],
      "setUsd": 0.007
    },
    {
      "all": [
        {
          "field": "quality",
          "equals": "medium"
        },
        {
          "field": "image_size",
          "in": [
            "2560x1440",
            "1440x2560"
          ]
        }
      ],
      "setUsd": 0.056
    },
    {
      "all": [
        {
          "field": "quality",
          "equals": "high"
        },
        {
          "field": "image_size",
          "in": [
            "2560x1440",
            "1440x2560"
          ]
        }
      ],
      "setUsd": 0.222
    },
    {
      "all": [
        {
          "field": "quality",
          "equals": "low"
        },
        {
          "field": "image_size",
          "in": [
            "3840x2160",
            "2160x3840"
          ]
        }
      ],
      "setUsd": 0.012
    },
    {
      "all": [
        {
          "field": "quality",
          "equals": "medium"
        },
        {
          "field": "image_size",
          "in": [
            "3840x2160",
            "2160x3840"
          ]
        }
      ],
      "setUsd": 0.101
    },
    {
      "all": [
        {
          "field": "quality",
          "equals": "high"
        },
        {
          "field": "image_size",
          "in": [
            "3840x2160",
            "2160x3840"
          ]
        }
      ],
      "setUsd": 0.401
    },
    {
      "when": {
        "field": "prompt",
        "minLength": 0
      },
      "addUsd": 0.014
    }
  ]
}
```

Pricing source: [https://fal.ai/models/openai/gpt-image-2/edit](https://fal.ai/models/openai/gpt-image-2/edit). Billed on image tokens; fal's canonical table gives per image (low / medium / high): 1024x768 $0.005 / $0.037 / $0.145, 1024x1024 $0.006 / $0.053 / $0.211, 1024x1536 $0.005 / $0.042 / $0.165, 1920x1080 $0.005 / $0.040 / $0.158, 2560x1440 $0.007 / $0.056 / $0.222, 3840x2160 $0.012 / $0.101 / $0.401. Presets other than square_hd render at 0.66 to 0.79 megapixel (measured 2026-09-04: square 816x816, 4:3 1024x768, 16:9 1088x608) and are priced at the 1024x768 tier; explicit sizes are the canonical ones in either orientation. Text tokens $5 per 1M input: $0.002 allowance per call. 'auto' size and quality are not offered: not priceable in advance. Input image tokens $8 per 1M: $0.012 allowance per call..

Price verification date: 2026-10-08.

## Complete input schema


```json
{
  "type": "object",
  "properties": {
    "background": {
      "type": "string",
      "title": "Background",
      "default": "auto",
      "enum": [
        "auto",
        "transparent",
        "opaque"
      ],
      "description": "Background for the generated image"
    },
    "quality": {
      "type": "string",
      "title": "Quality",
      "default": "high",
      "enum": [
        "low",
        "medium",
        "high"
      ],
      "description": "Quality for the generated image. Use 'auto' to let the model pick the best quality for the prompt."
    },
    "num_images": {
      "title": "Number of Images",
      "maximum": 4,
      "default": 1,
      "minimum": 1,
      "type": "integer",
      "description": "Number of images to generate"
    },
    "image_size": {
      "type": "string",
      "enum": [
        "square",
        "portrait_4_3",
        "portrait_16_9",
        "landscape_4_3",
        "landscape_16_9",
        "1024x768",
        "768x1024",
        "square_hd",
        "1024x1024",
        "1024x1536",
        "1536x1024",
        "1920x1080",
        "1080x1920",
        "2560x1440",
        "1440x2560",
        "3840x2160",
        "2160x3840"
      ],
      "title": "Image Size",
      "description": "The size of the generated image. Use 'auto' to infer from input images.",
      "default": "landscape_4_3"
    },
    "prompt": {
      "title": "Prompt",
      "type": "string",
      "maxLength": 32000,
      "minLength": 2,
      "description": "The prompt for image generation"
    },
    "output_format": {
      "type": "string",
      "title": "Output Format",
      "default": "png",
      "enum": [
        "jpeg",
        "png",
        "webp"
      ],
      "description": "Output format for the images"
    },
    "mask_url": {
      "type": "string",
      "title": "Mask URL",
      "description": "The URL of the mask image to use for the generation. This indicates what part of the image to edit."
    },
    "image_urls": {
      "title": "Image URLs",
      "items": {
        "type": "string"
      },
      "maxItems": 16,
      "type": "array",
      "description": "The URLs of the images to use as a reference for the generation. A maximum of 16 images are allowed."
    }
  },
  "required": [
    "prompt",
    "image_urls"
  ],
  "additionalProperties": false
}
```

## Published example

This is the provider tool’s published example. Replace example values with the user’s requested inputs, respecting the schema; do not execute an example merely to test a connection.


```json
{
  "tool_id": "fal/gpt-image-2-edit",
  "input": {
    "prompt": "make the cube blue, keep everything else",
    "image_urls": [
      "https://storage.googleapis.com/falserverless/example_outputs/nano-banana-2-t2i-output.png"
    ],
    "quality": "low",
    "image_size": "square",
    "num_images": 1
  }
}
```

## Execute and retrieve

Inspect again before execution, explain the price and obtain the required authority. Use MCP run_tool or POST /v1/run with this tool ID, valid input and an idempotency key. Save the returned run ID and follow the actual state. If Agentik answers that the tool is temporarily unavailable, do not retry it blindly; use discovery to propose an alternative.

This tool uses deferred settlement. Follow its returned task/run instructions; preserve the existing reservation until the result is reconciled.

A partial or uncertain result can still have consumed provider resources. Consult [billing](/docs/billing.md), [idempotency](/docs/idempotency.md) and [asynchronous results](/docs/async.md).

[Provider documentation](https://fal.ai/models/openai/gpt-image-2/edit)

[REST inspection](https://api.agentik.cc/v1/tools/fal/gpt-image-2-edit) · [OpenAPI](/openapi.json) · [Connection guide](/connect.md)

---

[HTML page](/providers/fal/gpt-image-2-edit) · [Agent index](/llms.txt)
