@@ -579,9 +579,14 @@ export interface ImageEditParamsBase {
579579
580580 /**
581581 * Allows to set transparency for the background of the generated image(s). This
582- * parameter is only supported for the GPT image models. Must be one of
583- * `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
584- * model will automatically determine the best background for the image.
582+ * parameter is only supported for GPT image models that support transparent
583+ * backgrounds. Must be one of `transparent`, `opaque`, or `auto` (default value).
584+ * When `auto` is used, the model will automatically determine the best background
585+ * for the image.
586+ *
587+ * `gpt-image-2` and `gpt-image-2-2026-04-21` do not support transparent
588+ * backgrounds. Requests with `background` set to `transparent` will return an
589+ * error for these models; use `opaque` or `auto` instead.
585590 *
586591 * If `transparent`, the output format needs to support transparency, so it should
587592 * be set to either `png` (default value) or `webp`.
@@ -656,11 +661,19 @@ export interface ImageEditParamsBase {
656661 response_format ?: 'url' | 'b64_json' | null ;
657662
658663 /**
659- * The size of the generated images. Must be one of `1024x1024`, `1536x1024`
660- * (landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image
661- * models, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
664+ * The size of the generated images. For `gpt-image-2` and
665+ * `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT`
666+ * strings, for example `1536x864`. Width and height must both be divisible by 16
667+ * and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above
668+ * `2560x1440` are experimental, and the maximum supported resolution is
669+ * `3840x2160`. The requested size must also satisfy the model's current pixel and
670+ * edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are
671+ * supported by the GPT image models; `auto` is supported for models that allow
672+ * automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or
673+ * `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or
674+ * `1024x1792`.
662675 */
663- size ?: '256x256' | '512x512' | '1024x1024' | '1536x1024' | '1024x1536' | 'auto' | null ;
676+ size ?: string | null ;
664677
665678 /**
666679 * Edit the image in streaming mode. Defaults to `false`. See the
@@ -712,9 +725,14 @@ export interface ImageGenerateParamsBase {
712725
713726 /**
714727 * Allows to set transparency for the background of the generated image(s). This
715- * parameter is only supported for the GPT image models. Must be one of
716- * `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
717- * model will automatically determine the best background for the image.
728+ * parameter is only supported for GPT image models that support transparent
729+ * backgrounds. Must be one of `transparent`, `opaque`, or `auto` (default value).
730+ * When `auto` is used, the model will automatically determine the best background
731+ * for the image.
732+ *
733+ * `gpt-image-2` and `gpt-image-2-2026-04-21` do not support transparent
734+ * backgrounds. Requests with `background` set to `transparent` will return an
735+ * error for these models; use `opaque` or `auto` instead.
718736 *
719737 * If `transparent`, the output format needs to support transparency, so it should
720738 * be set to either `png` (default value) or `webp`.
@@ -785,21 +803,19 @@ export interface ImageGenerateParamsBase {
785803 response_format ?: 'url' | 'b64_json' | null ;
786804
787805 /**
788- * The size of the generated images. Must be one of `1024x1024`, `1536x1024`
789- * (landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image
790- * models, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and one of
791- * `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.
792- */
793- size ?:
794- | 'auto'
795- | '1024x1024'
796- | '1536x1024'
797- | '1024x1536'
798- | '256x256'
799- | '512x512'
800- | '1792x1024'
801- | '1024x1792'
802- | null ;
806+ * The size of the generated images. For `gpt-image-2` and
807+ * `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT`
808+ * strings, for example `1536x864`. Width and height must both be divisible by 16
809+ * and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above
810+ * `2560x1440` are experimental, and the maximum supported resolution is
811+ * `3840x2160`. The requested size must also satisfy the model's current pixel and
812+ * edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are
813+ * supported by the GPT image models; `auto` is supported for models that allow
814+ * automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or
815+ * `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or
816+ * `1024x1792`.
817+ */
818+ size ?: string | null ;
803819
804820 /**
805821 * Generate the image in streaming mode. Defaults to `false`. See the
0 commit comments