---
title: "Creates a variation of a given image. This endpoint only supports `dall-e-2`."
method: POST
path: "/images/variations"
tags: ["Images"]
---

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

`POST /images/variations`

## 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` '1024x1024' | '1024x1536' | '1536x1024' — The size of the image generated. Either `1024x1024`, `1024x1536`, or `1536x1024`.
  - `quality` 'low' | 'medium' | 'high' — The quality of the image generated. Either `low`, `medium`, or `high`.
  - `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.

## Changes

> 82 revisions in range; 28 could not be searched.

- **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/format changed from ``/`` 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-service-production.skmtc.workers.dev/v1/apis/openai/openapi/revisions/959ef977e135/schema)
