---
title: "Create image edit"
method: POST
path: "/images/edits"
tags: ["Images"]
---

# Create image edit

`POST /images/edits`

Creates an edited or extended image given one or more source images and a prompt. This endpoint supports GPT Image models and `dall-e-2`.

## Request body

- EditImageBodyJsonParam — unresolved $ref

## Response `200`

OK

- ImagesResponse — The response from the image generation endpoint.
  - `created` integer, required — The Unix timestamp (in seconds) of when the image was created.
  - `data` Image[] — The list of generated images.
    - `b64_json` string — The base64-encoded JSON of the generated image. Returned by default for the GPT image models, and only present if `response_format` is set to `b64_json` for `dall-e-2` and `dall-e-3`.
    - `url` string, uri — When using `dall-e-2` or `dall-e-3`, the URL of the generated image if `response_format` is set to `url` (default value). Unsupported for the GPT image models.
    - `revised_prompt` string — For `dall-e-3` only, the revised prompt that was used to generate the image.
  - `background` 'transparent' | 'opaque' — The background parameter used for the image generation. Either `transparent` or `opaque`.
  - `output_format` 'png' | 'webp' | 'jpeg' — The output format of the image generation. Either `png`, `webp`, or `jpeg`.
  - `size` union — The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
    - string
    - '1024x1024' | '1024x1536' | '1536x1024'
  - `quality` 'low' | 'medium' | 'high' | 'xhigh' | 'max' — The quality of the image generated. One of `low`, `medium`, `high`, `xhigh`, or `max`.
  - `usage` ImageGenUsage — For `gpt-image-1` only, the token usage information for the image generation.
    - `input_tokens` integer, required — The number of tokens (images and text) in the input prompt.
    - `total_tokens` integer, required — The total number of tokens (images and text) used for the image generation.
    - `output_tokens` integer, required — The number of output tokens generated by the model.
    - `output_tokens_details` ImageGenOutputTokensDetails — The output token details for the image generation.
      - `image_tokens` integer, required — The number of image output tokens generated by the model.
      - `text_tokens` integer, required — The number of text output tokens generated by the model.
    - `input_tokens_details` ImageGenInputUsageDetails, required — The input tokens detailed information for the image generation.
      - `text_tokens` integer, required — The number of text tokens in the input prompt.
      - `image_tokens` integer, required — The number of image tokens in the input prompt.

## Other responses

- `400` — Invalid image request, including invalid DALL-E parameters or input.
- `403` — The project does not have access to the requested model.
- `410` — The requested DALL-E image endpoint is unavailable because it has been retired.
- `429` — The request was rejected because a rate limit was exceeded. A slow_down error means traffic increased too quickly; reduce your request rate, then increase it gradually.
- `500` — The image could not be generated or processed.
- `503` — The service is temporarily unavailable. A server_is_overloaded error means the requested model is temporarily overloaded; retry after a brief delay.

## Changes

- **2026-09-25** `d86203de41ae` — 4 info
  - added the non-success response with the status `400`
  - added the non-success response with the status `403`
  - added the non-success response with the status `410`
  - added the non-success response with the status `500`
- **2026-09-08** `185927e212ab` — 1 breaking, 6 warning, 27 info
  - the `size` response's property type changed from `string` to no type for status `200` (media type: application/json)
  - added the new `max` enum value to the `anyOf[#/components/schemas/ImageEditCompletedEvent]/quality` response property for the response status `200` (media type: text/event-stream)
  - added the new `max` enum value to the `anyOf[#/components/schemas/ImageEditPartialImageEvent]/quality` response property for the response status `200` (media type: text/event-stream)
  - added the new `max` enum value to the `quality` response property for the response status `200` (media type: application/json)
  - …30 more
- **2026-09-03** `9430b00d75b4` — 2 info
  - added the optional property `error/misalignment` to the response with the `429` status
  - added the optional property `error/misalignment` to the response with the `503` status
- **2026-09-03** `5f6acbcbb919` — 2 info
  - added the non-success response with the status `429`
  - added the non-success response with the status `503`
- …earlier changes not shown

[Full history](https://skmtc.dev/openai/apis/openapi/changes/images/edits/post.md)

---

[API](https://skmtc.dev/openai/apis/openapi.md) · [All operations](https://skmtc.dev/openai/apis/openapi/llms.txt) · [OpenAPI document](https://skmtc.dev/openai/apis/openapi/revisions/222f167a2327?raw)
