> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.empiriolabs.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.empiriolabs.ai/_mcp/server.

# GPT Image 2

> OpenAI's flagship image model with strong prompt fidelity, crisp text rendering, and instruction-based editing across up to 16 reference images.

![GPT Image 2](https://media.empiriolabs.ai/model-logos/gpt-image-2.png)

[OpenAI](/providers/openai) · Image Generation

`POST /v1/images/generations`

OpenAI's flagship image model with strong prompt fidelity, crisp text rendering, and instruction-based editing across up to 16 reference images.

## At a glance

| Field               | Value                                                        |
| ------------------- | ------------------------------------------------------------ |
| Model id            | `gpt-image-2`                                                |
| Model release date  | 2026-04-21                                                   |
| Input modalities    | Text, Image                                                  |
| Output modalities   | Image                                                        |
| Context window      | -                                                            |
| Weight precision    | -                                                            |
| Features            | image_generation, image_editing, text_rendering, multi_image |
| Native inference    | No                                                           |
| New                 | No                                                           |
| Supported endpoints | `POST /v1/images/generations`                                |
| Alternate model ids | `openai/gpt-image-2`                                         |

## Pricing

| Charge | Spec      | Rate    |
| ------ | --------- | ------- |
| Low    | per image | \$0.012 |
| Medium | per image | \$0.106 |
| High   | per image | \$0.422 |

## Example request

```bash
curl https://api.empiriolabs.ai/v1/images/generations \
  -H 'Authorization: Bearer $EMPIRIOLABS_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"model": "gpt-image-2", "prompt": "a misty forest at dawn", "size": "1024x1024"}'
```

## Parameters

| Parameter         | Type   | Required | Default       | Description                                                                                                          |
| ----------------- | ------ | -------- | ------------- | -------------------------------------------------------------------------------------------------------------------- |
| `prompt`          | string | yes      | -             | Text prompt. With input images attached, becomes an editing or compositing instruction.                              |
| `quality`         | enum   | no       | `"medium"`    | Rendering quality tier. Higher tiers produce more detail and cost more per image. · Allowed: `low`, `medium`, `high` |
| `size`            | enum   | no       | `"1024x1024"` | Output resolution: square, landscape, or portrait. · Allowed: `1024x1024`, `1536x1024`, `1024x1536`                  |
| `image`           | array  | no       | -             | Up to 16 input image URLs for editing or multi-reference composition.                                                |
| `num_images`      | number | no       | `1`           | Number of images to generate. Each is billed separately. · Range: 1 – 4                                              |
| `moderation`      | enum   | no       | `"auto"`      | Content filtering strictness applied by the model service. · Allowed: `auto`, `low`                                  |
| `response_format` | enum   | no       | `"url"`       | Return signed URLs or base64 image data. · Allowed: `url`, `b64_json`                                                |

## Notes

Quality tiers Low, Medium, and High set the rendering fidelity and the per-image price. Output sizes are 1024x1024, 1536x1024, and 1024x1536. Attach up to 16 images to edit or composite them, with the prompt as the instruction.

**Content safety**

* Generated images pass an automated content-safety check. An image flagged as explicit is not returned. Because the image is generated before the check runs, a flagged generation is still billed.

---

*Machine-readable schema:* `GET https://api.empiriolabs.ai/v1/models/gpt-image-2`.