Overview
This endpoint is retained for legacy OpenAI-compatible variation clients. It is not the recommended path for current image-to-image workflows; use/v1/images/edits with gpt-image-2 or /v1/images/generations with an image-to-image model such as nano-banana-pro when possible. Requires multipart/form-data content type.
Request Body
Synchronous request timeout: Some routed image providers return the final image inline and wait for generation to finish. High-resolution or high-quality requests can take close to a minute or longer, so set your HTTP client timeout to at least120s. If the create response includes status: "pending", task_id, or poll_url, follow the returned poll_url instead.
The image to use as the basis for the variation. Must be a valid PNG file, less than 50MB, and square.
Required model identifier for legacy variation-compatible routes. There is no implicit default; for current image-to-image workflows, prefer
/v1/images/edits or /v1/images/generations with a current model.The number of images to generate. Must be between 1 and 10.
The size of the generated images for legacy variation-compatible routes. Supported values depend on the selected model.
The format in which the generated images are returned. Must be
url or b64_json.A unique identifier representing your end-user for abuse monitoring.
Response
Unix timestamp of when the images were created.
Array of generated image variations.Each object contains:
url(string): URL of the variation image (if response_format isurl)b64_json(string): Base64-encoded image (if response_format isb64_json)
Notes
This is a legacy compatibility endpoint. It is not included in the current recommended image model catalog. For new integrations, use
/v1/images/edits with gpt-image-2, or /v1/images/generations with operation: "image-to-image" and a current image-to-image model.