---
title: "Creates an edited or extended image given an original image and a prompt."
method: POST
path: "/images/edits"
tags: ["Images"]
---

# Creates an edited or extended image given an original image and a prompt.

`POST /images/edits`

## Response `200`

OK

- ImagesResponse
  - `created` integer, required
  - `data` Image[], required
    - `b64_json` string — The base64-encoded JSON of the generated image, if `response_format` is `b64_json`.
    - `url` string — The URL of the generated image, if `response_format` is `url` (default).
    - `revised_prompt` string — The prompt that was used to generate the image, if there was any revision to the prompt.

## Changes

- **2024-08-23** `5856f8b0c850` — 12 breaking, 12 warning, 7 info
  - removed the media type `application/json` from the request body
  - removed `subschema #1, subschema #2` from the `size` request property `anyOf` list
  - request property `size` was restricted to a list of enum values
  - removed the enum value `chatgpt-image-latest` of the request property `model/anyOf[subschema #2]/`
  - …27 more

[Change 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-service-production.skmtc.workers.dev/v1/apis/openai/openapi/revisions/96060afbb5b9/schema)
