---
title: "Create image variation"
method: POST
path: "/images/variations"
tags: ["Images"]
---

# Create image variation

`POST /images/variations`

Creates a variation of a given image. This endpoint only supports `dall-e-2`.

## 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 or request, or the request cannot be processed for this account.
- `403` — The project does not have access to the requested model.
- `410` — The image variations endpoint is no longer available.
- `429` — The image rate limit was exceeded.
- `500` — The image variation could not be generated or processed.

## Changes

- **2026-09-25** `d86203de41ae` — 5 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 `429`
  - …1 more
- **2026-09-08** `185927e212ab` — 1 breaking, 2 warning, 4 info
  - the `size` response's property type changed from `string` to no type for status `200`
  - added the new `max` enum value to the `quality` response property for the response status `200`
  - added the new `xhigh` enum value to the `quality` response property for the response status `200`
  - added `subschema #1, subschema #2` to the `size` response property `anyOf` list for the response status `200`
  - …3 more
- **2026-05-13** `74cbcf73838f` — 5 info
  - added the optional property `background` to the response with the `200` status
  - added the optional property `output_format` to the response with the `200` status
  - added the optional property `quality` to the response with the `200` status
  - added the optional property `size` to the response with the `200` status
  - …1 more
- **2025-04-29** `6a6c681b1820` — 2 breaking, 1 info
  - the response's body type changed from no type to `object` for status `200`
  - the response property `data` became optional for the status `200`
  - added the optional property `usage` to the response with the `200` status

[Change history](https://skmtc.dev/openai/apis/openapi/changes/images/variations/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/4b75527da17b?raw)
