# OpenAI GPT Image 1.5 Edit API

> Gpt Image 1.5 Edit by OpenAI - AI-powered image editing, style transfer, and transformation. Edit photos with natural language instructions, remove backgrounds, change styles, and enhance images effortlessly.

Source: https://www.sandbase.ai/models/openai/gpt-image-1.5/edit
API reference: https://www.sandbase.ai/models/openai/gpt-image-1.5/edit/docs

## Facts

- Provider: OpenAI
- Type: Image model
- Model ID: `openai/gpt-image-1.5/edit`
- Price: From $0.13 per run
- Capabilities: image to image
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

- Unified Run API: `POST https://api.sandbase.ai/v1/run`

```bash
curl -X POST https://api.sandbase.ai/v1/run \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "openai/gpt-image-1.5/edit",
  "images": [
    "https://static.sandbase.ai/examples/openai/gpt-image-1.5/edit/input_images_0.png"
  ],
  "prompt": "Same workers, same beam, same lunch boxes - but they'"'"'re all on their phones now. One is taking a selfie. One is on a call looking annoyed. Same danger, new priorities. A hard hat has AirPods.",
  "quality": "high",
  "background": "auto",
  "output_format": "png",
  "input_fidelity": "high"
}'
```

The response returns a run id; poll `GET https://api.sandbase.ai/v1/run/{id}` until the status is `completed` or `failed`.

## FAQ

### How do I call OpenAI GPT Image 1.5 Edit through SandBase?

Create a SandBase API key, then send requests with the model ID "openai/gpt-image-1.5/edit" to Unified Run API (/v1/run) at https://api.sandbase.ai. The request examples on this page show the exact payload.

### Do I need a separate OpenAI account?

No. One SandBase API key and balance gives you access to OpenAI GPT Image 1.5 Edit and the other models in the catalog; you do not need to sign up with OpenAI separately.

## README

### GPT Image 1.5 Edit

GPT Image 1.5 edit: change images with an instruction, with an optional mask for local edits and `input_fidelity` to keep faces and logos close to the original.

#### Fields

| Field | Type | Default | Notes |
|---|---|---|---|
| `prompt` | string, required | — | Up to 32,000 characters. |
| `images` | image URL[] | — | Images to edit, Image 1, Image 2, … |
| `mask` | image URL | — | Optional PNG mask; transparent areas are edited. |
| `aspect_ratio` | `1:1` / `2:3` / `3:2` | — | 1:1, 3:2, or 2:3; non-square sizes cost more. |
| `output_format` | `jpeg` / `png` | `png` | Output file format. |
| `input_fidelity` | `low` / `high` | `high` | `high` preserves faces and logos more closely. |
| `quality` | `low` / `medium` / `high` | `high` | Higher quality costs more; `high` is the default. |
| `background` | `auto` / `transparent` / `opaque` | `auto` | `transparent` returns a PNG with alpha. |

#### Billing

Price depends on quality and shape, per output image:

| Quality | 1:1 | 3:2 or 2:3 |
|---|---|---|
| low | $0.009 | $0.013 |
| medium | $0.034 | $0.051 |
| high | $0.133 | $0.20 |

Failed runs are not charged.

#### Prompting

- Use a mask when only one region should change.

#### Limits

- Three shapes only: 1:1, 3:2, 2:3.

#### Also on SandBase

Related: `openai/gpt-image-1.5`, `openai/gpt-image-2/edit` (newer).
