# OpenAI GPT Image 1 Mini Edit API

> Gpt Image 1 Mini Edit is OpenAI's intelligent image editing model. Transform, retouch, and reimagine existing images using text prompts - from background replacement to artistic style conversion.

Source: https://www.sandbase.ai/model/openai/gpt-image-1-mini/edit
API reference: https://www.sandbase.ai/model/openai/gpt-image-1-mini/edit/docs

## Facts

- Provider: OpenAI
- Type: Image model
- Model ID: `openai/gpt-image-1-mini/edit`
- Price: From $0.04 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-mini/edit",
  "images": [
    "https://static.sandbase.ai/examples/openai/gpt-image-1-mini/edit/input_images_0.png",
    "https://static.sandbase.ai/examples/openai/gpt-image-1-mini/edit/input_images_1.png",
    "https://static.sandbase.ai/examples/openai/gpt-image-1-mini/edit/input_images_2.png",
    "https://static.sandbase.ai/examples/openai/gpt-image-1-mini/edit/input_images_3.png"
  ],
  "prompt": "Dress the model in the clothes and hat. Add a cat to the scene and change the background to a Victorian era building.",
  "quality": "auto",
  "background": "auto",
  "aspect_ratio": "1:1",
  "output_format": "png"
}'
```

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 Mini Edit through SandBase?

Create a SandBase API key, then send requests with the model ID "openai/gpt-image-1-mini/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 Mini Edit and the other models in the catalog; you do not need to sign up with OpenAI separately.

## README

### GPT Image 1 Mini Edit

GPT Image 1 Mini edit: the low-cost GPT Image tier for quick edits and background swaps.

#### Fields

| Field | Type | Default | Notes |
|---|---|---|---|
| `prompt` | string, required | — | Text instruction. |
| `images` | image URL[] | — | Images to edit, Image 1, Image 2, … |
| `output_format` | `jpeg` / `png` | `png` | Output file format. |
| `background` | `auto` / `transparent` / `opaque` | `auto` | `transparent` returns a PNG with alpha. |
| `quality` | `auto` / `low` / `medium` / `high` | `auto` | `auto` lets the model pick; billed as high. |
| `aspect_ratio` | `1:1` / `3:2` / `2:3` | `1:1` | 1:1, 3:2, or 2:3; non-square sizes cost more. |

#### Billing

Price depends on quality and shape, plus $0.002 per started 1,000 prompt characters:

| Quality, short prompt | 1:1 | 3:2 or 2:3 |
|---|---|---|
| low | $0.007 | $0.008 |
| medium | $0.013 | $0.017 |
| high | $0.038 | $0.054 |

Failed runs are not charged.

#### Prompting

- State the change and what must stay the same.

#### Limits

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

#### Also on SandBase

Related: `openai/gpt-image-2/edit` (higher quality).
