From 33f9e9c24fe631eaf7f3b4436c3b8eab0e7ac5c4 Mon Sep 17 00:00:00 2001 From: jbeckwith-oai <269036200+jbeckwith-oai@users.noreply.github.com> Date: Mon, 21 Sep 2026 22:33:03 -0700 Subject: [PATCH] chore(api): clarify image fidelity and legacy image guidance Castiron-Internal-PR: https://github.com/openai/openai-ruby-internal/pull/130 Castiron-Source-SHA: 7fe3843811062511aa3008dc6006d45ca360f083 Castiron-Public-Base-SHA: 475318f0815207cbe1beee8f4d6839dd92870dba --- .castiron.stats.yml | 14 +- api_reference/openapi.transformed.yml | 121 +++------- lib/openai/models/beta/beta_tool.rb | 42 ++-- lib/openai/models/image.rb | 30 +-- .../models/image_create_variation_params.rb | 61 ++--- lib/openai/models/image_edit_params.rb | 124 +++++----- lib/openai/models/image_generate_params.rb | 138 +++++------ lib/openai/models/responses/tool.rb | 42 ++-- lib/openai/resources/images.rb | 216 ++++++++++-------- rbi/openai/models/beta/beta_tool.rbi | 42 ++-- rbi/openai/models/image.rbi | 30 +-- .../models/image_create_variation_params.rbi | 59 ++--- rbi/openai/models/image_edit_params.rbi | 122 +++++----- rbi/openai/models/image_generate_params.rbi | 136 +++++------ rbi/openai/models/responses/tool.rbi | 42 ++-- rbi/openai/resources/images.rbi | 216 ++++++++++-------- sig/openai/models/beta/beta_tool.rbs | 32 +-- sig/openai/models/image.rbs | 45 ++-- .../models/image_create_variation_params.rbs | 44 ++-- sig/openai/models/image_edit_params.rbs | 84 +++---- sig/openai/models/image_generate_params.rbs | 96 ++++---- sig/openai/models/responses/tool.rbs | 32 +-- 22 files changed, 901 insertions(+), 867 deletions(-) diff --git a/.castiron.stats.yml b/.castiron.stats.yml index cbef26ad1..e224d931d 100644 --- a/.castiron.stats.yml +++ b/.castiron.stats.yml @@ -1,8 +1,8 @@ schema_version: 1 -generation_id: 2a4b489d-3431-49f6-b318-70589d7cee19 -openapi_spec_hash: 294e7f8dff5c3715548c61975578ba6f -openapi_transformed_spec_hash: 6ce29339615c1a0e463408781b8205a4 -config_hash: 18f602826c88bad76c6fdf08ab67247a -codegen_sha: ec4aba1ca9478ac09e231140c1492fda832dc073 -codegen_hash: d753f1786a9e0a78044f3a7977dad3b950cd7dfd17b575b54556e7267025031e -public_codegen_sha: 4da9bda69aa4b5348d44d76dbf6f1fbc96304dcb +generation_id: d883c636-9480-4315-adea-ab1984c5d4ab +openapi_spec_hash: 095134d95b4b60377eeb716602348023 +openapi_transformed_spec_hash: 1521a437a14e0158810af55c5651aecc +config_hash: 2f5cd30d104ab1d8c77a7832bfd55eb2 +codegen_sha: 2dc2f6b5b044dfcffd34a877b33343edf335f640 +codegen_hash: 535a8311e078833f2623fc0bfece943e43fe3dc0f62083caf77e77a35f0e82d2 +public_codegen_sha: 0d4078106d393d736277e8543253f74246d03183 diff --git a/api_reference/openapi.transformed.yml b/api_reference/openapi.transformed.yml index d856b3b6a..6988ca292 100644 --- a/api_reference/openapi.transformed.yml +++ b/api_reference/openapi.transformed.yml @@ -8669,7 +8669,7 @@ paths: tags: - Images summary: Create image edit - description: 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`. + description: Creates an edited or extended image given one or more source images and a prompt. This endpoint supports GPT Image models. DALL·E 2 was retired from the API on May 12, 2026; see [deprecations](https://developers.openai.com/api/docs/deprecations). requestBody: required: true content: @@ -9035,7 +9035,7 @@ paths: tags: - Images summary: Create image variation - description: Creates a variation of a given image. This endpoint only supports `dall-e-2`. + description: Legacy endpoint for creating variations with DALL·E 2, which was retired from the API on May 12, 2026. See [deprecations](https://developers.openai.com/api/docs/deprecations). For new integrations, use image edits with a supported GPT Image model; see the [image generation guide](https://developers.openai.com/api/docs/guides/image-generation). requestBody: required: true content: @@ -9095,62 +9095,6 @@ paths: $ref: '#/components/schemas/ErrorResponse' x-oaiMeta: group: images - examples: - request: - curl: | - curl https://api.openai.com/v1/images/variations \ - -H "Authorization: Bearer $OPENAI_API_KEY" \ - -F image="@otter.png" \ - -F n=2 \ - -F size="1024x1024" - python: | - from openai import OpenAI - client = OpenAI() - - response = client.images.create_variation( - image=open("image_edit_original.png", "rb"), - n=2, - size="1024x1024" - ) - javascript: |- - import fs from "fs"; - import OpenAI from "openai"; - - const openai = new OpenAI(); - - async function main() { - const image = await openai.images.createVariation({ - image: fs.createReadStream("otter.png"), - }); - - console.log(image.data); - } - main(); - csharp: | - using System; - - using OpenAI.Images; - - ImageClient client = new( - model: "dall-e-2", - apiKey: Environment.GetEnvironmentVariable("OPENAI_API_KEY") - ); - - GeneratedImage image = client.GenerateImageVariation(imageFilePath: "otter.png"); - - Console.WriteLine(image.ImageUri); - response: | - { - "created": 1589478378, - "data": [ - { - "url": "https://..." - }, - { - "url": "https://..." - } - ] - } /live/sessions: post: operationId: create-live @@ -41743,13 +41687,10 @@ components: `gpt-image-2.5-flare-2026-09-08`, and `chatgpt-image-latest`), each image should be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16 images. - - For `dall-e-2`, you can only provide one image, and it should be a square - `png` file less than 4MB. x-oaiMeta: exampleFilePath: otter.png prompt: - description: A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2`, and 32000 characters for the GPT image models. + description: A text description of the desired image(s). The maximum length is 32000 characters for the GPT image models. type: string example: A cute baby sea otter wearing a beret mask: @@ -41796,7 +41737,7 @@ components: - dall-e-2 x-stainless-const: true x-oaiTypeLabel: string - description: The model to use for image generation. One of `dall-e-2` or a GPT image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`). Defaults to `gpt-image-1.5`. + description: The GPT Image model to use for image editing (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`). Defaults to `gpt-image-1.5`. DALL·E 2 was retired from the API on May 12, 2026; see [deprecations](https://developers.openai.com/api/docs/deprecations). nullable: true example: gpt-image-2 n: @@ -41818,7 +41759,7 @@ components: - 1536x1024 - 1024x1536 - auto - description: The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`. + description: The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. Legacy sizes for the retired `dall-e-2` model were `256x256`, `512x512`, and `1024x1024`. nullable: true response_format: type: string @@ -41827,7 +41768,7 @@ components: - b64_json example: url nullable: true - description: The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter is only supported for `dall-e-2` (default is `url` for `dall-e-2`), as GPT image models always return base64-encoded images. + description: Legacy response-format parameter (`url` or `b64_json`) for the retired `dall-e-2` model. GPT Image models always return base64-encoded images. output_format: type: string enum: @@ -41859,7 +41800,7 @@ components: anyOf: - $ref: '#/components/schemas/InputFidelity' - type: 'null' - description: Controls fidelity to the original input image(s). This parameter is supported for GPT image models that support input fidelity. `gpt-image-2` and `gpt-image-2-2026-04-21` ignore this parameter. + description: Control how much effort the model will exert to match the style and features, especially facial features, of input images. Models that accept both `high` and `low` include `gpt-image-1`, `gpt-image-1.5`, and `chatgpt-image-latest`. `gpt-image-1-mini` accepts only `low`. Defaults to `low` on models that support this parameter. Omit this parameter for `gpt-image-2`, `gpt-image-2-2026-04-21`, and other models that do not support it. See the [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) for model-specific guidance. stream: type: boolean default: false @@ -41892,7 +41833,7 @@ components: type: object properties: prompt: - description: A text description of the desired image(s). The maximum length is 32000 characters for the GPT image models, 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`. + description: A text description of the desired image(s). The maximum length is 32000 characters for the GPT image models. Legacy limits for the retired models were 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`. type: string example: A cute baby sea otter model: @@ -41914,7 +41855,7 @@ components: - dall-e-3 x-stainless-nominal: false x-oaiTypeLabel: string - description: The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`). Defaults to `dall-e-2` unless a parameter specific to the GPT image models is used. + description: The GPT Image model to use for image generation. Specify a supported model explicitly, such as `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, or `gpt-image-2.5-flare-2026-09-08`. DALL·E 2 (`dall-e-2`) and DALL·E 3 (`dall-e-3`) were retired from the API on May 12, 2026; see [deprecations](https://developers.openai.com/api/docs/deprecations). nullable: true example: gpt-image-2 n: @@ -41924,7 +41865,7 @@ components: default: 1 example: 1 nullable: true - description: The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported. + description: The number of images to generate. Must be between 1 and 10. The retired `dall-e-3` model only supported `n=1`. quality: type: string enum: @@ -41947,8 +41888,8 @@ components: - `high`, `medium` and `low` are supported for the GPT image models. - `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` snapshots, also support `xhigh` and `max`. - - `hd` and `standard` are supported for `dall-e-3`. - - `standard` is the only option for `dall-e-2`. + - The retired `dall-e-3` model supported the legacy values `hd` and `standard`. + - The retired `dall-e-2` model only supported the legacy value `standard`. response_format: type: string enum: @@ -41957,7 +41898,7 @@ components: default: url example: url nullable: true - description: The format in which generated images with `dall-e-2` and `dall-e-3` are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter isn't supported for the GPT image models, which always return base64-encoded images. + description: 'Legacy response format: `url` or `b64_json`, for the retired `dall-e-2` and `dall-e-3` models. Returned URLs were valid for 60 minutes after image generation. This parameter is not supported for the GPT image models, which always return base64-encoded images.' output_format: type: string enum: @@ -41998,7 +41939,7 @@ components: - 512x512 - 1792x1024 - 1024x1792 - description: The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`. + description: The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. Legacy sizes for the retired `dall-e-2` model were `256x256`, `512x512`, and `1024x1024`. Legacy sizes for the retired `dall-e-3` model were `1024x1024`, `1792x1024`, and `1024x1792`. nullable: true moderation: type: string @@ -42037,7 +41978,7 @@ components: default: vivid example: vivid nullable: true - description: The style of the generated images. This parameter is only supported for `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. + description: Legacy style options `vivid` and `natural` for the retired `dall-e-3` model. Vivid produced hyper-real and dramatic images; natural produced more natural, less hyper-real looking images. This parameter is not supported for the GPT image models. user: type: string example: user-1234 @@ -42049,7 +41990,7 @@ components: type: object properties: image: - description: The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square. + description: The input image for the legacy variations endpoint. The legacy format requires a valid PNG file, less than 4MB, and square. type: string format: binary x-oaiMeta: @@ -42062,7 +42003,7 @@ components: - dall-e-2 x-stainless-const: true x-oaiTypeLabel: string - description: The model to use for image generation. Only `dall-e-2` is supported at this time. + description: Legacy model selection for the variations endpoint, which was designed for `dall-e-2`. DALL·E 2 was retired from the API on May 12, 2026; see [deprecations](https://developers.openai.com/api/docs/deprecations). Use image edits with a supported GPT Image model for new integrations. nullable: true n: type: integer @@ -42071,7 +42012,7 @@ components: default: 1 example: 1 nullable: true - description: The number of images to generate. Must be between 1 and 10. + description: The number of images requested from the legacy variations endpoint. Must be between 1 and 10. response_format: type: string enum: @@ -42080,7 +42021,7 @@ components: default: url example: url nullable: true - description: The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. + description: 'The response format for the legacy variations endpoint: `url` or `b64_json`. Returned URLs were valid for 60 minutes after image generation.' size: type: string enum: @@ -42090,7 +42031,7 @@ components: default: 1024x1024 example: 1024x1024 nullable: true - description: The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`. + description: The requested image size for the legacy variations endpoint. Must be one of `256x256`, `512x512`, or `1024x1024`. user: type: string example: user-1234 @@ -44108,7 +44049,7 @@ components: Use `images` (array of `ImageRefParam`) instead of multipart `image` uploads. You can reference images via external URLs, data URLs, or uploaded file IDs. - JSON edits support GPT image models only; DALL-E edits require multipart (`dall-e-2` only). + JSON edits support GPT image models only. properties: model: anyOf: @@ -44180,7 +44121,7 @@ components: - high - low - type: 'null' - description: Controls fidelity to the original input image(s). This parameter is supported for GPT image models that support input fidelity. `gpt-image-2` and `gpt-image-2-2026-04-21` ignore this parameter. + description: Control how much effort the model will exert to match the style and features, especially facial features, of input images. Models that accept both `high` and `low` include `gpt-image-1`, `gpt-image-1.5`, and `chatgpt-image-latest`. `gpt-image-1-mini` accepts only `low`. Defaults to `low` on models that support this parameter. Omit this parameter for `gpt-image-2`, `gpt-image-2-2026-04-21`, and other models that do not support it. See the [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) for model-specific guidance. size: anyOf: - type: string @@ -47485,14 +47426,14 @@ components: properties: b64_json: type: string - description: 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`. + description: The base64-encoded image data. Returned by default for the GPT image models. For the retired `dall-e-2` and `dall-e-3` models, this field was present only when `response_format` was set to `b64_json`. url: type: string format: uri - description: 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. + description: 'Legacy field for the retired `dall-e-2` and `dall-e-3` models: the URL of the generated image when `response_format` was set to `url`, the legacy default. Unsupported for the GPT image models.' revised_prompt: type: string - description: For `dall-e-3` only, the revised prompt that was used to generate the image. + description: 'Legacy field for the retired `dall-e-3` model: the revised prompt that was used to generate the image.' ImageEditCompletedEvent: type: object description: | @@ -47917,7 +47858,7 @@ components: - 1024x1536 - 1536x1024 - auto - description: The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`. + description: The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. default: auto output_format: type: string @@ -47966,7 +47907,7 @@ components: anyOf: - $ref: '#/components/schemas/InputFidelity' - type: 'null' - description: Controls fidelity to the original input image(s). This parameter is supported for GPT image models that support input fidelity. `gpt-image-2` and `gpt-image-2-2026-04-21` ignore this parameter. + description: Control how much effort the model will exert to match the style and features, especially facial features, of input images. Supported models accept `high` and `low`, except `gpt-image-1-mini`, which accepts only `low`. Defaults to `low` on models that support this parameter. Omit this parameter for `gpt-image-2`, `gpt-image-2-2026-04-21`, and other models that do not support it. See the [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) for model-specific guidance. input_image_mask: type: object description: | @@ -72828,7 +72769,7 @@ components: enum: - high - low - description: Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. + description: Control how much effort the model will exert to match the style and features, especially facial features, of input images. Supported models accept `high` and `low`, except `gpt-image-1-mini`, which accepts only `low`. Defaults to `low` on models that support this parameter. Omit this parameter for models that do not support it. LocalShellToolParam: properties: type: @@ -89654,7 +89595,7 @@ components: - 1024x1536 - 1536x1024 - auto - description: The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`. + description: The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. default: auto output_format: type: string @@ -89703,7 +89644,7 @@ components: anyOf: - $ref: '#/components/schemas/BetaInputFidelity' - type: 'null' - description: Controls fidelity to the original input image(s). This parameter is supported for GPT image models that support input fidelity. `gpt-image-2` and `gpt-image-2-2026-04-21` ignore this parameter. + description: Control how much effort the model will exert to match the style and features, especially facial features, of input images. Supported models accept `high` and `low`, except `gpt-image-1-mini`, which accepts only `low`. Defaults to `low` on models that support this parameter. Omit this parameter for `gpt-image-2`, `gpt-image-2-2026-04-21`, and other models that do not support it. See the [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) for model-specific guidance. input_image_mask: type: object description: | @@ -89744,7 +89685,7 @@ components: enum: - high - low - description: Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. + description: Control how much effort the model will exert to match the style and features, especially facial features, of input images. Supported models accept `high` and `low`, except `gpt-image-1-mini`, which accepts only `low`. Defaults to `low` on models that support this parameter. Omit this parameter for models that do not support it. BetaProgrammaticToolCallingParam: properties: type: diff --git a/lib/openai/models/beta/beta_tool.rb b/lib/openai/models/beta/beta_tool.rb index 4a17bd550..545d03524 100644 --- a/lib/openai/models/beta/beta_tool.rb +++ b/lib/openai/models/beta/beta_tool.rb @@ -632,9 +632,13 @@ class ImageGeneration < OpenAI::Internal::Type::BaseModel optional :background, enum: -> { OpenAI::Beta::BetaTool::ImageGeneration::Background } # @!attribute input_fidelity - # Controls fidelity to the original input image(s). This parameter is supported - # for GPT image models that support input fidelity. `gpt-image-2` and - # `gpt-image-2-2026-04-21` ignore this parameter. + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. Supported models accept `high` and + # `low`, except `gpt-image-1-mini`, which accepts only `low`. Defaults to `low` on + # models that support this parameter. Omit this parameter for `gpt-image-2`, + # `gpt-image-2-2026-04-21`, and other models that do not support it. See the + # [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) + # for model-specific guidance. # # @return [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::InputFidelity, nil] optional( @@ -707,9 +711,7 @@ class ImageGeneration < OpenAI::Internal::Type::BaseModel # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. # # @return [String, Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::Size, nil] optional :size, union: -> { OpenAI::Beta::BetaTool::ImageGeneration::Size } @@ -732,9 +734,13 @@ class ImageGeneration < OpenAI::Internal::Type::BaseModel # set the output format to `png` or `webp`. # # @param input_fidelity [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::InputFidelity, nil] - # Controls fidelity to the original input image(s). This parameter is supported - # for GPT image models that support input fidelity. `gpt-image-2` and - # `gpt-image-2-2026-04-21` ignore this parameter. + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. Supported models accept `high` and + # `low`, except `gpt-image-1-mini`, which accepts only `low`. Defaults to `low` on + # models that support this parameter. Omit this parameter for `gpt-image-2`, + # `gpt-image-2-2026-04-21`, and other models that do not support it. See the + # [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) + # for model-specific guidance. # # @param input_image_mask [OpenAI::Models::Beta::BetaTool::ImageGeneration::InputImageMask] # Optional mask for inpainting. Contains `image_url` (string, optional) and @@ -777,9 +783,7 @@ class ImageGeneration < OpenAI::Internal::Type::BaseModel # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. # # @param type [Symbol, :image_generation] # The type of the image generation tool. Always `image_generation`. @@ -820,9 +824,13 @@ module Background # @return [Array] end - # Controls fidelity to the original input image(s). This parameter is supported - # for GPT image models that support input fidelity. `gpt-image-2` and - # `gpt-image-2-2026-04-21` ignore this parameter. + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. Supported models accept `high` and + # `low`, except `gpt-image-1-mini`, which accepts only `low`. Defaults to `low` on + # models that support this parameter. Omit this parameter for `gpt-image-2`, + # `gpt-image-2-2026-04-21`, and other models that do not support it. See the + # [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) + # for model-specific guidance. # # @see OpenAI::Models::Beta::BetaTool::ImageGeneration#input_fidelity module InputFidelity @@ -976,9 +984,7 @@ module Quality # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. # # @see OpenAI::Models::Beta::BetaTool::ImageGeneration#size module Size diff --git a/lib/openai/models/image.rb b/lib/openai/models/image.rb index f80a009f6..e20e643b3 100644 --- a/lib/openai/models/image.rb +++ b/lib/openai/models/image.rb @@ -4,23 +4,24 @@ module OpenAI module Models class Image < OpenAI::Internal::Type::BaseModel # @!attribute b64_json - # 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`. + # The base64-encoded image data. Returned by default for the GPT image models. For + # the retired `dall-e-2` and `dall-e-3` models, this field was present only when + # `response_format` was set to `b64_json`. # # @return [String, nil] optional :b64_json, String # @!attribute revised_prompt - # For `dall-e-3` only, the revised prompt that was used to generate the image. + # Legacy field for the retired `dall-e-3` model: the revised prompt that was used + # to generate the image. # # @return [String, nil] optional :revised_prompt, String # @!attribute url - # 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. + # Legacy field for the retired `dall-e-2` and `dall-e-3` models: the URL of the + # generated image when `response_format` was set to `url`, the legacy default. + # Unsupported for the GPT image models. # # @return [String, nil] optional :url, String @@ -29,17 +30,18 @@ class Image < OpenAI::Internal::Type::BaseModel # Represents the content or the URL of an image generated by the OpenAI API. # # @param 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`. + # The base64-encoded image data. Returned by default for the GPT image models. For + # the retired `dall-e-2` and `dall-e-3` models, this field was present only when + # `response_format` was set to `b64_json`. # # @param revised_prompt [String] - # For `dall-e-3` only, the revised prompt that was used to generate the image. + # Legacy field for the retired `dall-e-3` model: the revised prompt that was used + # to generate the image. # # @param url [String] - # 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. + # Legacy field for the retired `dall-e-2` and `dall-e-3` models: the URL of the + # generated image when `response_format` was set to `url`, the legacy default. + # Unsupported for the GPT image models. end end end diff --git a/lib/openai/models/image_create_variation_params.rb b/lib/openai/models/image_create_variation_params.rb index 2adb10cbc..f01ca850a 100644 --- a/lib/openai/models/image_create_variation_params.rb +++ b/lib/openai/models/image_create_variation_params.rb @@ -8,8 +8,8 @@ class ImageCreateVariationParams < OpenAI::Internal::Type::BaseModel include OpenAI::Internal::Type::RequestParameters # @!attribute image - # The image to use as the basis for the variation(s). Must be a valid PNG file, - # less than 4MB, and square. + # The input image for the legacy variations endpoint. The legacy format requires a + # valid PNG file, less than 4MB, and square. # # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload # metadata. Use `OpenAI::FilePart` when you need to override the filename or @@ -19,29 +19,31 @@ class ImageCreateVariationParams < OpenAI::Internal::Type::BaseModel required :image, OpenAI::Internal::Type::FileInput # @!attribute model - # The model to use for image generation. Only `dall-e-2` is supported at this - # time. + # Legacy model selection for the variations endpoint, which was designed for + # `dall-e-2`. DALL·E 2 was retired from the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). Use image + # edits with a supported GPT Image model for new integrations. # # @return [String, Symbol, OpenAI::Models::ImageModel, nil] optional :model, union: -> { OpenAI::ImageCreateVariationParams::Model }, nil?: true # @!attribute n - # The number of images to generate. Must be between 1 and 10. + # The number of images requested from the legacy variations endpoint. Must be + # between 1 and 10. # # @return [Integer, nil] optional :n, Integer, nil?: true # @!attribute response_format - # The format in which the generated images are returned. Must be one of `url` or - # `b64_json`. URLs are only valid for 60 minutes after the image has been - # generated. + # The response format for the legacy variations endpoint: `url` or `b64_json`. + # Returned URLs were valid for 60 minutes after image generation. # # @return [Symbol, OpenAI::Models::ImageCreateVariationParams::ResponseFormat, nil] optional :response_format, enum: -> { OpenAI::ImageCreateVariationParams::ResponseFormat }, nil?: true # @!attribute size - # The size of the generated images. Must be one of `256x256`, `512x512`, or - # `1024x1024`. + # The requested image size for the legacy variations endpoint. Must be one of + # `256x256`, `512x512`, or `1024x1024`. # # @return [Symbol, OpenAI::Models::ImageCreateVariationParams::Size, nil] optional :size, enum: -> { OpenAI::ImageCreateVariationParams::Size }, nil?: true @@ -56,28 +58,30 @@ class ImageCreateVariationParams < OpenAI::Internal::Type::BaseModel # @!method initialize(image:, model: nil, n: nil, response_format: nil, size: nil, user: nil, request_options: {}) # @param image [Pathname, StringIO, IO, String, OpenAI::FilePart] - # The image to use as the basis for the variation(s). Must be a valid PNG file, - # less than 4MB, and square. + # The input image for the legacy variations endpoint. The legacy format requires a + # valid PNG file, less than 4MB, and square. # # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload # metadata. Use `OpenAI::FilePart` when you need to override the filename or # content type. # # @param model [String, Symbol, OpenAI::Models::ImageModel, nil] - # The model to use for image generation. Only `dall-e-2` is supported at this - # time. + # Legacy model selection for the variations endpoint, which was designed for + # `dall-e-2`. DALL·E 2 was retired from the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). Use image + # edits with a supported GPT Image model for new integrations. # # @param n [Integer, nil] - # The number of images to generate. Must be between 1 and 10. + # The number of images requested from the legacy variations endpoint. Must be + # between 1 and 10. # # @param response_format [Symbol, OpenAI::Models::ImageCreateVariationParams::ResponseFormat, nil] - # The format in which the generated images are returned. Must be one of `url` or - # `b64_json`. URLs are only valid for 60 minutes after the image has been - # generated. + # The response format for the legacy variations endpoint: `url` or `b64_json`. + # Returned URLs were valid for 60 minutes after image generation. # # @param size [Symbol, OpenAI::Models::ImageCreateVariationParams::Size, nil] - # The size of the generated images. Must be one of `256x256`, `512x512`, or - # `1024x1024`. + # The requested image size for the legacy variations endpoint. Must be one of + # `256x256`, `512x512`, or `1024x1024`. # # @param user [String] # A unique identifier representing your end-user, which can help OpenAI to monitor @@ -86,23 +90,24 @@ class ImageCreateVariationParams < OpenAI::Internal::Type::BaseModel # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] - # The model to use for image generation. Only `dall-e-2` is supported at this - # time. + # Legacy model selection for the variations endpoint, which was designed for + # `dall-e-2`. DALL·E 2 was retired from the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). Use image + # edits with a supported GPT Image model for new integrations. module Model extend OpenAI::Internal::Type::Union variant String - # The model to use for image generation. Only `dall-e-2` is supported at this time. + # Legacy model selection for the variations endpoint, which was designed for `dall-e-2`. DALL·E 2 was retired from the API on May 12, 2026; see [deprecations](https://developers.openai.com/api/docs/deprecations). Use image edits with a supported GPT Image model for new integrations. variant enum: -> { OpenAI::ImageModel } # @!method self.variants # @return [Array(String, Symbol, OpenAI::Models::ImageModel)] end - # The format in which the generated images are returned. Must be one of `url` or - # `b64_json`. URLs are only valid for 60 minutes after the image has been - # generated. + # The response format for the legacy variations endpoint: `url` or `b64_json`. + # Returned URLs were valid for 60 minutes after image generation. module ResponseFormat extend OpenAI::Internal::Type::Enum @@ -113,8 +118,8 @@ module ResponseFormat # @return [Array] end - # The size of the generated images. Must be one of `256x256`, `512x512`, or - # `1024x1024`. + # The requested image size for the legacy variations endpoint. Must be one of + # `256x256`, `512x512`, or `1024x1024`. module Size extend OpenAI::Internal::Type::Enum diff --git a/lib/openai/models/image_edit_params.rb b/lib/openai/models/image_edit_params.rb index 6f35062fc..a5ce7e8fd 100644 --- a/lib/openai/models/image_edit_params.rb +++ b/lib/openai/models/image_edit_params.rb @@ -19,9 +19,6 @@ class ImageEditParams < OpenAI::Internal::Type::BaseModel # be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16 # images. # - # For `dall-e-2`, you can only provide one image, and it should be a square `png` - # file less than 4MB. - # # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload # metadata. Use `OpenAI::FilePart` when you need to override the filename or # content type. @@ -30,8 +27,8 @@ class ImageEditParams < OpenAI::Internal::Type::BaseModel required :image, union: -> { OpenAI::ImageEditParams::Image } # @!attribute prompt - # A text description of the desired image(s). The maximum length is 1000 - # characters for `dall-e-2`, and 32000 characters for the GPT image models. + # A text description of the desired image(s). The maximum length is 32000 + # characters for the GPT image models. # # @return [String] required :prompt, String @@ -51,9 +48,14 @@ class ImageEditParams < OpenAI::Internal::Type::BaseModel optional :background, enum: -> { OpenAI::ImageEditParams::Background }, nil?: true # @!attribute input_fidelity - # Controls fidelity to the original input image(s). This parameter is supported - # for GPT image models that support input fidelity. `gpt-image-2` and - # `gpt-image-2-2026-04-21` ignore this parameter. + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. Models that accept both `high` and + # `low` include `gpt-image-1`, `gpt-image-1.5`, and `chatgpt-image-latest`. + # `gpt-image-1-mini` accepts only `low`. Defaults to `low` on models that support + # this parameter. Omit this parameter for `gpt-image-2`, `gpt-image-2-2026-04-21`, + # and other models that do not support it. See the + # [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) + # for model-specific guidance. # # @return [Symbol, OpenAI::Models::ImageEditParams::InputFidelity, nil] optional :input_fidelity, enum: -> { OpenAI::ImageEditParams::InputFidelity }, nil?: true @@ -72,12 +74,13 @@ class ImageEditParams < OpenAI::Internal::Type::BaseModel optional :mask, OpenAI::Internal::Type::FileInput # @!attribute model - # The model to use for image generation. One of `dall-e-2` or a GPT image model - # (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, - # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, - # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, - # `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`). Defaults to - # `gpt-image-1.5`. + # The GPT Image model to use for image editing (`gpt-image-1`, `gpt-image-1-mini`, + # `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, + # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, + # `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or + # `chatgpt-image-latest`). Defaults to `gpt-image-1.5`. DALL·E 2 was retired from + # the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). # # @return [String, Symbol, OpenAI::Models::ImageModel, nil] optional :model, union: -> { OpenAI::ImageEditParams::Model }, nil?: true @@ -125,10 +128,8 @@ class ImageEditParams < OpenAI::Internal::Type::BaseModel optional :quality, enum: -> { OpenAI::ImageEditParams::Quality }, nil?: true # @!attribute response_format - # The format in which the generated images are returned. Must be one of `url` or - # `b64_json`. URLs are only valid for 60 minutes after the image has been - # generated. This parameter is only supported for `dall-e-2` (default is `url` for - # `dall-e-2`), as GPT image models always return base64-encoded images. + # Legacy response-format parameter (`url` or `b64_json`) for the retired + # `dall-e-2` model. GPT Image models always return base64-encoded images. # # @return [Symbol, OpenAI::Models::ImageEditParams::ResponseFormat, nil] optional :response_format, enum: -> { OpenAI::ImageEditParams::ResponseFormat }, nil?: true @@ -143,9 +144,8 @@ class ImageEditParams < OpenAI::Internal::Type::BaseModel # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. Legacy sizes for the + # retired `dall-e-2` model were `256x256`, `512x512`, and `1024x1024`. # # @return [String, Symbol, OpenAI::Models::ImageEditParams::Size, nil] optional :size, union: -> { OpenAI::ImageEditParams::Size }, nil?: true @@ -169,16 +169,13 @@ class ImageEditParams < OpenAI::Internal::Type::BaseModel # be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16 # images. # - # For `dall-e-2`, you can only provide one image, and it should be a square `png` - # file less than 4MB. - # # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload # metadata. Use `OpenAI::FilePart` when you need to override the filename or # content type. # # @param prompt [String] - # A text description of the desired image(s). The maximum length is 1000 - # characters for `dall-e-2`, and 32000 characters for the GPT image models. + # A text description of the desired image(s). The maximum length is 32000 + # characters for the GPT image models. # # @param background [Symbol, OpenAI::Models::ImageEditParams::Background, nil] # Allows to set transparency for the background of the generated image(s). Must be @@ -192,9 +189,14 @@ class ImageEditParams < OpenAI::Internal::Type::BaseModel # set the output format to `png` or `webp`. # # @param input_fidelity [Symbol, OpenAI::Models::ImageEditParams::InputFidelity, nil] - # Controls fidelity to the original input image(s). This parameter is supported - # for GPT image models that support input fidelity. `gpt-image-2` and - # `gpt-image-2-2026-04-21` ignore this parameter. + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. Models that accept both `high` and + # `low` include `gpt-image-1`, `gpt-image-1.5`, and `chatgpt-image-latest`. + # `gpt-image-1-mini` accepts only `low`. Defaults to `low` on models that support + # this parameter. Omit this parameter for `gpt-image-2`, `gpt-image-2-2026-04-21`, + # and other models that do not support it. See the + # [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) + # for model-specific guidance. # # @param mask [Pathname, StringIO, IO, String, OpenAI::FilePart] # An additional image whose fully transparent areas (e.g. where alpha is zero) @@ -207,12 +209,13 @@ class ImageEditParams < OpenAI::Internal::Type::BaseModel # content type. # # @param model [String, Symbol, OpenAI::Models::ImageModel, nil] - # The model to use for image generation. One of `dall-e-2` or a GPT image model - # (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, - # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, - # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, - # `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`). Defaults to - # `gpt-image-1.5`. + # The GPT Image model to use for image editing (`gpt-image-1`, `gpt-image-1-mini`, + # `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, + # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, + # `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or + # `chatgpt-image-latest`). Defaults to `gpt-image-1.5`. DALL·E 2 was retired from + # the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). # # @param n [Integer, nil] # The number of images to generate. Must be between 1 and 10. @@ -242,10 +245,8 @@ class ImageEditParams < OpenAI::Internal::Type::BaseModel # `xhigh` and `max`. Defaults to `auto`. # # @param response_format [Symbol, OpenAI::Models::ImageEditParams::ResponseFormat, nil] - # The format in which the generated images are returned. Must be one of `url` or - # `b64_json`. URLs are only valid for 60 minutes after the image has been - # generated. This parameter is only supported for `dall-e-2` (default is `url` for - # `dall-e-2`), as GPT image models always return base64-encoded images. + # Legacy response-format parameter (`url` or `b64_json`) for the retired + # `dall-e-2` model. GPT Image models always return base64-encoded images. # # @param size [String, Symbol, OpenAI::Models::ImageEditParams::Size, nil] # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, @@ -257,9 +258,8 @@ class ImageEditParams < OpenAI::Internal::Type::BaseModel # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. Legacy sizes for the + # retired `dall-e-2` model were `256x256`, `512x512`, and `1024x1024`. # # @param user [String] # A unique identifier representing your end-user, which can help OpenAI to monitor @@ -276,9 +276,6 @@ class ImageEditParams < OpenAI::Internal::Type::BaseModel # `gpt-image-2.5-flare-2026-09-08`, and `chatgpt-image-latest`), each image should # be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16 # images. - # - # For `dall-e-2`, you can only provide one image, and it should be a square `png` - # file less than 4MB. module Image extend OpenAI::Internal::Type::Union @@ -313,9 +310,14 @@ module Background # @return [Array] end - # Controls fidelity to the original input image(s). This parameter is supported - # for GPT image models that support input fidelity. `gpt-image-2` and - # `gpt-image-2-2026-04-21` ignore this parameter. + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. Models that accept both `high` and + # `low` include `gpt-image-1`, `gpt-image-1.5`, and `chatgpt-image-latest`. + # `gpt-image-1-mini` accepts only `low`. Defaults to `low` on models that support + # this parameter. Omit this parameter for `gpt-image-2`, `gpt-image-2-2026-04-21`, + # and other models that do not support it. See the + # [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) + # for model-specific guidance. module InputFidelity extend OpenAI::Internal::Type::Enum @@ -326,18 +328,19 @@ module InputFidelity # @return [Array] end - # The model to use for image generation. One of `dall-e-2` or a GPT image model - # (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, - # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, - # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, - # `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`). Defaults to - # `gpt-image-1.5`. + # The GPT Image model to use for image editing (`gpt-image-1`, `gpt-image-1-mini`, + # `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, + # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, + # `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or + # `chatgpt-image-latest`). Defaults to `gpt-image-1.5`. DALL·E 2 was retired from + # the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). module Model extend OpenAI::Internal::Type::Union variant String - # The model to use for image generation. One of `dall-e-2` or a GPT image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`). Defaults to `gpt-image-1.5`. + # The GPT Image model to use for image editing (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`). Defaults to `gpt-image-1.5`. DALL·E 2 was retired from the API on May 12, 2026; see [deprecations](https://developers.openai.com/api/docs/deprecations). variant enum: -> { OpenAI::ImageModel } # @!method self.variants @@ -377,10 +380,8 @@ module Quality # @return [Array] end - # The format in which the generated images are returned. Must be one of `url` or - # `b64_json`. URLs are only valid for 60 minutes after the image has been - # generated. This parameter is only supported for `dall-e-2` (default is `url` for - # `dall-e-2`), as GPT image models always return base64-encoded images. + # Legacy response-format parameter (`url` or `b64_json`) for the retired + # `dall-e-2` model. GPT Image models always return base64-encoded images. module ResponseFormat extend OpenAI::Internal::Type::Enum @@ -400,9 +401,8 @@ module ResponseFormat # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. Legacy sizes for the + # retired `dall-e-2` model were `256x256`, `512x512`, and `1024x1024`. module Size extend OpenAI::Internal::Type::Union diff --git a/lib/openai/models/image_generate_params.rb b/lib/openai/models/image_generate_params.rb index e347b752a..799cea0d5 100644 --- a/lib/openai/models/image_generate_params.rb +++ b/lib/openai/models/image_generate_params.rb @@ -11,8 +11,8 @@ class ImageGenerateParams < OpenAI::Internal::Type::BaseModel # @!attribute prompt # A text description of the desired image(s). The maximum length is 32000 - # characters for the GPT image models, 1000 characters for `dall-e-2` and 4000 - # characters for `dall-e-3`. + # characters for the GPT image models. Legacy limits for the retired models were + # 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`. # # @return [String] required :prompt, String @@ -32,12 +32,13 @@ class ImageGenerateParams < OpenAI::Internal::Type::BaseModel optional :background, enum: -> { OpenAI::ImageGenerateParams::Background }, nil?: true # @!attribute model - # The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT - # image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, - # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, - # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, - # `gpt-image-2.5-flare-2026-09-08`). Defaults to `dall-e-2` unless a parameter - # specific to the GPT image models is used. + # The GPT Image model to use for image generation. Specify a supported model + # explicitly, such as `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, + # `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, + # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, or + # `gpt-image-2.5-flare-2026-09-08`. DALL·E 2 (`dall-e-2`) and DALL·E 3 + # (`dall-e-3`) were retired from the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). # # @return [String, Symbol, OpenAI::Models::ImageModel, nil] optional :model, union: -> { OpenAI::ImageGenerateParams::Model }, nil?: true @@ -51,8 +52,8 @@ class ImageGenerateParams < OpenAI::Internal::Type::BaseModel optional :moderation, enum: -> { OpenAI::ImageGenerateParams::Moderation }, nil?: true # @!attribute n - # The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only - # `n=1` is supported. + # The number of images to generate. Must be between 1 and 10. The retired + # `dall-e-3` model only supported `n=1`. # # @return [Integer, nil] optional :n, Integer, nil?: true @@ -91,17 +92,17 @@ class ImageGenerateParams < OpenAI::Internal::Type::BaseModel # - `high`, `medium` and `low` are supported for the GPT image models. # - `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their # `2026-09-08` snapshots, also support `xhigh` and `max`. - # - `hd` and `standard` are supported for `dall-e-3`. - # - `standard` is the only option for `dall-e-2`. + # - The retired `dall-e-3` model supported the legacy values `hd` and `standard`. + # - The retired `dall-e-2` model only supported the legacy value `standard`. # # @return [Symbol, OpenAI::Models::ImageGenerateParams::Quality, nil] optional :quality, enum: -> { OpenAI::ImageGenerateParams::Quality }, nil?: true # @!attribute response_format - # The format in which generated images with `dall-e-2` and `dall-e-3` are - # returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes - # after the image has been generated. This parameter isn't supported for the GPT - # image models, which always return base64-encoded images. + # Legacy response format: `url` or `b64_json`, for the retired `dall-e-2` and + # `dall-e-3` models. Returned URLs were valid for 60 minutes after image + # generation. This parameter is not supported for the GPT image models, which + # always return base64-encoded images. # # @return [Symbol, OpenAI::Models::ImageGenerateParams::ResponseFormat, nil] optional :response_format, enum: -> { OpenAI::ImageGenerateParams::ResponseFormat }, nil?: true @@ -116,18 +117,19 @@ class ImageGenerateParams < OpenAI::Internal::Type::BaseModel # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. Legacy sizes for the + # retired `dall-e-2` model were `256x256`, `512x512`, and `1024x1024`. Legacy + # sizes for the retired `dall-e-3` model were `1024x1024`, `1792x1024`, and + # `1024x1792`. # # @return [String, Symbol, OpenAI::Models::ImageGenerateParams::Size, nil] optional :size, union: -> { OpenAI::ImageGenerateParams::Size }, nil?: true # @!attribute style - # The style of the generated images. This parameter is only supported for - # `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean - # towards generating hyper-real and dramatic images. Natural causes the model to - # produce more natural, less hyper-real looking images. + # Legacy style options `vivid` and `natural` for the retired `dall-e-3` model. + # Vivid produced hyper-real and dramatic images; natural produced more natural, + # less hyper-real looking images. This parameter is not supported for the GPT + # image models. # # @return [Symbol, OpenAI::Models::ImageGenerateParams::Style, nil] optional :style, enum: -> { OpenAI::ImageGenerateParams::Style }, nil?: true @@ -143,8 +145,8 @@ class ImageGenerateParams < OpenAI::Internal::Type::BaseModel # @!method initialize(prompt:, background: nil, model: nil, moderation: nil, n: nil, output_compression: nil, output_format: nil, partial_images: nil, quality: nil, response_format: nil, size: nil, style: nil, user: nil, request_options: {}) # @param prompt [String] # A text description of the desired image(s). The maximum length is 32000 - # characters for the GPT image models, 1000 characters for `dall-e-2` and 4000 - # characters for `dall-e-3`. + # characters for the GPT image models. Legacy limits for the retired models were + # 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`. # # @param background [Symbol, OpenAI::Models::ImageGenerateParams::Background, nil] # Allows to set transparency for the background of the generated image(s). Must be @@ -158,12 +160,13 @@ class ImageGenerateParams < OpenAI::Internal::Type::BaseModel # set the output format to `png` or `webp`. # # @param model [String, Symbol, OpenAI::Models::ImageModel, nil] - # The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT - # image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, - # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, - # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, - # `gpt-image-2.5-flare-2026-09-08`). Defaults to `dall-e-2` unless a parameter - # specific to the GPT image models is used. + # The GPT Image model to use for image generation. Specify a supported model + # explicitly, such as `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, + # `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, + # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, or + # `gpt-image-2.5-flare-2026-09-08`. DALL·E 2 (`dall-e-2`) and DALL·E 3 + # (`dall-e-3`) were retired from the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). # # @param moderation [Symbol, OpenAI::Models::ImageGenerateParams::Moderation, nil] # Control the content-moderation level for images generated by the GPT image @@ -171,8 +174,8 @@ class ImageGenerateParams < OpenAI::Internal::Type::BaseModel # value). # # @param n [Integer, nil] - # The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only - # `n=1` is supported. + # The number of images to generate. Must be between 1 and 10. The retired + # `dall-e-3` model only supported `n=1`. # # @param output_compression [Integer, nil] # The compression level (0-100%) for the generated images. This parameter is only @@ -199,14 +202,14 @@ class ImageGenerateParams < OpenAI::Internal::Type::BaseModel # - `high`, `medium` and `low` are supported for the GPT image models. # - `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their # `2026-09-08` snapshots, also support `xhigh` and `max`. - # - `hd` and `standard` are supported for `dall-e-3`. - # - `standard` is the only option for `dall-e-2`. + # - The retired `dall-e-3` model supported the legacy values `hd` and `standard`. + # - The retired `dall-e-2` model only supported the legacy value `standard`. # # @param response_format [Symbol, OpenAI::Models::ImageGenerateParams::ResponseFormat, nil] - # The format in which generated images with `dall-e-2` and `dall-e-3` are - # returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes - # after the image has been generated. This parameter isn't supported for the GPT - # image models, which always return base64-encoded images. + # Legacy response format: `url` or `b64_json`, for the retired `dall-e-2` and + # `dall-e-3` models. Returned URLs were valid for 60 minutes after image + # generation. This parameter is not supported for the GPT image models, which + # always return base64-encoded images. # # @param size [String, Symbol, OpenAI::Models::ImageGenerateParams::Size, nil] # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, @@ -218,15 +221,16 @@ class ImageGenerateParams < OpenAI::Internal::Type::BaseModel # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. Legacy sizes for the + # retired `dall-e-2` model were `256x256`, `512x512`, and `1024x1024`. Legacy + # sizes for the retired `dall-e-3` model were `1024x1024`, `1792x1024`, and + # `1024x1792`. # # @param style [Symbol, OpenAI::Models::ImageGenerateParams::Style, nil] - # The style of the generated images. This parameter is only supported for - # `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean - # towards generating hyper-real and dramatic images. Natural causes the model to - # produce more natural, less hyper-real looking images. + # Legacy style options `vivid` and `natural` for the retired `dall-e-3` model. + # Vivid produced hyper-real and dramatic images; natural produced more natural, + # less hyper-real looking images. This parameter is not supported for the GPT + # image models. # # @param user [String] # A unique identifier representing your end-user, which can help OpenAI to monitor @@ -255,18 +259,19 @@ module Background # @return [Array] end - # The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT - # image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, - # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, - # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, - # `gpt-image-2.5-flare-2026-09-08`). Defaults to `dall-e-2` unless a parameter - # specific to the GPT image models is used. + # The GPT Image model to use for image generation. Specify a supported model + # explicitly, such as `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, + # `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, + # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, or + # `gpt-image-2.5-flare-2026-09-08`. DALL·E 2 (`dall-e-2`) and DALL·E 3 + # (`dall-e-3`) were retired from the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). module Model extend OpenAI::Internal::Type::Union variant String - # The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`). Defaults to `dall-e-2` unless a parameter specific to the GPT image models is used. + # The GPT Image model to use for image generation. Specify a supported model explicitly, such as `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, or `gpt-image-2.5-flare-2026-09-08`. DALL·E 2 (`dall-e-2`) and DALL·E 3 (`dall-e-3`) were retired from the API on May 12, 2026; see [deprecations](https://developers.openai.com/api/docs/deprecations). variant enum: -> { OpenAI::ImageModel } # @!method self.variants @@ -306,8 +311,8 @@ module OutputFormat # - `high`, `medium` and `low` are supported for the GPT image models. # - `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their # `2026-09-08` snapshots, also support `xhigh` and `max`. - # - `hd` and `standard` are supported for `dall-e-3`. - # - `standard` is the only option for `dall-e-2`. + # - The retired `dall-e-3` model supported the legacy values `hd` and `standard`. + # - The retired `dall-e-2` model only supported the legacy value `standard`. module Quality extend OpenAI::Internal::Type::Enum @@ -324,10 +329,10 @@ module Quality # @return [Array] end - # The format in which generated images with `dall-e-2` and `dall-e-3` are - # returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes - # after the image has been generated. This parameter isn't supported for the GPT - # image models, which always return base64-encoded images. + # Legacy response format: `url` or `b64_json`, for the retired `dall-e-2` and + # `dall-e-3` models. Returned URLs were valid for 60 minutes after image + # generation. This parameter is not supported for the GPT image models, which + # always return base64-encoded images. module ResponseFormat extend OpenAI::Internal::Type::Enum @@ -347,9 +352,10 @@ module ResponseFormat # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. Legacy sizes for the + # retired `dall-e-2` model were `256x256`, `512x512`, and `1024x1024`. Legacy + # sizes for the retired `dall-e-3` model were `1024x1024`, `1792x1024`, and + # `1024x1792`. module Size extend OpenAI::Internal::Type::Union @@ -392,10 +398,10 @@ module Size # @!endgroup end - # The style of the generated images. This parameter is only supported for - # `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean - # towards generating hyper-real and dramatic images. Natural causes the model to - # produce more natural, less hyper-real looking images. + # Legacy style options `vivid` and `natural` for the retired `dall-e-3` model. + # Vivid produced hyper-real and dramatic images; natural produced more natural, + # less hyper-real looking images. This parameter is not supported for the GPT + # image models. module Style extend OpenAI::Internal::Type::Enum diff --git a/lib/openai/models/responses/tool.rb b/lib/openai/models/responses/tool.rb index 5e656503f..734a7fb23 100644 --- a/lib/openai/models/responses/tool.rb +++ b/lib/openai/models/responses/tool.rb @@ -634,9 +634,13 @@ class ImageGeneration < OpenAI::Internal::Type::BaseModel optional :background, enum: -> { OpenAI::Responses::Tool::ImageGeneration::Background } # @!attribute input_fidelity - # Controls fidelity to the original input image(s). This parameter is supported - # for GPT image models that support input fidelity. `gpt-image-2` and - # `gpt-image-2-2026-04-21` ignore this parameter. + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. Supported models accept `high` and + # `low`, except `gpt-image-1-mini`, which accepts only `low`. Defaults to `low` on + # models that support this parameter. Omit this parameter for `gpt-image-2`, + # `gpt-image-2-2026-04-21`, and other models that do not support it. See the + # [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) + # for model-specific guidance. # # @return [Symbol, OpenAI::Models::Responses::Tool::ImageGeneration::InputFidelity, nil] optional( @@ -709,9 +713,7 @@ class ImageGeneration < OpenAI::Internal::Type::BaseModel # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. # # @return [String, Symbol, OpenAI::Models::Responses::Tool::ImageGeneration::Size, nil] optional :size, union: -> { OpenAI::Responses::Tool::ImageGeneration::Size } @@ -734,9 +736,13 @@ class ImageGeneration < OpenAI::Internal::Type::BaseModel # set the output format to `png` or `webp`. # # @param input_fidelity [Symbol, OpenAI::Models::Responses::Tool::ImageGeneration::InputFidelity, nil] - # Controls fidelity to the original input image(s). This parameter is supported - # for GPT image models that support input fidelity. `gpt-image-2` and - # `gpt-image-2-2026-04-21` ignore this parameter. + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. Supported models accept `high` and + # `low`, except `gpt-image-1-mini`, which accepts only `low`. Defaults to `low` on + # models that support this parameter. Omit this parameter for `gpt-image-2`, + # `gpt-image-2-2026-04-21`, and other models that do not support it. See the + # [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) + # for model-specific guidance. # # @param input_image_mask [OpenAI::Models::Responses::Tool::ImageGeneration::InputImageMask] # Optional mask for inpainting. Contains `image_url` (string, optional) and @@ -779,9 +785,7 @@ class ImageGeneration < OpenAI::Internal::Type::BaseModel # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. # # @param type [Symbol, :image_generation] # The type of the image generation tool. Always `image_generation`. @@ -822,9 +826,13 @@ module Background # @return [Array] end - # Controls fidelity to the original input image(s). This parameter is supported - # for GPT image models that support input fidelity. `gpt-image-2` and - # `gpt-image-2-2026-04-21` ignore this parameter. + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. Supported models accept `high` and + # `low`, except `gpt-image-1-mini`, which accepts only `low`. Defaults to `low` on + # models that support this parameter. Omit this parameter for `gpt-image-2`, + # `gpt-image-2-2026-04-21`, and other models that do not support it. See the + # [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) + # for model-specific guidance. # # @see OpenAI::Models::Responses::Tool::ImageGeneration#input_fidelity module InputFidelity @@ -978,9 +986,7 @@ module Quality # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. # # @see OpenAI::Models::Responses::Tool::ImageGeneration#size module Size diff --git a/lib/openai/resources/images.rb b/lib/openai/resources/images.rb index 7d923f29e..c555a6c0a 100644 --- a/lib/openai/resources/images.rb +++ b/lib/openai/resources/images.rb @@ -4,7 +4,11 @@ module OpenAI module Resources # Given a prompt and/or an input image, the model will generate a new image. class Images - # Creates a variation of a given image. This endpoint only supports `dall-e-2`. + # Legacy endpoint for creating variations with DALL·E 2, which was retired from + # the API on May 12, 2026. See + # [deprecations](https://developers.openai.com/api/docs/deprecations). For new + # integrations, use image edits with a supported GPT Image model; see the + # [image generation guide](https://developers.openai.com/api/docs/guides/image-generation). # # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload # metadata. Use `OpenAI::FilePart` when you need to override the filename or @@ -13,28 +17,30 @@ class Images # @overload create_variation(image:, model: nil, n: nil, response_format: nil, size: nil, user: nil, request_options: {}) # # @param image [Pathname, StringIO, IO, String, OpenAI::FilePart] - # The image to use as the basis for the variation(s). Must be a valid PNG file, - # less than 4MB, and square. + # The input image for the legacy variations endpoint. The legacy format requires a + # valid PNG file, less than 4MB, and square. # # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload # metadata. Use `OpenAI::FilePart` when you need to override the filename or # content type. # # @param model [String, Symbol, OpenAI::Models::ImageModel, nil] - # The model to use for image generation. Only `dall-e-2` is supported at this - # time. + # Legacy model selection for the variations endpoint, which was designed for + # `dall-e-2`. DALL·E 2 was retired from the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). Use image + # edits with a supported GPT Image model for new integrations. # # @param n [Integer, nil] - # The number of images to generate. Must be between 1 and 10. + # The number of images requested from the legacy variations endpoint. Must be + # between 1 and 10. # # @param response_format [Symbol, OpenAI::Models::ImageCreateVariationParams::ResponseFormat, nil] - # The format in which the generated images are returned. Must be one of `url` or - # `b64_json`. URLs are only valid for 60 minutes after the image has been - # generated. + # The response format for the legacy variations endpoint: `url` or `b64_json`. + # Returned URLs were valid for 60 minutes after image generation. # # @param size [Symbol, OpenAI::Models::ImageCreateVariationParams::Size, nil] - # The size of the generated images. Must be one of `256x256`, `512x512`, or - # `1024x1024`. + # The requested image size for the legacy variations endpoint. Must be one of + # `256x256`, `512x512`, or `1024x1024`. # # @param user [String] # A unique identifier representing your end-user, which can help OpenAI to monitor @@ -62,7 +68,9 @@ def create_variation(params) # See {OpenAI::Resources::Images#edit_stream_raw} for streaming counterpart. # # 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`. + # prompt. This endpoint supports GPT Image models. DALL·E 2 was retired from the + # API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). # # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload # metadata. Use `OpenAI::FilePart` when you need to override the filename or @@ -80,16 +88,13 @@ def create_variation(params) # be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16 # images. # - # For `dall-e-2`, you can only provide one image, and it should be a square `png` - # file less than 4MB. - # # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload # metadata. Use `OpenAI::FilePart` when you need to override the filename or # content type. # # @param prompt [String] - # A text description of the desired image(s). The maximum length is 1000 - # characters for `dall-e-2`, and 32000 characters for the GPT image models. + # A text description of the desired image(s). The maximum length is 32000 + # characters for the GPT image models. # # @param background [Symbol, OpenAI::Models::ImageEditParams::Background, nil] # Allows to set transparency for the background of the generated image(s). Must be @@ -103,9 +108,14 @@ def create_variation(params) # set the output format to `png` or `webp`. # # @param input_fidelity [Symbol, OpenAI::Models::ImageEditParams::InputFidelity, nil] - # Controls fidelity to the original input image(s). This parameter is supported - # for GPT image models that support input fidelity. `gpt-image-2` and - # `gpt-image-2-2026-04-21` ignore this parameter. + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. Models that accept both `high` and + # `low` include `gpt-image-1`, `gpt-image-1.5`, and `chatgpt-image-latest`. + # `gpt-image-1-mini` accepts only `low`. Defaults to `low` on models that support + # this parameter. Omit this parameter for `gpt-image-2`, `gpt-image-2-2026-04-21`, + # and other models that do not support it. See the + # [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) + # for model-specific guidance. # # @param mask [Pathname, StringIO, IO, String, OpenAI::FilePart] # An additional image whose fully transparent areas (e.g. where alpha is zero) @@ -118,12 +128,13 @@ def create_variation(params) # content type. # # @param model [String, Symbol, OpenAI::Models::ImageModel, nil] - # The model to use for image generation. One of `dall-e-2` or a GPT image model - # (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, - # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, - # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, - # `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`). Defaults to - # `gpt-image-1.5`. + # The GPT Image model to use for image editing (`gpt-image-1`, `gpt-image-1-mini`, + # `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, + # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, + # `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or + # `chatgpt-image-latest`). Defaults to `gpt-image-1.5`. DALL·E 2 was retired from + # the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). # # @param n [Integer, nil] # The number of images to generate. Must be between 1 and 10. @@ -153,10 +164,8 @@ def create_variation(params) # `xhigh` and `max`. Defaults to `auto`. # # @param response_format [Symbol, OpenAI::Models::ImageEditParams::ResponseFormat, nil] - # The format in which the generated images are returned. Must be one of `url` or - # `b64_json`. URLs are only valid for 60 minutes after the image has been - # generated. This parameter is only supported for `dall-e-2` (default is `url` for - # `dall-e-2`), as GPT image models always return base64-encoded images. + # Legacy response-format parameter (`url` or `b64_json`) for the retired + # `dall-e-2` model. GPT Image models always return base64-encoded images. # # @param size [String, Symbol, OpenAI::Models::ImageEditParams::Size, nil] # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, @@ -168,9 +177,8 @@ def create_variation(params) # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. Legacy sizes for the + # retired `dall-e-2` model were `256x256`, `512x512`, and `1024x1024`. # # @param user [String] # A unique identifier representing your end-user, which can help OpenAI to monitor @@ -203,7 +211,9 @@ def edit(params) # See {OpenAI::Resources::Images#edit} for non-streaming counterpart. # # 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`. + # prompt. This endpoint supports GPT Image models. DALL·E 2 was retired from the + # API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). # # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload # metadata. Use `OpenAI::FilePart` when you need to override the filename or @@ -221,16 +231,13 @@ def edit(params) # be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16 # images. # - # For `dall-e-2`, you can only provide one image, and it should be a square `png` - # file less than 4MB. - # # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload # metadata. Use `OpenAI::FilePart` when you need to override the filename or # content type. # # @param prompt [String] - # A text description of the desired image(s). The maximum length is 1000 - # characters for `dall-e-2`, and 32000 characters for the GPT image models. + # A text description of the desired image(s). The maximum length is 32000 + # characters for the GPT image models. # # @param background [Symbol, OpenAI::Models::ImageEditParams::Background, nil] # Allows to set transparency for the background of the generated image(s). Must be @@ -244,9 +251,14 @@ def edit(params) # set the output format to `png` or `webp`. # # @param input_fidelity [Symbol, OpenAI::Models::ImageEditParams::InputFidelity, nil] - # Controls fidelity to the original input image(s). This parameter is supported - # for GPT image models that support input fidelity. `gpt-image-2` and - # `gpt-image-2-2026-04-21` ignore this parameter. + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. Models that accept both `high` and + # `low` include `gpt-image-1`, `gpt-image-1.5`, and `chatgpt-image-latest`. + # `gpt-image-1-mini` accepts only `low`. Defaults to `low` on models that support + # this parameter. Omit this parameter for `gpt-image-2`, `gpt-image-2-2026-04-21`, + # and other models that do not support it. See the + # [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) + # for model-specific guidance. # # @param mask [Pathname, StringIO, IO, String, OpenAI::FilePart] # An additional image whose fully transparent areas (e.g. where alpha is zero) @@ -259,12 +271,13 @@ def edit(params) # content type. # # @param model [String, Symbol, OpenAI::Models::ImageModel, nil] - # The model to use for image generation. One of `dall-e-2` or a GPT image model - # (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, - # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, - # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, - # `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`). Defaults to - # `gpt-image-1.5`. + # The GPT Image model to use for image editing (`gpt-image-1`, `gpt-image-1-mini`, + # `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, + # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, + # `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or + # `chatgpt-image-latest`). Defaults to `gpt-image-1.5`. DALL·E 2 was retired from + # the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). # # @param n [Integer, nil] # The number of images to generate. Must be between 1 and 10. @@ -294,10 +307,8 @@ def edit(params) # `xhigh` and `max`. Defaults to `auto`. # # @param response_format [Symbol, OpenAI::Models::ImageEditParams::ResponseFormat, nil] - # The format in which the generated images are returned. Must be one of `url` or - # `b64_json`. URLs are only valid for 60 minutes after the image has been - # generated. This parameter is only supported for `dall-e-2` (default is `url` for - # `dall-e-2`), as GPT image models always return base64-encoded images. + # Legacy response-format parameter (`url` or `b64_json`) for the retired + # `dall-e-2` model. GPT Image models always return base64-encoded images. # # @param size [String, Symbol, OpenAI::Models::ImageEditParams::Size, nil] # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, @@ -309,9 +320,8 @@ def edit(params) # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. Legacy sizes for the + # retired `dall-e-2` model were `256x256`, `512x512`, and `1024x1024`. # # @param user [String] # A unique identifier representing your end-user, which can help OpenAI to monitor @@ -356,8 +366,8 @@ def edit_stream_raw(params) # # @param prompt [String] # A text description of the desired image(s). The maximum length is 32000 - # characters for the GPT image models, 1000 characters for `dall-e-2` and 4000 - # characters for `dall-e-3`. + # characters for the GPT image models. Legacy limits for the retired models were + # 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`. # # @param background [Symbol, OpenAI::Models::ImageGenerateParams::Background, nil] # Allows to set transparency for the background of the generated image(s). Must be @@ -371,12 +381,13 @@ def edit_stream_raw(params) # set the output format to `png` or `webp`. # # @param model [String, Symbol, OpenAI::Models::ImageModel, nil] - # The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT - # image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, - # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, - # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, - # `gpt-image-2.5-flare-2026-09-08`). Defaults to `dall-e-2` unless a parameter - # specific to the GPT image models is used. + # The GPT Image model to use for image generation. Specify a supported model + # explicitly, such as `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, + # `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, + # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, or + # `gpt-image-2.5-flare-2026-09-08`. DALL·E 2 (`dall-e-2`) and DALL·E 3 + # (`dall-e-3`) were retired from the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). # # @param moderation [Symbol, OpenAI::Models::ImageGenerateParams::Moderation, nil] # Control the content-moderation level for images generated by the GPT image @@ -384,8 +395,8 @@ def edit_stream_raw(params) # value). # # @param n [Integer, nil] - # The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only - # `n=1` is supported. + # The number of images to generate. Must be between 1 and 10. The retired + # `dall-e-3` model only supported `n=1`. # # @param output_compression [Integer, nil] # The compression level (0-100%) for the generated images. This parameter is only @@ -412,14 +423,14 @@ def edit_stream_raw(params) # - `high`, `medium` and `low` are supported for the GPT image models. # - `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their # `2026-09-08` snapshots, also support `xhigh` and `max`. - # - `hd` and `standard` are supported for `dall-e-3`. - # - `standard` is the only option for `dall-e-2`. + # - The retired `dall-e-3` model supported the legacy values `hd` and `standard`. + # - The retired `dall-e-2` model only supported the legacy value `standard`. # # @param response_format [Symbol, OpenAI::Models::ImageGenerateParams::ResponseFormat, nil] - # The format in which generated images with `dall-e-2` and `dall-e-3` are - # returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes - # after the image has been generated. This parameter isn't supported for the GPT - # image models, which always return base64-encoded images. + # Legacy response format: `url` or `b64_json`, for the retired `dall-e-2` and + # `dall-e-3` models. Returned URLs were valid for 60 minutes after image + # generation. This parameter is not supported for the GPT image models, which + # always return base64-encoded images. # # @param size [String, Symbol, OpenAI::Models::ImageGenerateParams::Size, nil] # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, @@ -431,15 +442,16 @@ def edit_stream_raw(params) # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. Legacy sizes for the + # retired `dall-e-2` model were `256x256`, `512x512`, and `1024x1024`. Legacy + # sizes for the retired `dall-e-3` model were `1024x1024`, `1792x1024`, and + # `1024x1792`. # # @param style [Symbol, OpenAI::Models::ImageGenerateParams::Style, nil] - # The style of the generated images. This parameter is only supported for - # `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean - # towards generating hyper-real and dramatic images. Natural causes the model to - # produce more natural, less hyper-real looking images. + # Legacy style options `vivid` and `natural` for the retired `dall-e-3` model. + # Vivid produced hyper-real and dramatic images; natural produced more natural, + # less hyper-real looking images. This parameter is not supported for the GPT + # image models. # # @param user [String] # A unique identifier representing your end-user, which can help OpenAI to monitor @@ -477,8 +489,8 @@ def generate(params) # # @param prompt [String] # A text description of the desired image(s). The maximum length is 32000 - # characters for the GPT image models, 1000 characters for `dall-e-2` and 4000 - # characters for `dall-e-3`. + # characters for the GPT image models. Legacy limits for the retired models were + # 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`. # # @param background [Symbol, OpenAI::Models::ImageGenerateParams::Background, nil] # Allows to set transparency for the background of the generated image(s). Must be @@ -492,12 +504,13 @@ def generate(params) # set the output format to `png` or `webp`. # # @param model [String, Symbol, OpenAI::Models::ImageModel, nil] - # The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT - # image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, - # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, - # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, - # `gpt-image-2.5-flare-2026-09-08`). Defaults to `dall-e-2` unless a parameter - # specific to the GPT image models is used. + # The GPT Image model to use for image generation. Specify a supported model + # explicitly, such as `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, + # `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, + # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, or + # `gpt-image-2.5-flare-2026-09-08`. DALL·E 2 (`dall-e-2`) and DALL·E 3 + # (`dall-e-3`) were retired from the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). # # @param moderation [Symbol, OpenAI::Models::ImageGenerateParams::Moderation, nil] # Control the content-moderation level for images generated by the GPT image @@ -505,8 +518,8 @@ def generate(params) # value). # # @param n [Integer, nil] - # The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only - # `n=1` is supported. + # The number of images to generate. Must be between 1 and 10. The retired + # `dall-e-3` model only supported `n=1`. # # @param output_compression [Integer, nil] # The compression level (0-100%) for the generated images. This parameter is only @@ -533,14 +546,14 @@ def generate(params) # - `high`, `medium` and `low` are supported for the GPT image models. # - `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their # `2026-09-08` snapshots, also support `xhigh` and `max`. - # - `hd` and `standard` are supported for `dall-e-3`. - # - `standard` is the only option for `dall-e-2`. + # - The retired `dall-e-3` model supported the legacy values `hd` and `standard`. + # - The retired `dall-e-2` model only supported the legacy value `standard`. # # @param response_format [Symbol, OpenAI::Models::ImageGenerateParams::ResponseFormat, nil] - # The format in which generated images with `dall-e-2` and `dall-e-3` are - # returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes - # after the image has been generated. This parameter isn't supported for the GPT - # image models, which always return base64-encoded images. + # Legacy response format: `url` or `b64_json`, for the retired `dall-e-2` and + # `dall-e-3` models. Returned URLs were valid for 60 minutes after image + # generation. This parameter is not supported for the GPT image models, which + # always return base64-encoded images. # # @param size [String, Symbol, OpenAI::Models::ImageGenerateParams::Size, nil] # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, @@ -552,15 +565,16 @@ def generate(params) # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. Legacy sizes for the + # retired `dall-e-2` model were `256x256`, `512x512`, and `1024x1024`. Legacy + # sizes for the retired `dall-e-3` model were `1024x1024`, `1792x1024`, and + # `1024x1792`. # # @param style [Symbol, OpenAI::Models::ImageGenerateParams::Style, nil] - # The style of the generated images. This parameter is only supported for - # `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean - # towards generating hyper-real and dramatic images. Natural causes the model to - # produce more natural, less hyper-real looking images. + # Legacy style options `vivid` and `natural` for the retired `dall-e-3` model. + # Vivid produced hyper-real and dramatic images; natural produced more natural, + # less hyper-real looking images. This parameter is not supported for the GPT + # image models. # # @param user [String] # A unique identifier representing your end-user, which can help OpenAI to monitor diff --git a/rbi/openai/models/beta/beta_tool.rbi b/rbi/openai/models/beta/beta_tool.rbi index 7ad3d8e8e..cfa9d3e3f 100644 --- a/rbi/openai/models/beta/beta_tool.rbi +++ b/rbi/openai/models/beta/beta_tool.rbi @@ -976,9 +976,13 @@ module OpenAI sig { params(background: OpenAI::Beta::BetaTool::ImageGeneration::Background::OrSymbol).void } attr_writer :background - # Controls fidelity to the original input image(s). This parameter is supported - # for GPT image models that support input fidelity. `gpt-image-2` and - # `gpt-image-2-2026-04-21` ignore this parameter. + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. Supported models accept `high` and + # `low`, except `gpt-image-1-mini`, which accepts only `low`. Defaults to `low` on + # models that support this parameter. Omit this parameter for `gpt-image-2`, + # `gpt-image-2-2026-04-21`, and other models that do not support it. See the + # [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) + # for model-specific guidance. sig { returns(T.nilable(OpenAI::Beta::BetaTool::ImageGeneration::InputFidelity::OrSymbol)) } attr_accessor :input_fidelity @@ -1050,9 +1054,7 @@ module OpenAI # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. sig { returns(T.nilable(T.any(String, OpenAI::Beta::BetaTool::ImageGeneration::Size::OrSymbol))) } attr_reader :size @@ -1105,9 +1107,13 @@ module OpenAI # set the output format to `png` or `webp`. background: nil, - # Controls fidelity to the original input image(s). This parameter is supported - # for GPT image models that support input fidelity. `gpt-image-2` and - # `gpt-image-2-2026-04-21` ignore this parameter. + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. Supported models accept `high` and + # `low`, except `gpt-image-1-mini`, which accepts only `low`. Defaults to `low` on + # models that support this parameter. Omit this parameter for `gpt-image-2`, + # `gpt-image-2-2026-04-21`, and other models that do not support it. See the + # [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) + # for model-specific guidance. input_fidelity: nil, # Optional mask for inpainting. Contains `image_url` (string, optional) and @@ -1150,9 +1156,7 @@ module OpenAI # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. size: nil, # The type of the image generation tool. Always `image_generation`. @@ -1222,9 +1226,13 @@ module OpenAI end end - # Controls fidelity to the original input image(s). This parameter is supported - # for GPT image models that support input fidelity. `gpt-image-2` and - # `gpt-image-2-2026-04-21` ignore this parameter. + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. Supported models accept `high` and + # `low`, except `gpt-image-1-mini`, which accepts only `low`. Defaults to `low` on + # models that support this parameter. Omit this parameter for `gpt-image-2`, + # `gpt-image-2-2026-04-21`, and other models that do not support it. See the + # [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) + # for model-specific guidance. module InputFidelity extend OpenAI::Internal::Type::Enum @@ -1407,9 +1415,7 @@ module OpenAI # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. module Size extend OpenAI::Internal::Type::Union diff --git a/rbi/openai/models/image.rbi b/rbi/openai/models/image.rbi index c2134ad3c..1263f7c3c 100644 --- a/rbi/openai/models/image.rbi +++ b/rbi/openai/models/image.rbi @@ -12,25 +12,26 @@ module OpenAI ) end - # 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`. + # The base64-encoded image data. Returned by default for the GPT image models. For + # the retired `dall-e-2` and `dall-e-3` models, this field was present only when + # `response_format` was set to `b64_json`. sig { returns(T.nilable(String)) } attr_reader :b64_json sig { params(b64_json: String).void } attr_writer :b64_json - # For `dall-e-3` only, the revised prompt that was used to generate the image. + # Legacy field for the retired `dall-e-3` model: the revised prompt that was used + # to generate the image. sig { returns(T.nilable(String)) } attr_reader :revised_prompt sig { params(revised_prompt: String).void } attr_writer :revised_prompt - # 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. + # Legacy field for the retired `dall-e-2` and `dall-e-3` models: the URL of the + # generated image when `response_format` was set to `url`, the legacy default. + # Unsupported for the GPT image models. sig { returns(T.nilable(String)) } attr_reader :url @@ -51,17 +52,18 @@ module OpenAI end def self.new( - # 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`. + # The base64-encoded image data. Returned by default for the GPT image models. For + # the retired `dall-e-2` and `dall-e-3` models, this field was present only when + # `response_format` was set to `b64_json`. b64_json: nil, - # For `dall-e-3` only, the revised prompt that was used to generate the image. + # Legacy field for the retired `dall-e-3` model: the revised prompt that was used + # to generate the image. revised_prompt: nil, - # 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. + # Legacy field for the retired `dall-e-2` and `dall-e-3` models: the URL of the + # generated image when `response_format` was set to `url`, the legacy default. + # Unsupported for the GPT image models. url: nil ) diff --git a/rbi/openai/models/image_create_variation_params.rbi b/rbi/openai/models/image_create_variation_params.rbi index 26bbbb504..8805f77bc 100644 --- a/rbi/openai/models/image_create_variation_params.rbi +++ b/rbi/openai/models/image_create_variation_params.rbi @@ -15,8 +15,8 @@ module OpenAI ) end - # The image to use as the basis for the variation(s). Must be a valid PNG file, - # less than 4MB, and square. + # The input image for the legacy variations endpoint. The legacy format requires a + # valid PNG file, less than 4MB, and square. # # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload # metadata. Use `OpenAI::FilePart` when you need to override the filename or @@ -24,23 +24,25 @@ module OpenAI sig { returns(OpenAI::Internal::FileInput) } attr_accessor :image - # The model to use for image generation. Only `dall-e-2` is supported at this - # time. + # Legacy model selection for the variations endpoint, which was designed for + # `dall-e-2`. DALL·E 2 was retired from the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). Use image + # edits with a supported GPT Image model for new integrations. sig { returns(T.nilable(T.any(String, OpenAI::ImageModel::OrSymbol))) } attr_accessor :model - # The number of images to generate. Must be between 1 and 10. + # The number of images requested from the legacy variations endpoint. Must be + # between 1 and 10. sig { returns(T.nilable(Integer)) } attr_accessor :n - # The format in which the generated images are returned. Must be one of `url` or - # `b64_json`. URLs are only valid for 60 minutes after the image has been - # generated. + # The response format for the legacy variations endpoint: `url` or `b64_json`. + # Returned URLs were valid for 60 minutes after image generation. sig { returns(T.nilable(OpenAI::ImageCreateVariationParams::ResponseFormat::OrSymbol)) } attr_accessor :response_format - # The size of the generated images. Must be one of `256x256`, `512x512`, or - # `1024x1024`. + # The requested image size for the legacy variations endpoint. Must be one of + # `256x256`, `512x512`, or `1024x1024`. sig { returns(T.nilable(OpenAI::ImageCreateVariationParams::Size::OrSymbol)) } attr_accessor :size @@ -74,28 +76,30 @@ module OpenAI end def self.new( - # The image to use as the basis for the variation(s). Must be a valid PNG file, - # less than 4MB, and square. + # The input image for the legacy variations endpoint. The legacy format requires a + # valid PNG file, less than 4MB, and square. # # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload # metadata. Use `OpenAI::FilePart` when you need to override the filename or # content type. image:, - # The model to use for image generation. Only `dall-e-2` is supported at this - # time. + # Legacy model selection for the variations endpoint, which was designed for + # `dall-e-2`. DALL·E 2 was retired from the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). Use image + # edits with a supported GPT Image model for new integrations. model: nil, - # The number of images to generate. Must be between 1 and 10. + # The number of images requested from the legacy variations endpoint. Must be + # between 1 and 10. n: nil, - # The format in which the generated images are returned. Must be one of `url` or - # `b64_json`. URLs are only valid for 60 minutes after the image has been - # generated. + # The response format for the legacy variations endpoint: `url` or `b64_json`. + # Returned URLs were valid for 60 minutes after image generation. response_format: nil, - # The size of the generated images. Must be one of `256x256`, `512x512`, or - # `1024x1024`. + # The requested image size for the legacy variations endpoint. Must be one of + # `256x256`, `512x512`, or `1024x1024`. size: nil, # A unique identifier representing your end-user, which can help OpenAI to monitor @@ -123,8 +127,10 @@ module OpenAI def to_hash end - # The model to use for image generation. Only `dall-e-2` is supported at this - # time. + # Legacy model selection for the variations endpoint, which was designed for + # `dall-e-2`. DALL·E 2 was retired from the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). Use image + # edits with a supported GPT Image model for new integrations. module Model extend OpenAI::Internal::Type::Union @@ -136,9 +142,8 @@ module OpenAI end - # The format in which the generated images are returned. Must be one of `url` or - # `b64_json`. URLs are only valid for 60 minutes after the image has been - # generated. + # The response format for the legacy variations endpoint: `url` or `b64_json`. + # Returned URLs were valid for 60 minutes after image generation. module ResponseFormat extend OpenAI::Internal::Type::Enum @@ -153,8 +158,8 @@ module OpenAI end end - # The size of the generated images. Must be one of `256x256`, `512x512`, or - # `1024x1024`. + # The requested image size for the legacy variations endpoint. Must be one of + # `256x256`, `512x512`, or `1024x1024`. module Size extend OpenAI::Internal::Type::Enum diff --git a/rbi/openai/models/image_edit_params.rbi b/rbi/openai/models/image_edit_params.rbi index a153f5c23..3823227df 100644 --- a/rbi/openai/models/image_edit_params.rbi +++ b/rbi/openai/models/image_edit_params.rbi @@ -24,17 +24,14 @@ module OpenAI # be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16 # images. # - # For `dall-e-2`, you can only provide one image, and it should be a square `png` - # file less than 4MB. - # # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload # metadata. Use `OpenAI::FilePart` when you need to override the filename or # content type. sig { returns(OpenAI::ImageEditParams::Image::Variants) } attr_accessor :image - # A text description of the desired image(s). The maximum length is 1000 - # characters for `dall-e-2`, and 32000 characters for the GPT image models. + # A text description of the desired image(s). The maximum length is 32000 + # characters for the GPT image models. sig { returns(String) } attr_accessor :prompt @@ -50,9 +47,14 @@ module OpenAI sig { returns(T.nilable(OpenAI::ImageEditParams::Background::OrSymbol)) } attr_accessor :background - # Controls fidelity to the original input image(s). This parameter is supported - # for GPT image models that support input fidelity. `gpt-image-2` and - # `gpt-image-2-2026-04-21` ignore this parameter. + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. Models that accept both `high` and + # `low` include `gpt-image-1`, `gpt-image-1.5`, and `chatgpt-image-latest`. + # `gpt-image-1-mini` accepts only `low`. Defaults to `low` on models that support + # this parameter. Omit this parameter for `gpt-image-2`, `gpt-image-2-2026-04-21`, + # and other models that do not support it. See the + # [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) + # for model-specific guidance. sig { returns(T.nilable(OpenAI::ImageEditParams::InputFidelity::OrSymbol)) } attr_accessor :input_fidelity @@ -70,12 +72,13 @@ module OpenAI sig { params(mask: OpenAI::Internal::FileInput).void } attr_writer :mask - # The model to use for image generation. One of `dall-e-2` or a GPT image model - # (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, - # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, - # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, - # `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`). Defaults to - # `gpt-image-1.5`. + # The GPT Image model to use for image editing (`gpt-image-1`, `gpt-image-1-mini`, + # `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, + # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, + # `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or + # `chatgpt-image-latest`). Defaults to `gpt-image-1.5`. DALL·E 2 was retired from + # the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). sig { returns(T.nilable(T.any(String, OpenAI::ImageModel::OrSymbol))) } attr_accessor :model @@ -111,10 +114,8 @@ module OpenAI sig { returns(T.nilable(OpenAI::ImageEditParams::Quality::OrSymbol)) } attr_accessor :quality - # The format in which the generated images are returned. Must be one of `url` or - # `b64_json`. URLs are only valid for 60 minutes after the image has been - # generated. This parameter is only supported for `dall-e-2` (default is `url` for - # `dall-e-2`), as GPT image models always return base64-encoded images. + # Legacy response-format parameter (`url` or `b64_json`) for the retired + # `dall-e-2` model. GPT Image models always return base64-encoded images. sig { returns(T.nilable(OpenAI::ImageEditParams::ResponseFormat::OrSymbol)) } attr_accessor :response_format @@ -127,9 +128,8 @@ module OpenAI # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. Legacy sizes for the + # retired `dall-e-2` model were `256x256`, `512x512`, and `1024x1024`. sig { returns(T.nilable(T.any(String, OpenAI::ImageEditParams::Size::OrSymbol))) } attr_accessor :size @@ -188,16 +188,13 @@ module OpenAI # be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16 # images. # - # For `dall-e-2`, you can only provide one image, and it should be a square `png` - # file less than 4MB. - # # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload # metadata. Use `OpenAI::FilePart` when you need to override the filename or # content type. image:, - # A text description of the desired image(s). The maximum length is 1000 - # characters for `dall-e-2`, and 32000 characters for the GPT image models. + # A text description of the desired image(s). The maximum length is 32000 + # characters for the GPT image models. prompt:, # Allows to set transparency for the background of the generated image(s). Must be @@ -211,9 +208,14 @@ module OpenAI # set the output format to `png` or `webp`. background: nil, - # Controls fidelity to the original input image(s). This parameter is supported - # for GPT image models that support input fidelity. `gpt-image-2` and - # `gpt-image-2-2026-04-21` ignore this parameter. + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. Models that accept both `high` and + # `low` include `gpt-image-1`, `gpt-image-1.5`, and `chatgpt-image-latest`. + # `gpt-image-1-mini` accepts only `low`. Defaults to `low` on models that support + # this parameter. Omit this parameter for `gpt-image-2`, `gpt-image-2-2026-04-21`, + # and other models that do not support it. See the + # [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) + # for model-specific guidance. input_fidelity: nil, # An additional image whose fully transparent areas (e.g. where alpha is zero) @@ -226,12 +228,13 @@ module OpenAI # content type. mask: nil, - # The model to use for image generation. One of `dall-e-2` or a GPT image model - # (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, - # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, - # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, - # `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`). Defaults to - # `gpt-image-1.5`. + # The GPT Image model to use for image editing (`gpt-image-1`, `gpt-image-1-mini`, + # `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, + # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, + # `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or + # `chatgpt-image-latest`). Defaults to `gpt-image-1.5`. DALL·E 2 was retired from + # the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). model: nil, # The number of images to generate. Must be between 1 and 10. @@ -261,10 +264,8 @@ module OpenAI # `xhigh` and `max`. Defaults to `auto`. quality: nil, - # The format in which the generated images are returned. Must be one of `url` or - # `b64_json`. URLs are only valid for 60 minutes after the image has been - # generated. This parameter is only supported for `dall-e-2` (default is `url` for - # `dall-e-2`), as GPT image models always return base64-encoded images. + # Legacy response-format parameter (`url` or `b64_json`) for the retired + # `dall-e-2` model. GPT Image models always return base64-encoded images. response_format: nil, # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, @@ -276,9 +277,8 @@ module OpenAI # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. Legacy sizes for the + # retired `dall-e-2` model were `256x256`, `512x512`, and `1024x1024`. size: nil, # A unique identifier representing your end-user, which can help OpenAI to monitor @@ -322,9 +322,6 @@ module OpenAI # `gpt-image-2.5-flare-2026-09-08`, and `chatgpt-image-latest`), each image should # be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16 # images. - # - # For `dall-e-2`, you can only provide one image, and it should be a square `png` - # file less than 4MB. module Image extend OpenAI::Internal::Type::Union @@ -365,9 +362,14 @@ module OpenAI end end - # Controls fidelity to the original input image(s). This parameter is supported - # for GPT image models that support input fidelity. `gpt-image-2` and - # `gpt-image-2-2026-04-21` ignore this parameter. + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. Models that accept both `high` and + # `low` include `gpt-image-1`, `gpt-image-1.5`, and `chatgpt-image-latest`. + # `gpt-image-1-mini` accepts only `low`. Defaults to `low` on models that support + # this parameter. Omit this parameter for `gpt-image-2`, `gpt-image-2-2026-04-21`, + # and other models that do not support it. See the + # [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) + # for model-specific guidance. module InputFidelity extend OpenAI::Internal::Type::Enum @@ -382,12 +384,13 @@ module OpenAI end end - # The model to use for image generation. One of `dall-e-2` or a GPT image model - # (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, - # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, - # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, - # `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`). Defaults to - # `gpt-image-1.5`. + # The GPT Image model to use for image editing (`gpt-image-1`, `gpt-image-1-mini`, + # `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, + # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, + # `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or + # `chatgpt-image-latest`). Defaults to `gpt-image-1.5`. DALL·E 2 was retired from + # the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). module Model extend OpenAI::Internal::Type::Union @@ -440,10 +443,8 @@ module OpenAI end end - # The format in which the generated images are returned. Must be one of `url` or - # `b64_json`. URLs are only valid for 60 minutes after the image has been - # generated. This parameter is only supported for `dall-e-2` (default is `url` for - # `dall-e-2`), as GPT image models always return base64-encoded images. + # Legacy response-format parameter (`url` or `b64_json`) for the retired + # `dall-e-2` model. GPT Image models always return base64-encoded images. module ResponseFormat extend OpenAI::Internal::Type::Enum @@ -467,9 +468,8 @@ module OpenAI # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. Legacy sizes for the + # retired `dall-e-2` model were `256x256`, `512x512`, and `1024x1024`. module Size extend OpenAI::Internal::Type::Union diff --git a/rbi/openai/models/image_generate_params.rbi b/rbi/openai/models/image_generate_params.rbi index 6aa1813a1..3a3ee670f 100644 --- a/rbi/openai/models/image_generate_params.rbi +++ b/rbi/openai/models/image_generate_params.rbi @@ -16,8 +16,8 @@ module OpenAI end # A text description of the desired image(s). The maximum length is 32000 - # characters for the GPT image models, 1000 characters for `dall-e-2` and 4000 - # characters for `dall-e-3`. + # characters for the GPT image models. Legacy limits for the retired models were + # 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`. sig { returns(String) } attr_accessor :prompt @@ -33,12 +33,13 @@ module OpenAI sig { returns(T.nilable(OpenAI::ImageGenerateParams::Background::OrSymbol)) } attr_accessor :background - # The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT - # image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, - # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, - # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, - # `gpt-image-2.5-flare-2026-09-08`). Defaults to `dall-e-2` unless a parameter - # specific to the GPT image models is used. + # The GPT Image model to use for image generation. Specify a supported model + # explicitly, such as `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, + # `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, + # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, or + # `gpt-image-2.5-flare-2026-09-08`. DALL·E 2 (`dall-e-2`) and DALL·E 3 + # (`dall-e-3`) were retired from the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). sig { returns(T.nilable(T.any(String, OpenAI::ImageModel::OrSymbol))) } attr_accessor :model @@ -48,8 +49,8 @@ module OpenAI sig { returns(T.nilable(OpenAI::ImageGenerateParams::Moderation::OrSymbol)) } attr_accessor :moderation - # The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only - # `n=1` is supported. + # The number of images to generate. Must be between 1 and 10. The retired + # `dall-e-3` model only supported `n=1`. sig { returns(T.nilable(Integer)) } attr_accessor :n @@ -80,15 +81,15 @@ module OpenAI # - `high`, `medium` and `low` are supported for the GPT image models. # - `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their # `2026-09-08` snapshots, also support `xhigh` and `max`. - # - `hd` and `standard` are supported for `dall-e-3`. - # - `standard` is the only option for `dall-e-2`. + # - The retired `dall-e-3` model supported the legacy values `hd` and `standard`. + # - The retired `dall-e-2` model only supported the legacy value `standard`. sig { returns(T.nilable(OpenAI::ImageGenerateParams::Quality::OrSymbol)) } attr_accessor :quality - # The format in which generated images with `dall-e-2` and `dall-e-3` are - # returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes - # after the image has been generated. This parameter isn't supported for the GPT - # image models, which always return base64-encoded images. + # Legacy response format: `url` or `b64_json`, for the retired `dall-e-2` and + # `dall-e-3` models. Returned URLs were valid for 60 minutes after image + # generation. This parameter is not supported for the GPT image models, which + # always return base64-encoded images. sig { returns(T.nilable(OpenAI::ImageGenerateParams::ResponseFormat::OrSymbol)) } attr_accessor :response_format @@ -101,16 +102,17 @@ module OpenAI # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. Legacy sizes for the + # retired `dall-e-2` model were `256x256`, `512x512`, and `1024x1024`. Legacy + # sizes for the retired `dall-e-3` model were `1024x1024`, `1792x1024`, and + # `1024x1792`. sig { returns(T.nilable(T.any(String, OpenAI::ImageGenerateParams::Size::OrSymbol))) } attr_accessor :size - # The style of the generated images. This parameter is only supported for - # `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean - # towards generating hyper-real and dramatic images. Natural causes the model to - # produce more natural, less hyper-real looking images. + # Legacy style options `vivid` and `natural` for the retired `dall-e-3` model. + # Vivid produced hyper-real and dramatic images; natural produced more natural, + # less hyper-real looking images. This parameter is not supported for the GPT + # image models. sig { returns(T.nilable(OpenAI::ImageGenerateParams::Style::OrSymbol)) } attr_accessor :style @@ -159,8 +161,8 @@ module OpenAI def self.new( # A text description of the desired image(s). The maximum length is 32000 - # characters for the GPT image models, 1000 characters for `dall-e-2` and 4000 - # characters for `dall-e-3`. + # characters for the GPT image models. Legacy limits for the retired models were + # 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`. prompt:, # Allows to set transparency for the background of the generated image(s). Must be @@ -174,12 +176,13 @@ module OpenAI # set the output format to `png` or `webp`. background: nil, - # The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT - # image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, - # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, - # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, - # `gpt-image-2.5-flare-2026-09-08`). Defaults to `dall-e-2` unless a parameter - # specific to the GPT image models is used. + # The GPT Image model to use for image generation. Specify a supported model + # explicitly, such as `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, + # `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, + # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, or + # `gpt-image-2.5-flare-2026-09-08`. DALL·E 2 (`dall-e-2`) and DALL·E 3 + # (`dall-e-3`) were retired from the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). model: nil, # Control the content-moderation level for images generated by the GPT image @@ -187,8 +190,8 @@ module OpenAI # value). moderation: nil, - # The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only - # `n=1` is supported. + # The number of images to generate. Must be between 1 and 10. The retired + # `dall-e-3` model only supported `n=1`. n: nil, # The compression level (0-100%) for the generated images. This parameter is only @@ -215,14 +218,14 @@ module OpenAI # - `high`, `medium` and `low` are supported for the GPT image models. # - `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their # `2026-09-08` snapshots, also support `xhigh` and `max`. - # - `hd` and `standard` are supported for `dall-e-3`. - # - `standard` is the only option for `dall-e-2`. + # - The retired `dall-e-3` model supported the legacy values `hd` and `standard`. + # - The retired `dall-e-2` model only supported the legacy value `standard`. quality: nil, - # The format in which generated images with `dall-e-2` and `dall-e-3` are - # returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes - # after the image has been generated. This parameter isn't supported for the GPT - # image models, which always return base64-encoded images. + # Legacy response format: `url` or `b64_json`, for the retired `dall-e-2` and + # `dall-e-3` models. Returned URLs were valid for 60 minutes after image + # generation. This parameter is not supported for the GPT image models, which + # always return base64-encoded images. response_format: nil, # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, @@ -234,15 +237,16 @@ module OpenAI # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. Legacy sizes for the + # retired `dall-e-2` model were `256x256`, `512x512`, and `1024x1024`. Legacy + # sizes for the retired `dall-e-3` model were `1024x1024`, `1792x1024`, and + # `1024x1792`. size: nil, - # The style of the generated images. This parameter is only supported for - # `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean - # towards generating hyper-real and dramatic images. Natural causes the model to - # produce more natural, less hyper-real looking images. + # Legacy style options `vivid` and `natural` for the retired `dall-e-3` model. + # Vivid produced hyper-real and dramatic images; natural produced more natural, + # less hyper-real looking images. This parameter is not supported for the GPT + # image models. style: nil, # A unique identifier representing your end-user, which can help OpenAI to monitor @@ -301,12 +305,13 @@ module OpenAI end end - # The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT - # image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, - # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, - # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, - # `gpt-image-2.5-flare-2026-09-08`). Defaults to `dall-e-2` unless a parameter - # specific to the GPT image models is used. + # The GPT Image model to use for image generation. Specify a supported model + # explicitly, such as `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, + # `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, + # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, or + # `gpt-image-2.5-flare-2026-09-08`. DALL·E 2 (`dall-e-2`) and DALL·E 3 + # (`dall-e-3`) were retired from the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). module Model extend OpenAI::Internal::Type::Union @@ -359,8 +364,8 @@ module OpenAI # - `high`, `medium` and `low` are supported for the GPT image models. # - `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their # `2026-09-08` snapshots, also support `xhigh` and `max`. - # - `hd` and `standard` are supported for `dall-e-3`. - # - `standard` is the only option for `dall-e-2`. + # - The retired `dall-e-3` model supported the legacy values `hd` and `standard`. + # - The retired `dall-e-2` model only supported the legacy value `standard`. module Quality extend OpenAI::Internal::Type::Enum @@ -381,10 +386,10 @@ module OpenAI end end - # The format in which generated images with `dall-e-2` and `dall-e-3` are - # returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes - # after the image has been generated. This parameter isn't supported for the GPT - # image models, which always return base64-encoded images. + # Legacy response format: `url` or `b64_json`, for the retired `dall-e-2` and + # `dall-e-3` models. Returned URLs were valid for 60 minutes after image + # generation. This parameter is not supported for the GPT image models, which + # always return base64-encoded images. module ResponseFormat extend OpenAI::Internal::Type::Enum @@ -408,9 +413,10 @@ module OpenAI # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. Legacy sizes for the + # retired `dall-e-2` model were `256x256`, `512x512`, and `1024x1024`. Legacy + # sizes for the retired `dall-e-3` model were `1024x1024`, `1792x1024`, and + # `1024x1792`. module Size extend OpenAI::Internal::Type::Union @@ -437,10 +443,10 @@ module OpenAI end - # The style of the generated images. This parameter is only supported for - # `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean - # towards generating hyper-real and dramatic images. Natural causes the model to - # produce more natural, less hyper-real looking images. + # Legacy style options `vivid` and `natural` for the retired `dall-e-3` model. + # Vivid produced hyper-real and dramatic images; natural produced more natural, + # less hyper-real looking images. This parameter is not supported for the GPT + # image models. module Style extend OpenAI::Internal::Type::Enum diff --git a/rbi/openai/models/responses/tool.rbi b/rbi/openai/models/responses/tool.rbi index b8e55efe3..50b42bcec 100644 --- a/rbi/openai/models/responses/tool.rbi +++ b/rbi/openai/models/responses/tool.rbi @@ -977,9 +977,13 @@ module OpenAI sig { params(background: OpenAI::Responses::Tool::ImageGeneration::Background::OrSymbol).void } attr_writer :background - # Controls fidelity to the original input image(s). This parameter is supported - # for GPT image models that support input fidelity. `gpt-image-2` and - # `gpt-image-2-2026-04-21` ignore this parameter. + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. Supported models accept `high` and + # `low`, except `gpt-image-1-mini`, which accepts only `low`. Defaults to `low` on + # models that support this parameter. Omit this parameter for `gpt-image-2`, + # `gpt-image-2-2026-04-21`, and other models that do not support it. See the + # [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) + # for model-specific guidance. sig { returns(T.nilable(OpenAI::Responses::Tool::ImageGeneration::InputFidelity::OrSymbol)) } attr_accessor :input_fidelity @@ -1051,9 +1055,7 @@ module OpenAI # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. sig { returns(T.nilable(T.any(String, OpenAI::Responses::Tool::ImageGeneration::Size::OrSymbol))) } attr_reader :size @@ -1106,9 +1108,13 @@ module OpenAI # set the output format to `png` or `webp`. background: nil, - # Controls fidelity to the original input image(s). This parameter is supported - # for GPT image models that support input fidelity. `gpt-image-2` and - # `gpt-image-2-2026-04-21` ignore this parameter. + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. Supported models accept `high` and + # `low`, except `gpt-image-1-mini`, which accepts only `low`. Defaults to `low` on + # models that support this parameter. Omit this parameter for `gpt-image-2`, + # `gpt-image-2-2026-04-21`, and other models that do not support it. See the + # [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) + # for model-specific guidance. input_fidelity: nil, # Optional mask for inpainting. Contains `image_url` (string, optional) and @@ -1151,9 +1157,7 @@ module OpenAI # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. size: nil, # The type of the image generation tool. Always `image_generation`. @@ -1223,9 +1227,13 @@ module OpenAI end end - # Controls fidelity to the original input image(s). This parameter is supported - # for GPT image models that support input fidelity. `gpt-image-2` and - # `gpt-image-2-2026-04-21` ignore this parameter. + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. Supported models accept `high` and + # `low`, except `gpt-image-1-mini`, which accepts only `low`. Defaults to `low` on + # models that support this parameter. Omit this parameter for `gpt-image-2`, + # `gpt-image-2-2026-04-21`, and other models that do not support it. See the + # [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) + # for model-specific guidance. module InputFidelity extend OpenAI::Internal::Type::Enum @@ -1408,9 +1416,7 @@ module OpenAI # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. module Size extend OpenAI::Internal::Type::Union diff --git a/rbi/openai/resources/images.rbi b/rbi/openai/resources/images.rbi index 6ae0d8baf..0d5cbae4c 100644 --- a/rbi/openai/resources/images.rbi +++ b/rbi/openai/resources/images.rbi @@ -6,7 +6,11 @@ module OpenAI # Given a prompt and/or an input image, the model will generate a new image. class Images - # Creates a variation of a given image. This endpoint only supports `dall-e-2`. + # Legacy endpoint for creating variations with DALL·E 2, which was retired from + # the API on May 12, 2026. See + # [deprecations](https://developers.openai.com/api/docs/deprecations). For new + # integrations, use image edits with a supported GPT Image model; see the + # [image generation guide](https://developers.openai.com/api/docs/guides/image-generation). sig { params( image: OpenAI::Internal::FileInput, @@ -20,24 +24,26 @@ module OpenAI .returns(OpenAI::ImagesResponse) } def create_variation( - # The image to use as the basis for the variation(s). Must be a valid PNG file, - # less than 4MB, and square. + # The input image for the legacy variations endpoint. The legacy format requires a + # valid PNG file, less than 4MB, and square. # # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload # metadata. Use `OpenAI::FilePart` when you need to override the filename or # content type. image:, - # The model to use for image generation. Only `dall-e-2` is supported at this - # time. + # Legacy model selection for the variations endpoint, which was designed for + # `dall-e-2`. DALL·E 2 was retired from the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). Use image + # edits with a supported GPT Image model for new integrations. model: nil, - # The number of images to generate. Must be between 1 and 10. + # The number of images requested from the legacy variations endpoint. Must be + # between 1 and 10. n: nil, - # The format in which the generated images are returned. Must be one of `url` or - # `b64_json`. URLs are only valid for 60 minutes after the image has been - # generated. + # The response format for the legacy variations endpoint: `url` or `b64_json`. + # Returned URLs were valid for 60 minutes after image generation. response_format: nil, - # The size of the generated images. Must be one of `256x256`, `512x512`, or - # `1024x1024`. + # The requested image size for the legacy variations endpoint. Must be one of + # `256x256`, `512x512`, or `1024x1024`. size: nil, # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. @@ -50,7 +56,9 @@ module OpenAI # See {OpenAI::Resources::Images#edit_stream_raw} for streaming counterpart. # # 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`. + # prompt. This endpoint supports GPT Image models. DALL·E 2 was retired from the + # API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). sig { params( image: OpenAI::ImageEditParams::Image::Variants, @@ -82,15 +90,12 @@ module OpenAI # be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16 # images. # - # For `dall-e-2`, you can only provide one image, and it should be a square `png` - # file less than 4MB. - # # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload # metadata. Use `OpenAI::FilePart` when you need to override the filename or # content type. image:, - # A text description of the desired image(s). The maximum length is 1000 - # characters for `dall-e-2`, and 32000 characters for the GPT image models. + # A text description of the desired image(s). The maximum length is 32000 + # characters for the GPT image models. prompt:, # Allows to set transparency for the background of the generated image(s). Must be # one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used, @@ -102,9 +107,14 @@ module OpenAI # `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`, # set the output format to `png` or `webp`. background: nil, - # Controls fidelity to the original input image(s). This parameter is supported - # for GPT image models that support input fidelity. `gpt-image-2` and - # `gpt-image-2-2026-04-21` ignore this parameter. + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. Models that accept both `high` and + # `low` include `gpt-image-1`, `gpt-image-1.5`, and `chatgpt-image-latest`. + # `gpt-image-1-mini` accepts only `low`. Defaults to `low` on models that support + # this parameter. Omit this parameter for `gpt-image-2`, `gpt-image-2-2026-04-21`, + # and other models that do not support it. See the + # [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) + # for model-specific guidance. input_fidelity: nil, # An additional image whose fully transparent areas (e.g. where alpha is zero) # indicate where `image` should be edited. If there are multiple images provided, @@ -115,12 +125,13 @@ module OpenAI # metadata. Use `OpenAI::FilePart` when you need to override the filename or # content type. mask: nil, - # The model to use for image generation. One of `dall-e-2` or a GPT image model - # (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, - # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, - # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, - # `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`). Defaults to - # `gpt-image-1.5`. + # The GPT Image model to use for image editing (`gpt-image-1`, `gpt-image-1-mini`, + # `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, + # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, + # `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or + # `chatgpt-image-latest`). Defaults to `gpt-image-1.5`. DALL·E 2 was retired from + # the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). model: nil, # The number of images to generate. Must be between 1 and 10. n: nil, @@ -144,10 +155,8 @@ module OpenAI # `gpt-image-2.5-flare`, including their `2026-09-08` snapshots, also support # `xhigh` and `max`. Defaults to `auto`. quality: nil, - # The format in which the generated images are returned. Must be one of `url` or - # `b64_json`. URLs are only valid for 60 minutes after the image has been - # generated. This parameter is only supported for `dall-e-2` (default is `url` for - # `dall-e-2`), as GPT image models always return base64-encoded images. + # Legacy response-format parameter (`url` or `b64_json`) for the retired + # `dall-e-2` model. GPT Image models always return base64-encoded images. response_format: nil, # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, @@ -158,9 +167,8 @@ module OpenAI # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. Legacy sizes for the + # retired `dall-e-2` model were `256x256`, `512x512`, and `1024x1024`. size: nil, # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. @@ -176,7 +184,9 @@ module OpenAI # See {OpenAI::Resources::Images#edit} for non-streaming counterpart. # # 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`. + # prompt. This endpoint supports GPT Image models. DALL·E 2 was retired from the + # API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). sig { params( image: OpenAI::ImageEditParams::Image::Variants, @@ -208,15 +218,12 @@ module OpenAI # be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16 # images. # - # For `dall-e-2`, you can only provide one image, and it should be a square `png` - # file less than 4MB. - # # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload # metadata. Use `OpenAI::FilePart` when you need to override the filename or # content type. image:, - # A text description of the desired image(s). The maximum length is 1000 - # characters for `dall-e-2`, and 32000 characters for the GPT image models. + # A text description of the desired image(s). The maximum length is 32000 + # characters for the GPT image models. prompt:, # Allows to set transparency for the background of the generated image(s). Must be # one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used, @@ -228,9 +235,14 @@ module OpenAI # `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`, # set the output format to `png` or `webp`. background: nil, - # Controls fidelity to the original input image(s). This parameter is supported - # for GPT image models that support input fidelity. `gpt-image-2` and - # `gpt-image-2-2026-04-21` ignore this parameter. + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. Models that accept both `high` and + # `low` include `gpt-image-1`, `gpt-image-1.5`, and `chatgpt-image-latest`. + # `gpt-image-1-mini` accepts only `low`. Defaults to `low` on models that support + # this parameter. Omit this parameter for `gpt-image-2`, `gpt-image-2-2026-04-21`, + # and other models that do not support it. See the + # [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) + # for model-specific guidance. input_fidelity: nil, # An additional image whose fully transparent areas (e.g. where alpha is zero) # indicate where `image` should be edited. If there are multiple images provided, @@ -241,12 +253,13 @@ module OpenAI # metadata. Use `OpenAI::FilePart` when you need to override the filename or # content type. mask: nil, - # The model to use for image generation. One of `dall-e-2` or a GPT image model - # (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, - # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, - # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, - # `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`). Defaults to - # `gpt-image-1.5`. + # The GPT Image model to use for image editing (`gpt-image-1`, `gpt-image-1-mini`, + # `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, + # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, + # `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or + # `chatgpt-image-latest`). Defaults to `gpt-image-1.5`. DALL·E 2 was retired from + # the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). model: nil, # The number of images to generate. Must be between 1 and 10. n: nil, @@ -270,10 +283,8 @@ module OpenAI # `gpt-image-2.5-flare`, including their `2026-09-08` snapshots, also support # `xhigh` and `max`. Defaults to `auto`. quality: nil, - # The format in which the generated images are returned. Must be one of `url` or - # `b64_json`. URLs are only valid for 60 minutes after the image has been - # generated. This parameter is only supported for `dall-e-2` (default is `url` for - # `dall-e-2`), as GPT image models always return base64-encoded images. + # Legacy response-format parameter (`url` or `b64_json`) for the retired + # `dall-e-2` model. GPT Image models always return base64-encoded images. response_format: nil, # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, @@ -284,9 +295,8 @@ module OpenAI # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. Legacy sizes for the + # retired `dall-e-2` model were `256x256`, `512x512`, and `1024x1024`. size: nil, # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. @@ -325,8 +335,8 @@ module OpenAI } def generate( # A text description of the desired image(s). The maximum length is 32000 - # characters for the GPT image models, 1000 characters for `dall-e-2` and 4000 - # characters for `dall-e-3`. + # characters for the GPT image models. Legacy limits for the retired models were + # 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`. prompt:, # Allows to set transparency for the background of the generated image(s). Must be # one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used, @@ -338,19 +348,20 @@ module OpenAI # `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`, # set the output format to `png` or `webp`. background: nil, - # The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT - # image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, - # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, - # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, - # `gpt-image-2.5-flare-2026-09-08`). Defaults to `dall-e-2` unless a parameter - # specific to the GPT image models is used. + # The GPT Image model to use for image generation. Specify a supported model + # explicitly, such as `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, + # `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, + # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, or + # `gpt-image-2.5-flare-2026-09-08`. DALL·E 2 (`dall-e-2`) and DALL·E 3 + # (`dall-e-3`) were retired from the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). model: nil, # Control the content-moderation level for images generated by the GPT image # models. Must be either `low` for less restrictive filtering or `auto` (default # value). moderation: nil, - # The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only - # `n=1` is supported. + # The number of images to generate. Must be between 1 and 10. The retired + # `dall-e-3` model only supported `n=1`. n: nil, # The compression level (0-100%) for the generated images. This parameter is only # supported for the GPT image models with the `webp` or `jpeg` output formats, and @@ -373,13 +384,13 @@ module OpenAI # - `high`, `medium` and `low` are supported for the GPT image models. # - `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their # `2026-09-08` snapshots, also support `xhigh` and `max`. - # - `hd` and `standard` are supported for `dall-e-3`. - # - `standard` is the only option for `dall-e-2`. + # - The retired `dall-e-3` model supported the legacy values `hd` and `standard`. + # - The retired `dall-e-2` model only supported the legacy value `standard`. quality: nil, - # The format in which generated images with `dall-e-2` and `dall-e-3` are - # returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes - # after the image has been generated. This parameter isn't supported for the GPT - # image models, which always return base64-encoded images. + # Legacy response format: `url` or `b64_json`, for the retired `dall-e-2` and + # `dall-e-3` models. Returned URLs were valid for 60 minutes after image + # generation. This parameter is not supported for the GPT image models, which + # always return base64-encoded images. response_format: nil, # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, @@ -390,14 +401,15 @@ module OpenAI # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. Legacy sizes for the + # retired `dall-e-2` model were `256x256`, `512x512`, and `1024x1024`. Legacy + # sizes for the retired `dall-e-3` model were `1024x1024`, `1792x1024`, and + # `1024x1792`. size: nil, - # The style of the generated images. This parameter is only supported for - # `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean - # towards generating hyper-real and dramatic images. Natural causes the model to - # produce more natural, less hyper-real looking images. + # Legacy style options `vivid` and `natural` for the retired `dall-e-3` model. + # Vivid produced hyper-real and dramatic images; natural produced more natural, + # less hyper-real looking images. This parameter is not supported for the GPT + # image models. style: nil, # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. @@ -436,8 +448,8 @@ module OpenAI } def generate_stream_raw( # A text description of the desired image(s). The maximum length is 32000 - # characters for the GPT image models, 1000 characters for `dall-e-2` and 4000 - # characters for `dall-e-3`. + # characters for the GPT image models. Legacy limits for the retired models were + # 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`. prompt:, # Allows to set transparency for the background of the generated image(s). Must be # one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used, @@ -449,19 +461,20 @@ module OpenAI # `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`, # set the output format to `png` or `webp`. background: nil, - # The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT - # image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, - # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, - # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, - # `gpt-image-2.5-flare-2026-09-08`). Defaults to `dall-e-2` unless a parameter - # specific to the GPT image models is used. + # The GPT Image model to use for image generation. Specify a supported model + # explicitly, such as `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, + # `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, + # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, or + # `gpt-image-2.5-flare-2026-09-08`. DALL·E 2 (`dall-e-2`) and DALL·E 3 + # (`dall-e-3`) were retired from the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). model: nil, # Control the content-moderation level for images generated by the GPT image # models. Must be either `low` for less restrictive filtering or `auto` (default # value). moderation: nil, - # The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only - # `n=1` is supported. + # The number of images to generate. Must be between 1 and 10. The retired + # `dall-e-3` model only supported `n=1`. n: nil, # The compression level (0-100%) for the generated images. This parameter is only # supported for the GPT image models with the `webp` or `jpeg` output formats, and @@ -484,13 +497,13 @@ module OpenAI # - `high`, `medium` and `low` are supported for the GPT image models. # - `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their # `2026-09-08` snapshots, also support `xhigh` and `max`. - # - `hd` and `standard` are supported for `dall-e-3`. - # - `standard` is the only option for `dall-e-2`. + # - The retired `dall-e-3` model supported the legacy values `hd` and `standard`. + # - The retired `dall-e-2` model only supported the legacy value `standard`. quality: nil, - # The format in which generated images with `dall-e-2` and `dall-e-3` are - # returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes - # after the image has been generated. This parameter isn't supported for the GPT - # image models, which always return base64-encoded images. + # Legacy response format: `url` or `b64_json`, for the retired `dall-e-2` and + # `dall-e-3` models. Returned URLs were valid for 60 minutes after image + # generation. This parameter is not supported for the GPT image models, which + # always return base64-encoded images. response_format: nil, # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, @@ -501,14 +514,15 @@ module OpenAI # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. Legacy sizes for the + # retired `dall-e-2` model were `256x256`, `512x512`, and `1024x1024`. Legacy + # sizes for the retired `dall-e-3` model were `1024x1024`, `1792x1024`, and + # `1024x1792`. size: nil, - # The style of the generated images. This parameter is only supported for - # `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean - # towards generating hyper-real and dramatic images. Natural causes the model to - # produce more natural, less hyper-real looking images. + # Legacy style options `vivid` and `natural` for the retired `dall-e-3` model. + # Vivid produced hyper-real and dramatic images; natural produced more natural, + # less hyper-real looking images. This parameter is not supported for the GPT + # image models. style: nil, # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. diff --git a/sig/openai/models/beta/beta_tool.rbs b/sig/openai/models/beta/beta_tool.rbs index 9a52ff178..c88fc31bf 100644 --- a/sig/openai/models/beta/beta_tool.rbs +++ b/sig/openai/models/beta/beta_tool.rbs @@ -643,9 +643,13 @@ module OpenAI OpenAI::Models::Beta::BetaTool::ImageGeneration::background ) -> OpenAI::Models::Beta::BetaTool::ImageGeneration::background - # Controls fidelity to the original input image(s). This parameter is supported - # for GPT image models that support input fidelity. `gpt-image-2` and - # `gpt-image-2-2026-04-21` ignore this parameter. + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. Supported models accept `high` and + # `low`, except `gpt-image-1-mini`, which accepts only `low`. Defaults to `low` on + # models that support this parameter. Omit this parameter for `gpt-image-2`, + # `gpt-image-2-2026-04-21`, and other models that do not support it. See the + # [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) + # for model-specific guidance. attr_accessor input_fidelity: OpenAI::Models::Beta::BetaTool::ImageGeneration::input_fidelity? # Optional mask for inpainting. Contains `image_url` (string, optional) and @@ -729,9 +733,7 @@ module OpenAI # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. attr_reader size: OpenAI::Models::Beta::BetaTool::ImageGeneration::size? # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, @@ -743,9 +745,7 @@ module OpenAI # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. def size=: ( OpenAI::Models::Beta::BetaTool::ImageGeneration::size ) -> OpenAI::Models::Beta::BetaTool::ImageGeneration::size @@ -763,9 +763,13 @@ module OpenAI # `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`, # set the output format to `png` or `webp`. # @param input_fidelity - # Controls fidelity to the original input image(s). This parameter is supported - # for GPT image models that support input fidelity. `gpt-image-2` and - # `gpt-image-2-2026-04-21` ignore this parameter. + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. Supported models accept `high` and + # `low`, except `gpt-image-1-mini`, which accepts only `low`. Defaults to `low` on + # models that support this parameter. Omit this parameter for `gpt-image-2`, + # `gpt-image-2-2026-04-21`, and other models that do not support it. See the + # [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) + # for model-specific guidance. # @param input_image_mask # Optional mask for inpainting. Contains `image_url` (string, optional) and # `file_id` (string, optional). @@ -800,9 +804,7 @@ module OpenAI # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. # @param type # The type of the image generation tool. Always `image_generation`. def initialize: ( diff --git a/sig/openai/models/image.rbs b/sig/openai/models/image.rbs index ffba0712b..b1022ec29 100644 --- a/sig/openai/models/image.rbs +++ b/sig/openai/models/image.rbs @@ -3,42 +3,45 @@ module OpenAI type image = { ?:b64_json => String, ?revised_prompt: String, ?url: String } class Image < OpenAI::Internal::Type::BaseModel - # 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`. + # The base64-encoded image data. Returned by default for the GPT image models. For + # the retired `dall-e-2` and `dall-e-3` models, this field was present only when + # `response_format` was set to `b64_json`. attr_reader 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`. + # The base64-encoded image data. Returned by default for the GPT image models. For + # the retired `dall-e-2` and `dall-e-3` models, this field was present only when + # `response_format` was set to `b64_json`. def b64_json=: (String) -> String - # For `dall-e-3` only, the revised prompt that was used to generate the image. + # Legacy field for the retired `dall-e-3` model: the revised prompt that was used + # to generate the image. attr_reader revised_prompt: String? - # For `dall-e-3` only, the revised prompt that was used to generate the image. + # Legacy field for the retired `dall-e-3` model: the revised prompt that was used + # to generate the image. def revised_prompt=: (String) -> String - # 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. + # Legacy field for the retired `dall-e-2` and `dall-e-3` models: the URL of the + # generated image when `response_format` was set to `url`, the legacy default. + # Unsupported for the GPT image models. attr_reader url: String? - # 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. + # Legacy field for the retired `dall-e-2` and `dall-e-3` models: the URL of the + # generated image when `response_format` was set to `url`, the legacy default. + # Unsupported for the GPT image models. def url=: (String) -> String # @param b64_json - # 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`. + # The base64-encoded image data. Returned by default for the GPT image models. For + # the retired `dall-e-2` and `dall-e-3` models, this field was present only when + # `response_format` was set to `b64_json`. # @param revised_prompt - # For `dall-e-3` only, the revised prompt that was used to generate the image. + # Legacy field for the retired `dall-e-3` model: the revised prompt that was used + # to generate the image. # @param url - # 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. + # Legacy field for the retired `dall-e-2` and `dall-e-3` models: the URL of the + # generated image when `response_format` was set to `url`, the legacy default. + # Unsupported for the GPT image models. def initialize: ( ?b64_json: String, ?revised_prompt: String, diff --git a/sig/openai/models/image_create_variation_params.rbs b/sig/openai/models/image_create_variation_params.rbs index 4a0f4a760..d6235e012 100644 --- a/sig/openai/models/image_create_variation_params.rbs +++ b/sig/openai/models/image_create_variation_params.rbs @@ -15,28 +15,30 @@ module OpenAI extend OpenAI::Internal::Type::RequestParameters::Converter include OpenAI::Internal::Type::RequestParameters - # The image to use as the basis for the variation(s). Must be a valid PNG file, - # less than 4MB, and square. + # The input image for the legacy variations endpoint. The legacy format requires a + # valid PNG file, less than 4MB, and square. # # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload # metadata. Use `OpenAI::FilePart` when you need to override the filename or # content type. attr_accessor image: OpenAI::Internal::file_input - # The model to use for image generation. Only `dall-e-2` is supported at this - # time. + # Legacy model selection for the variations endpoint, which was designed for + # `dall-e-2`. DALL·E 2 was retired from the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). Use image + # edits with a supported GPT Image model for new integrations. attr_accessor model: OpenAI::Models::ImageCreateVariationParams::model? - # The number of images to generate. Must be between 1 and 10. + # The number of images requested from the legacy variations endpoint. Must be + # between 1 and 10. attr_accessor n: Integer? - # The format in which the generated images are returned. Must be one of `url` or - # `b64_json`. URLs are only valid for 60 minutes after the image has been - # generated. + # The response format for the legacy variations endpoint: `url` or `b64_json`. + # Returned URLs were valid for 60 minutes after image generation. attr_accessor response_format: OpenAI::Models::ImageCreateVariationParams::response_format? - # The size of the generated images. Must be one of `256x256`, `512x512`, or - # `1024x1024`. + # The requested image size for the legacy variations endpoint. Must be one of + # `256x256`, `512x512`, or `1024x1024`. attr_accessor size: OpenAI::Models::ImageCreateVariationParams::size? # A unique identifier representing your end-user, which can help OpenAI to monitor @@ -50,24 +52,26 @@ module OpenAI def user=: (String) -> String # @param image - # The image to use as the basis for the variation(s). Must be a valid PNG file, - # less than 4MB, and square. + # The input image for the legacy variations endpoint. The legacy format requires a + # valid PNG file, less than 4MB, and square. # # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload # metadata. Use `OpenAI::FilePart` when you need to override the filename or # content type. # @param model - # The model to use for image generation. Only `dall-e-2` is supported at this - # time. + # Legacy model selection for the variations endpoint, which was designed for + # `dall-e-2`. DALL·E 2 was retired from the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). Use image + # edits with a supported GPT Image model for new integrations. # @param n - # The number of images to generate. Must be between 1 and 10. + # The number of images requested from the legacy variations endpoint. Must be + # between 1 and 10. # @param response_format - # The format in which the generated images are returned. Must be one of `url` or - # `b64_json`. URLs are only valid for 60 minutes after the image has been - # generated. + # The response format for the legacy variations endpoint: `url` or `b64_json`. + # Returned URLs were valid for 60 minutes after image generation. # @param size - # The size of the generated images. Must be one of `256x256`, `512x512`, or - # `1024x1024`. + # The requested image size for the legacy variations endpoint. Must be one of + # `256x256`, `512x512`, or `1024x1024`. # @param user # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. diff --git a/sig/openai/models/image_edit_params.rbs b/sig/openai/models/image_edit_params.rbs index e0ba34ac5..9d4bd2c97 100644 --- a/sig/openai/models/image_edit_params.rbs +++ b/sig/openai/models/image_edit_params.rbs @@ -32,16 +32,13 @@ module OpenAI # be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16 # images. # - # For `dall-e-2`, you can only provide one image, and it should be a square `png` - # file less than 4MB. - # # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload # metadata. Use `OpenAI::FilePart` when you need to override the filename or # content type. attr_accessor image: OpenAI::Models::ImageEditParams::image - # A text description of the desired image(s). The maximum length is 1000 - # characters for `dall-e-2`, and 32000 characters for the GPT image models. + # A text description of the desired image(s). The maximum length is 32000 + # characters for the GPT image models. attr_accessor prompt: String # Allows to set transparency for the background of the generated image(s). Must be @@ -55,9 +52,14 @@ module OpenAI # set the output format to `png` or `webp`. attr_accessor background: OpenAI::Models::ImageEditParams::background? - # Controls fidelity to the original input image(s). This parameter is supported - # for GPT image models that support input fidelity. `gpt-image-2` and - # `gpt-image-2-2026-04-21` ignore this parameter. + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. Models that accept both `high` and + # `low` include `gpt-image-1`, `gpt-image-1.5`, and `chatgpt-image-latest`. + # `gpt-image-1-mini` accepts only `low`. Defaults to `low` on models that support + # this parameter. Omit this parameter for `gpt-image-2`, `gpt-image-2-2026-04-21`, + # and other models that do not support it. See the + # [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) + # for model-specific guidance. attr_accessor input_fidelity: OpenAI::Models::ImageEditParams::input_fidelity? # An additional image whose fully transparent areas (e.g. where alpha is zero) @@ -80,12 +82,13 @@ module OpenAI # content type. def mask=: (OpenAI::Internal::file_input) -> OpenAI::Internal::file_input - # The model to use for image generation. One of `dall-e-2` or a GPT image model - # (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, - # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, - # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, - # `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`). Defaults to - # `gpt-image-1.5`. + # The GPT Image model to use for image editing (`gpt-image-1`, `gpt-image-1-mini`, + # `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, + # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, + # `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or + # `chatgpt-image-latest`). Defaults to `gpt-image-1.5`. DALL·E 2 was retired from + # the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). attr_accessor model: OpenAI::Models::ImageEditParams::model? # The number of images to generate. Must be between 1 and 10. @@ -115,10 +118,8 @@ module OpenAI # `xhigh` and `max`. Defaults to `auto`. attr_accessor quality: OpenAI::Models::ImageEditParams::quality? - # The format in which the generated images are returned. Must be one of `url` or - # `b64_json`. URLs are only valid for 60 minutes after the image has been - # generated. This parameter is only supported for `dall-e-2` (default is `url` for - # `dall-e-2`), as GPT image models always return base64-encoded images. + # Legacy response-format parameter (`url` or `b64_json`) for the retired + # `dall-e-2` model. GPT Image models always return base64-encoded images. attr_accessor response_format: OpenAI::Models::ImageEditParams::response_format? # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, @@ -130,9 +131,8 @@ module OpenAI # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. Legacy sizes for the + # retired `dall-e-2` model were `256x256`, `512x512`, and `1024x1024`. attr_accessor size: OpenAI::Models::ImageEditParams::size? # A unique identifier representing your end-user, which can help OpenAI to monitor @@ -155,15 +155,12 @@ module OpenAI # be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16 # images. # - # For `dall-e-2`, you can only provide one image, and it should be a square `png` - # file less than 4MB. - # # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload # metadata. Use `OpenAI::FilePart` when you need to override the filename or # content type. # @param prompt - # A text description of the desired image(s). The maximum length is 1000 - # characters for `dall-e-2`, and 32000 characters for the GPT image models. + # A text description of the desired image(s). The maximum length is 32000 + # characters for the GPT image models. # @param background # Allows to set transparency for the background of the generated image(s). Must be # one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used, @@ -175,9 +172,14 @@ module OpenAI # `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`, # set the output format to `png` or `webp`. # @param input_fidelity - # Controls fidelity to the original input image(s). This parameter is supported - # for GPT image models that support input fidelity. `gpt-image-2` and - # `gpt-image-2-2026-04-21` ignore this parameter. + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. Models that accept both `high` and + # `low` include `gpt-image-1`, `gpt-image-1.5`, and `chatgpt-image-latest`. + # `gpt-image-1-mini` accepts only `low`. Defaults to `low` on models that support + # this parameter. Omit this parameter for `gpt-image-2`, `gpt-image-2-2026-04-21`, + # and other models that do not support it. See the + # [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) + # for model-specific guidance. # @param mask # An additional image whose fully transparent areas (e.g. where alpha is zero) # indicate where `image` should be edited. If there are multiple images provided, @@ -188,12 +190,13 @@ module OpenAI # metadata. Use `OpenAI::FilePart` when you need to override the filename or # content type. # @param model - # The model to use for image generation. One of `dall-e-2` or a GPT image model - # (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, - # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, - # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, - # `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`). Defaults to - # `gpt-image-1.5`. + # The GPT Image model to use for image editing (`gpt-image-1`, `gpt-image-1-mini`, + # `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, + # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, + # `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or + # `chatgpt-image-latest`). Defaults to `gpt-image-1.5`. DALL·E 2 was retired from + # the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). # @param n # The number of images to generate. Must be between 1 and 10. # @param output_compression @@ -217,10 +220,8 @@ module OpenAI # `gpt-image-2.5-flare`, including their `2026-09-08` snapshots, also support # `xhigh` and `max`. Defaults to `auto`. # @param response_format - # The format in which the generated images are returned. Must be one of `url` or - # `b64_json`. URLs are only valid for 60 minutes after the image has been - # generated. This parameter is only supported for `dall-e-2` (default is `url` for - # `dall-e-2`), as GPT image models always return base64-encoded images. + # Legacy response-format parameter (`url` or `b64_json`) for the retired + # `dall-e-2` model. GPT Image models always return base64-encoded images. # @param size # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, @@ -231,9 +232,8 @@ module OpenAI # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. Legacy sizes for the + # retired `dall-e-2` model were `256x256`, `512x512`, and `1024x1024`. # @param user # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. diff --git a/sig/openai/models/image_generate_params.rbs b/sig/openai/models/image_generate_params.rbs index 2b06cd9f6..91b49aa24 100644 --- a/sig/openai/models/image_generate_params.rbs +++ b/sig/openai/models/image_generate_params.rbs @@ -23,8 +23,8 @@ module OpenAI include OpenAI::Internal::Type::RequestParameters # A text description of the desired image(s). The maximum length is 32000 - # characters for the GPT image models, 1000 characters for `dall-e-2` and 4000 - # characters for `dall-e-3`. + # characters for the GPT image models. Legacy limits for the retired models were + # 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`. attr_accessor prompt: String # Allows to set transparency for the background of the generated image(s). Must be @@ -38,12 +38,13 @@ module OpenAI # set the output format to `png` or `webp`. attr_accessor background: OpenAI::Models::ImageGenerateParams::background? - # The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT - # image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, - # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, - # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, - # `gpt-image-2.5-flare-2026-09-08`). Defaults to `dall-e-2` unless a parameter - # specific to the GPT image models is used. + # The GPT Image model to use for image generation. Specify a supported model + # explicitly, such as `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, + # `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, + # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, or + # `gpt-image-2.5-flare-2026-09-08`. DALL·E 2 (`dall-e-2`) and DALL·E 3 + # (`dall-e-3`) were retired from the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). attr_accessor model: OpenAI::Models::ImageGenerateParams::model? # Control the content-moderation level for images generated by the GPT image @@ -51,8 +52,8 @@ module OpenAI # value). attr_accessor moderation: OpenAI::Models::ImageGenerateParams::moderation? - # The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only - # `n=1` is supported. + # The number of images to generate. Must be between 1 and 10. The retired + # `dall-e-3` model only supported `n=1`. attr_accessor n: Integer? # The compression level (0-100%) for the generated images. This parameter is only @@ -79,14 +80,14 @@ module OpenAI # - `high`, `medium` and `low` are supported for the GPT image models. # - `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their # `2026-09-08` snapshots, also support `xhigh` and `max`. - # - `hd` and `standard` are supported for `dall-e-3`. - # - `standard` is the only option for `dall-e-2`. + # - The retired `dall-e-3` model supported the legacy values `hd` and `standard`. + # - The retired `dall-e-2` model only supported the legacy value `standard`. attr_accessor quality: OpenAI::Models::ImageGenerateParams::quality? - # The format in which generated images with `dall-e-2` and `dall-e-3` are - # returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes - # after the image has been generated. This parameter isn't supported for the GPT - # image models, which always return base64-encoded images. + # Legacy response format: `url` or `b64_json`, for the retired `dall-e-2` and + # `dall-e-3` models. Returned URLs were valid for 60 minutes after image + # generation. This parameter is not supported for the GPT image models, which + # always return base64-encoded images. attr_accessor response_format: OpenAI::Models::ImageGenerateParams::response_format? # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, @@ -98,15 +99,16 @@ module OpenAI # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. Legacy sizes for the + # retired `dall-e-2` model were `256x256`, `512x512`, and `1024x1024`. Legacy + # sizes for the retired `dall-e-3` model were `1024x1024`, `1792x1024`, and + # `1024x1792`. attr_accessor size: OpenAI::Models::ImageGenerateParams::size? - # The style of the generated images. This parameter is only supported for - # `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean - # towards generating hyper-real and dramatic images. Natural causes the model to - # produce more natural, less hyper-real looking images. + # Legacy style options `vivid` and `natural` for the retired `dall-e-3` model. + # Vivid produced hyper-real and dramatic images; natural produced more natural, + # less hyper-real looking images. This parameter is not supported for the GPT + # image models. attr_accessor style: OpenAI::Models::ImageGenerateParams::style? # A unique identifier representing your end-user, which can help OpenAI to monitor @@ -121,8 +123,8 @@ module OpenAI # @param prompt # A text description of the desired image(s). The maximum length is 32000 - # characters for the GPT image models, 1000 characters for `dall-e-2` and 4000 - # characters for `dall-e-3`. + # characters for the GPT image models. Legacy limits for the retired models were + # 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`. # @param background # Allows to set transparency for the background of the generated image(s). Must be # one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used, @@ -134,19 +136,20 @@ module OpenAI # `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`, # set the output format to `png` or `webp`. # @param model - # The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT - # image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, - # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, - # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, - # `gpt-image-2.5-flare-2026-09-08`). Defaults to `dall-e-2` unless a parameter - # specific to the GPT image models is used. + # The GPT Image model to use for image generation. Specify a supported model + # explicitly, such as `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, + # `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, + # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, or + # `gpt-image-2.5-flare-2026-09-08`. DALL·E 2 (`dall-e-2`) and DALL·E 3 + # (`dall-e-3`) were retired from the API on May 12, 2026; see + # [deprecations](https://developers.openai.com/api/docs/deprecations). # @param moderation # Control the content-moderation level for images generated by the GPT image # models. Must be either `low` for less restrictive filtering or `auto` (default # value). # @param n - # The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only - # `n=1` is supported. + # The number of images to generate. Must be between 1 and 10. The retired + # `dall-e-3` model only supported `n=1`. # @param output_compression # The compression level (0-100%) for the generated images. This parameter is only # supported for the GPT image models with the `webp` or `jpeg` output formats, and @@ -169,13 +172,13 @@ module OpenAI # - `high`, `medium` and `low` are supported for the GPT image models. # - `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their # `2026-09-08` snapshots, also support `xhigh` and `max`. - # - `hd` and `standard` are supported for `dall-e-3`. - # - `standard` is the only option for `dall-e-2`. + # - The retired `dall-e-3` model supported the legacy values `hd` and `standard`. + # - The retired `dall-e-2` model only supported the legacy value `standard`. # @param response_format - # The format in which generated images with `dall-e-2` and `dall-e-3` are - # returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes - # after the image has been generated. This parameter isn't supported for the GPT - # image models, which always return base64-encoded images. + # Legacy response format: `url` or `b64_json`, for the retired `dall-e-2` and + # `dall-e-3` models. Returned URLs were valid for 60 minutes after image + # generation. This parameter is not supported for the GPT image models, which + # always return base64-encoded images. # @param size # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, @@ -186,14 +189,15 @@ module OpenAI # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. Legacy sizes for the + # retired `dall-e-2` model were `256x256`, `512x512`, and `1024x1024`. Legacy + # sizes for the retired `dall-e-3` model were `1024x1024`, `1792x1024`, and + # `1024x1792`. # @param style - # The style of the generated images. This parameter is only supported for - # `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean - # towards generating hyper-real and dramatic images. Natural causes the model to - # produce more natural, less hyper-real looking images. + # Legacy style options `vivid` and `natural` for the retired `dall-e-3` model. + # Vivid produced hyper-real and dramatic images; natural produced more natural, + # less hyper-real looking images. This parameter is not supported for the GPT + # image models. # @param user # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. diff --git a/sig/openai/models/responses/tool.rbs b/sig/openai/models/responses/tool.rbs index 4e1f41d36..4ad4f71b2 100644 --- a/sig/openai/models/responses/tool.rbs +++ b/sig/openai/models/responses/tool.rbs @@ -641,9 +641,13 @@ module OpenAI OpenAI::Models::Responses::Tool::ImageGeneration::background ) -> OpenAI::Models::Responses::Tool::ImageGeneration::background - # Controls fidelity to the original input image(s). This parameter is supported - # for GPT image models that support input fidelity. `gpt-image-2` and - # `gpt-image-2-2026-04-21` ignore this parameter. + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. Supported models accept `high` and + # `low`, except `gpt-image-1-mini`, which accepts only `low`. Defaults to `low` on + # models that support this parameter. Omit this parameter for `gpt-image-2`, + # `gpt-image-2-2026-04-21`, and other models that do not support it. See the + # [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) + # for model-specific guidance. attr_accessor input_fidelity: OpenAI::Models::Responses::Tool::ImageGeneration::input_fidelity? # Optional mask for inpainting. Contains `image_url` (string, optional) and @@ -727,9 +731,7 @@ module OpenAI # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. attr_reader size: OpenAI::Models::Responses::Tool::ImageGeneration::size? # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, @@ -741,9 +743,7 @@ module OpenAI # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. def size=: ( OpenAI::Models::Responses::Tool::ImageGeneration::size ) -> OpenAI::Models::Responses::Tool::ImageGeneration::size @@ -761,9 +761,13 @@ module OpenAI # `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`, # set the output format to `png` or `webp`. # @param input_fidelity - # Controls fidelity to the original input image(s). This parameter is supported - # for GPT image models that support input fidelity. `gpt-image-2` and - # `gpt-image-2-2026-04-21` ignore this parameter. + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. Supported models accept `high` and + # `low`, except `gpt-image-1-mini`, which accepts only `low`. Defaults to `low` on + # models that support this parameter. Omit this parameter for `gpt-image-2`, + # `gpt-image-2-2026-04-21`, and other models that do not support it. See the + # [image input fidelity guide](https://developers.openai.com/api/docs/guides/image-generation#image-input-fidelity) + # for model-specific guidance. # @param input_image_mask # Optional mask for inpainting. Contains `image_url` (string, optional) and # `file_id` (string, optional). @@ -798,9 +802,7 @@ module OpenAI # the maximum supported resolution is `3840x2160`. The requested size must also # satisfy the model's current pixel and edge limits. The standard sizes # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; - # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use - # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of - # `1024x1024`, `1792x1024`, or `1024x1792`. + # `auto` is supported for models that allow automatic sizing. # @param type # The type of the image generation tool. Always `image_generation`. def initialize: (