Ë
    ïÏj{¨ ã                  ó´  — d dl mZ d dlZd dlmZmZmZmZ d dlmZm	Z	 d dl
Z
ddlmZ ddlmZmZmZ ddlmZ dd	lmZmZmZmZmZmZmZmZmZ dd
lmZmZm Z m!Z! ddl"m#Z# ddl$m%Z%m&Z& ddl'm(Z(m)Z) ddl*m+Z+m,Z, ddl-m.Z. ddl/m0Z0 ddl1m2Z2 ddl3m4Z4 ddl5m6Z6 ddgZ7 G d„ de%«      Z8 G d„ de&«      Z9 G d„ d«      Z: G d„ d«      Z; G d„ d«      Z< G d„ d«      Z=y) é    )ÚannotationsN)ÚUnionÚMappingÚOptionalÚcast)ÚLiteralÚoverloadé   )Ú_legacy_response)Úimage_edit_paramsÚimage_generate_paramsÚimage_create_variation_params)Údeepcopy_with_paths)	ÚBodyÚOmitÚQueryÚHeadersÚNotGivenÚ	FileTypesÚSequenceNotStrÚomitÚ	not_given)Úextract_filesÚrequired_argsÚmaybe_transformÚasync_maybe_transform)Úcached_property)ÚSyncAPIResourceÚAsyncAPIResource)Úto_streamed_response_wrapperÚ"async_to_streamed_response_wrapper)ÚStreamÚAsyncStream)Úmake_request_options)Ú
ImageModel)ÚImagesResponse)ÚImageGenStreamEvent)ÚImageEditStreamEventÚImagesÚAsyncImagesc                  óè  — e Zd ZdZedd„«       Zedd„«       Z ej                  d«      e	e	e	e	e	ddde
dœ		 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„«       Zee	e	e	e	e	e	e	e	e	e	e	e	e	ddde
d	œ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„«       Zee	e	e	e	e	e	e	e	e	e	e	e	ddde
dœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„«       Zee	e	e	e	e	e	e	e	e	e	e	e	ddde
dœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„«       Z edd
gg d¢«      e	e	e	e	e	e	e	e	e	e	e	e	e	ddde
d	œ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„«       Zee	e	e	e	e	e	e	e	e	e	e	e	e	ddde
dœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„«       Zee	e	e	e	e	e	e	e	e	e	e	e	ddde
dœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d d„«       Zee	e	e	e	e	e	e	e	e	e	e	e	ddde
dœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d!d„«       Z ed
gd
dg«      e	e	e	e	e	e	e	e	e	e	e	e	e	ddde
dœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d"d„«       Zy)#r)   úJGiven a prompt and/or an input image, the model will generate a new image.c                ó   — t        | «      S ©a  
        This property can be used as a prefix for any HTTP method call to return
        the raw response object instead of the parsed content.

        For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
        )ÚImagesWithRawResponse©Úselfs    úT/var/www/html/gaurav-v2/venv/lib/python3.12/site-packages/openai/resources/images.pyÚwith_raw_responsezImages.with_raw_response    s   € ô % TÓ*Ð*ó    c                ó   — t        | «      S ©zÌ
        An alternative to `.with_raw_response` that doesn't eagerly read the response body.

        For more information, see https://www.github.com/openai/openai-python#with_streaming_response
        )ÚImagesWithStreamingResponser0   s    r2   Úwith_streaming_responsezImages.with_streaming_response*   s   € ô +¨4Ó0Ð0r4   Ú
deprecatedN©	ÚmodelÚnÚresponse_formatÚsizeÚuserÚextra_headersÚextra_queryÚ
extra_bodyÚtimeoutÚimagec       
        ó  — t        ||||||dœdgg«      }t        t        t        t        t
        f   |«      dgg¬«      }ddi|xs i ¥}| j                  dt        |t        j                  «      |t        |||	|
ddi¬	«      t        ¬
«      S )áË  This endpoint is retired and no longer available.

        Use the image edits endpoint
        with a GPT Image model and a prompt to create a variation of an image. The
        request and response schemas below describe the legacy contract.

        Args:
          image: The image to use as the basis for the variation(s). Must be a valid PNG file,
              less than 4MB, and square.

          model: The legacy model used by the retired image variations endpoint. This endpoint no
              longer accepts requests.

          n: The number of images to generate. Must be between 1 and 10.

          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.

          size: The size of the generated images. Must be one of `256x256`, `512x512`, or
              `1024x1024`.

          user: A unique identifier representing your end-user, which can help OpenAI to monitor
              and detect abuse.
              [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        ©rD   r;   r<   r=   r>   r?   rD   ©ÚpathsúContent-Typeúmultipart/form-dataú/images/variationsÚbearer_authT©r@   rA   rB   rC   Úsecurity©ÚbodyÚfilesÚoptionsÚcast_to)r   r   r   r   ÚstrÚobjectÚ_postr   r   ÚImageCreateVariationParamsr$   r&   ©r1   rD   r;   r<   r=   r>   r?   r@   rA   rB   rC   rQ   rR   s                r2   Úcreate_variationzImages.create_variation3   s·   € ôf #àØØØ#2ØØñð ˆYˆKó

ˆô œd¤7¬3´¨;Ñ#7¸Ó>ÈÀyÀkÔRˆð (Ð)>ÐXÀ=ÒCVÐTVÐXˆØ�z‰zØ Ü  Ô'D×'_Ñ'_Ó`ØÜ(Ø+Ø'Ø%ØØ'¨Ð.ôô #ð ó 
ð 	
r4   ©Ú
backgroundÚinput_fidelityÚmaskr;   r<   Úoutput_compressionÚoutput_formatÚpartial_imagesÚqualityr=   r>   Ústreamr?   r@   rA   rB   rC   Úpromptrc   c                ó   — y©a»  Creates an edited or extended image given one or more source images and a
        prompt.

        This endpoint supports GPT Image models.

        Args:
          image: The image(s) to edit. Must be a supported image file or an array of images.

              For the GPT image models (`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`, and `chatgpt-image-latest`), each image should
              be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16
              images.

          prompt: A text description of the desired image(s). The maximum length is 32000
              characters for the GPT image models.

          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,
              the model will automatically determine the best background for the image.

              `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08`
              snapshots, support `opaque` and `transparent` backgrounds. Transparent
              backgrounds are available for supported GPT Image models. For `gpt-image-2` and
              `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
              set the output format to `png` or `webp`.

          input_fidelity: Control how much effort the model will exert to match the style and features,
              especially facial features, of input images. Supports `high` and `low` on
              `gpt-image-1` and `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For
              `gpt-image-2`, omit this parameter. Defaults to `low` on supported models.

          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,
              the mask will be applied on the first image. Must be a valid PNG file, less than
              4MB, and have the same dimensions as `image`.

          model: 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`).

          n: The number of images to generate. Must be between 1 and 10.

          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
              defaults to 100.

          output_format: The format in which the generated images are returned. This parameter is only
              supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`. The
              default value is `png`.

          partial_images: The number of partial images to generate. This parameter is used for streaming
              responses that return partial images. Value must be between 0 and 3. When set to
              0, the response will be a single image sent in one streaming event.

              Note that the final image may be sent before the full number of partial images
              are generated if the full image is generated more quickly.

          quality: The quality of the image that will be generated for GPT image models. The GPT
              image models support `low`, `medium`, and `high`. `gpt-image-2.5-sunburst` and
              `gpt-image-2.5-flare`, including their `2026-09-08` snapshots, also support
              `xhigh` and `max`. Defaults to `auto`.

          response_format: Legacy response format parameter for retired image models. Unsupported for GPT
              image models, which always return base64-encoded images.

          size: The size of the generated images. Defaults to `auto`. 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.

          stream: Edit the image in streaming mode. Defaults to `false`. See the
              [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation)
              for more information.

          user: A unique identifier representing your end-user, which can help OpenAI to monitor
              and detect abuse.
              [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        N© ©r1   rD   rd   r\   r]   r^   r;   r<   r_   r`   ra   rb   r=   r>   rc   r?   r@   rA   rB   rC   s                       r2   ÚeditzImages.edit„   ó   € ðx 	r4   ©r\   r]   r^   r;   r<   r_   r`   ra   rb   r=   r>   r?   r@   rA   rB   rC   c                ó   — y©a»  Creates an edited or extended image given one or more source images and a
        prompt.

        This endpoint supports GPT Image models.

        Args:
          image: The image(s) to edit. Must be a supported image file or an array of images.

              For the GPT image models (`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`, and `chatgpt-image-latest`), each image should
              be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16
              images.

          prompt: A text description of the desired image(s). The maximum length is 32000
              characters for the GPT image models.

          stream: Edit the image in streaming mode. Defaults to `false`. See the
              [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation)
              for more information.

          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,
              the model will automatically determine the best background for the image.

              `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08`
              snapshots, support `opaque` and `transparent` backgrounds. Transparent
              backgrounds are available for supported GPT Image models. For `gpt-image-2` and
              `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
              set the output format to `png` or `webp`.

          input_fidelity: Control how much effort the model will exert to match the style and features,
              especially facial features, of input images. Supports `high` and `low` on
              `gpt-image-1` and `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For
              `gpt-image-2`, omit this parameter. Defaults to `low` on supported models.

          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,
              the mask will be applied on the first image. Must be a valid PNG file, less than
              4MB, and have the same dimensions as `image`.

          model: 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`).

          n: The number of images to generate. Must be between 1 and 10.

          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
              defaults to 100.

          output_format: The format in which the generated images are returned. This parameter is only
              supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`. The
              default value is `png`.

          partial_images: The number of partial images to generate. This parameter is used for streaming
              responses that return partial images. Value must be between 0 and 3. When set to
              0, the response will be a single image sent in one streaming event.

              Note that the final image may be sent before the full number of partial images
              are generated if the full image is generated more quickly.

          quality: The quality of the image that will be generated for GPT image models. The GPT
              image models support `low`, `medium`, and `high`. `gpt-image-2.5-sunburst` and
              `gpt-image-2.5-flare`, including their `2026-09-08` snapshots, also support
              `xhigh` and `max`. Defaults to `auto`.

          response_format: Legacy response format parameter for retired image models. Unsupported for GPT
              image models, which always return base64-encoded images.

          size: The size of the generated images. Defaults to `auto`. 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.

          user: A unique identifier representing your end-user, which can help OpenAI to monitor
              and detect abuse.
              [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        Nrg   ©r1   rD   rd   rc   r\   r]   r^   r;   r<   r_   r`   ra   rb   r=   r>   r?   r@   rA   rB   rC   s                       r2   ri   zImages.edit  rj   r4   c                ó   — yrm   rg   rn   s                       r2   ri   zImages.edit€  rj   r4   ©rD   rd   rc   c               ó„  — t        |||||||||	|
|||||dœdgddgdgg«      }t        t        t        t        t
        f   |«      dgddgdgg¬«      }ddi|xs i ¥}| j                  dt        ||rt        j                  nt        j                  «      |t        ||||d	d
i¬«      t        |xs dt        t           ¬«      S ©N)rD   rd   r\   r]   r^   r;   r<   r_   r`   ra   rb   r=   r>   rc   r?   rD   z<array>r^   rH   rJ   rK   z/images/editsrM   TrN   F)rQ   rR   rS   rT   rc   Ú
stream_cls)r   r   r   r   rU   rV   rW   r   r   ÚImageEditParamsStreamingÚImageEditParamsNonStreamingr$   r&   r"   r(   ©r1   rD   rd   r\   r]   r^   r;   r<   r_   r`   ra   rb   r=   r>   rc   r?   r@   rA   rB   rC   rQ   rR   s                         r2   ri   zImages.editþ  s  € ô6 #àØ Ø(Ø"0ØØØØ&8Ø!.Ø"0Ø"Ø#2ØØ Øñð" ˆY˜ )Ð,¨v¨hÐ7ó%
ˆô( œd¤7¬3´¨;Ñ#7¸Ó>ÈÀyÐSZÐ\eÐRfÐioÐhpÐFqÔrˆð (Ð)>ÐXÀ=ÒCVÐTVÐXˆØ�z‰zØÜ ØÙ>DÔ!×:Ò:ÔJ[×JwÑJwóð Ü(Ø+Ø'Ø%ØØ'¨Ð.ôô #Ø’?˜UÜÔ2Ñ3ð! ó 
ð 	
r4   ©r\   r;   Ú
moderationr<   r_   r`   ra   rb   r=   r>   rc   Ústyler?   r@   rA   rB   rC   c                ó   — y©a¼  
        Creates an image given a prompt using a GPT Image model.
        [Learn more](https://developers.openai.com/api/docs/guides/images-vision).

        Args:
          prompt: A text description of the desired image(s). The maximum length is 32000
              characters.

          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,
              the model will automatically determine the best background for the image.

              `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08`
              snapshots, support `opaque` and `transparent` backgrounds. Transparent
              backgrounds are available for supported GPT Image models. For `gpt-image-2` and
              `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
              set the output format to `png` or `webp`.

          model: The GPT image model to use for image generation. Specify a model explicitly.
              Supported models include `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`, and `chatgpt-image-latest`.

          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).

          n: The number of images to generate. Must be between 1 and 10.

          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
              defaults to 100.

          output_format: The format in which the generated images are returned. This parameter is only
              supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.

          partial_images: The number of partial images to generate. This parameter is used for streaming
              responses that return partial images. Value must be between 0 and 3. When set to
              0, the response will be a single image sent in one streaming event.

              Note that the final image may be sent before the full number of partial images
              are generated if the full image is generated more quickly.

          quality: The quality of the image that will be generated.

              - `auto` (default value) will automatically select the best quality for the
                given model.
              - `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`.

          response_format: Legacy response format parameter for retired image models. Unsupported for GPT
              image models, which always return base64-encoded images.

          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`,
              `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.

          stream: Generate the image in streaming mode. Defaults to `false`. See the
              [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation)
              for more information. This parameter is only supported for the GPT image models.

          style: Legacy style parameter for retired image models. Unsupported for GPT image
              models; describe the desired style in the prompt instead.

          user: A unique identifier representing your end-user, which can help OpenAI to monitor
              and detect abuse.
              [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        Nrg   ©r1   rd   r\   r;   rx   r<   r_   r`   ra   rb   r=   r>   rc   ry   r?   r@   rA   rB   rC   s                      r2   ÚgeneratezImages.generateE  ó   € ðf 	r4   ©r\   r;   rx   r<   r_   r`   ra   rb   r=   r>   ry   r?   r@   rA   rB   rC   c                ó   — y©a¼  
        Creates an image given a prompt using a GPT Image model.
        [Learn more](https://developers.openai.com/api/docs/guides/images-vision).

        Args:
          prompt: A text description of the desired image(s). The maximum length is 32000
              characters.

          stream: Generate the image in streaming mode. Defaults to `false`. See the
              [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation)
              for more information. This parameter is only supported for the GPT image models.

          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,
              the model will automatically determine the best background for the image.

              `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08`
              snapshots, support `opaque` and `transparent` backgrounds. Transparent
              backgrounds are available for supported GPT Image models. For `gpt-image-2` and
              `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
              set the output format to `png` or `webp`.

          model: The GPT image model to use for image generation. Specify a model explicitly.
              Supported models include `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`, and `chatgpt-image-latest`.

          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).

          n: The number of images to generate. Must be between 1 and 10.

          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
              defaults to 100.

          output_format: The format in which the generated images are returned. This parameter is only
              supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.

          partial_images: The number of partial images to generate. This parameter is used for streaming
              responses that return partial images. Value must be between 0 and 3. When set to
              0, the response will be a single image sent in one streaming event.

              Note that the final image may be sent before the full number of partial images
              are generated if the full image is generated more quickly.

          quality: The quality of the image that will be generated.

              - `auto` (default value) will automatically select the best quality for the
                given model.
              - `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`.

          response_format: Legacy response format parameter for retired image models. Unsupported for GPT
              image models, which always return base64-encoded images.

          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`,
              `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.

          style: Legacy style parameter for retired image models. Unsupported for GPT image
              models; describe the desired style in the prompt instead.

          user: A unique identifier representing your end-user, which can help OpenAI to monitor
              and detect abuse.
              [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        Nrg   ©r1   rd   rc   r\   r;   rx   r<   r_   r`   ra   rb   r=   r>   ry   r?   r@   rA   rB   rC   s                      r2   r}   zImages.generateº  r~   r4   c                ó   — yr�   rg   r‚   s                      r2   r}   zImages.generate/  r~   r4   c               óè   — | j                  dt        ||||||||||	|
|||dœ|rt        j                  nt        j                  «      t        ||||ddi¬«      t        |xs dt        t           ¬«      S ©Nz/images/generations)r;   rc   rd   r\   rx   r<   r_   r`   ra   rb   r=   r>   ry   r?   rM   TrN   F)rQ   rS   rT   rc   rs   )	rW   r   r   ÚImageGenerateParamsStreamingÚImageGenerateParamsNonStreamingr$   r&   r"   r'   r|   s                      r2   r}   zImages.generate¤  s¡   € ð< �z‰zØ!Ü à"Ø$Ø$Ø",Ø",ØØ*<Ø%2Ø&4Ø&Ø'6Ø Ø"Ø ññ" ô &×BÒBä*×JÑJó'ô* )Ø+Ø'Ø%ØØ'¨Ð.ôô #Ø’?˜UÜÔ1Ñ2ðA ó !
ð !	
r4   )Úreturnr/   )rˆ   r7   ©rD   r   r;   ú#Union[str, ImageModel, None] | Omitr<   úOptional[int] | Omitr=   ú+Optional[Literal['url', 'b64_json']] | Omitr>   z;Optional[Literal['256x256', '512x512', '1024x1024']] | Omitr?   ú
str | Omitr@   úHeaders | NonerA   úQuery | NonerB   úBody | NonerC   ú(float | httpx2.Timeout | None | NotGivenrˆ   r&   ©(rD   ú+Union[FileTypes, SequenceNotStr[FileTypes]]rd   rU   r\   ú9Optional[Literal['transparent', 'opaque', 'auto']] | Omitr]   ú'Optional[Literal['high', 'low']] | Omitr^   úFileTypes | Omitr;   rŠ   r<   r‹   r_   r‹   r`   ú/Optional[Literal['png', 'jpeg', 'webp']] | Omitra   r‹   rb   úUOptional[Literal['low', 'medium', 'high', 'xhigh', 'max', 'auto', 'standard']] | Omitr=   rŒ   r>   úeUnion[str, Literal['1024x1024', '1536x1024', '1024x1536', 'auto', '256x256', '512x512'], None] | Omitrc   úOptional[Literal[False]] | Omitr?   r�   r@   rŽ   rA   r�   rB   r�   rC   r‘   rˆ   r&   )(rD   r“   rd   rU   rc   úLiteral[True]r\   r”   r]   r•   r^   r–   r;   rŠ   r<   r‹   r_   r‹   r`   r—   ra   r‹   rb   r˜   r=   rŒ   r>   r™   r?   r�   r@   rŽ   rA   r�   rB   r�   rC   r‘   rˆ   zStream[ImageEditStreamEvent])(rD   r“   rd   rU   rc   Úboolr\   r”   r]   r•   r^   r–   r;   rŠ   r<   r‹   r_   r‹   r`   r—   ra   r‹   rb   r˜   r=   rŒ   r>   r™   r?   r�   r@   rŽ   rA   r�   rB   r�   rC   r‘   rˆ   ú-ImagesResponse | Stream[ImageEditStreamEvent])(rD   r“   rd   rU   r\   r”   r]   r•   r^   r–   r;   rŠ   r<   r‹   r_   r‹   r`   r—   ra   r‹   rb   r˜   r=   rŒ   r>   r™   rc   ú/Optional[Literal[False]] | Literal[True] | Omitr?   r�   r@   rŽ   rA   r�   rB   r�   rC   r‘   rˆ   r�   ©&rd   rU   r\   r”   r;   rŠ   rx   ú'Optional[Literal['low', 'auto']] | Omitr<   r‹   r_   r‹   r`   r—   ra   r‹   rb   ú[Optional[Literal['low', 'medium', 'high', 'xhigh', 'max', 'auto', 'standard', 'hd']] | Omitr=   rŒ   r>   úUnion[str, Literal['auto', '1024x1024', '1536x1024', '1024x1536', '256x256', '512x512', '1792x1024', '1024x1792'], None] | Omitrc   rš   ry   ú,Optional[Literal['vivid', 'natural']] | Omitr?   r�   r@   rŽ   rA   r�   rB   r�   rC   r‘   rˆ   r&   )&rd   rU   rc   r›   r\   r”   r;   rŠ   rx   r    r<   r‹   r_   r‹   r`   r—   ra   r‹   rb   r¡   r=   rŒ   r>   r¢   ry   r£   r?   r�   r@   rŽ   rA   r�   rB   r�   rC   r‘   rˆ   zStream[ImageGenStreamEvent])&rd   rU   rc   rœ   r\   r”   r;   rŠ   rx   r    r<   r‹   r_   r‹   r`   r—   ra   r‹   rb   r¡   r=   rŒ   r>   r¢   ry   r£   r?   r�   r@   rŽ   rA   r�   rB   r�   rC   r‘   rˆ   ú,ImagesResponse | Stream[ImageGenStreamEvent])&rd   rU   r\   r”   r;   rŠ   rx   r    r<   r‹   r_   r‹   r`   r—   ra   r‹   rb   r¡   r=   rŒ   r>   r¢   rc   rž   ry   r£   r?   r�   r@   rŽ   rA   r�   rB   r�   rC   r‘   rˆ   r¤   ©Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r3   r8   Útyping_extensionsr9   r   r   rZ   r	   ri   r   r}   rg   r4   r2   r)   r)      sF
  „ ÙTàò+ó ð+ð ò1ó ð1ð "Ð×!Ñ! ,Ó/ð
 6:Ø"&ØGKØLPØð )-Ø$(Ø"&Ø<EñN
ð ðN
ð 3ð	N
ð
  ðN
ð EðN
ð JðN
ð ðN
ð &ðN
ð "ðN
ð  ðN
ð :ðN
ð 
òN
ó 0ðN
ð` ð QUØBFØ!%Ø59Ø"&Ø37ØIMØ/3ØimØGKàØ26Øð )-Ø$(Ø"&Ø<Eñ1{ð ;ð{ð ð	{ð
 Nð{ð @ð{ð ð{ð 3ð{ð  ð{ð 1ð{ð Gð{ð -ð{ð gð{ð Eð{ðð{ð" 0ð#{ð$ ð%{ð* &ð+{ð, "ð-{ð.  ð/{ð0 :ð1{ð2 
ò3{ó ð{ðz ð QUØBFØ!%Ø59Ø"&Ø37ØIMØ/3ØimØGKàØð )-Ø$(Ø"&Ø<Eñ1{ð ;ð{ð ð	{ð
 ð{ð Nð{ð @ð{ð ð{ð 3ð{ð  ð{ð 1ð{ð Gð{ð -ð{ð gð{ð Eð{ð ð!{ð$ ð%{ð* &ð+{ð, "ð-{ð.  ð/{ð0 :ð1{ð2 
&ò3{ó ð{ðz ð QUØBFØ!%Ø59Ø"&Ø37ØIMØ/3ØimØGKàØð )-Ø$(Ø"&Ø<Eñ1{ð ;ð{ð ð	{ð
 ð{ð Nð{ð @ð{ð ð{ð 3ð{ð  ð{ð 1ð{ð Gð{ð -ð{ð gð{ð Eð{ð ð!{ð$ ð%{ð* &ð+{ð, "ð-{ð.  ð/{ð0 :ð1{ð2 
7ò3{ó ð{ñz �G˜XÐ&Ò(EÓFð QUØBFØ!%Ø59Ø"&Ø37ØIMØ/3ØimØGKàØBFØð )-Ø$(Ø"&Ø<Eñ1D
ð ;ðD
ð ð	D
ð
 NðD
ð @ðD
ð ðD
ð 3ðD
ð  ðD
ð 1ðD
ð GðD
ð -ðD
ð gðD
ð EðD
ððD
ð" @ð#D
ð$ ð%D
ð* &ð+D
ð, "ð-D
ð.  ð/D
ð0 :ð1D
ð2 
7ò3D
ó GðD
ðL ð
 QUØ59Ø>BØ"&Ø37ØIMØ/3ØosØGKð Ø26Ø>BØð )-Ø$(Ø"&Ø<Eñ7rð ðrð Nð	rð
 3ðrð <ðrð  ðrð 1ðrð Gðrð -ðrð mðrð Eðrððrð& 0ð'rð( <ð)rð* ð+rð0 &ð1rð2 "ð3rð4  ð5rð6 :ð7rð8 
ò9ró ðrðh ð QUØ59Ø>BØ"&Ø37ØIMØ/3ØosØGKð Ø>BØð )-Ø$(Ø"&Ø<Eñ7rð ðrð ð	rð
 Nðrð 3ðrð <ðrð  ðrð 1ðrð Gðrð -ðrð mðrð Eðrððrð( <ð)rð* ð+rð0 &ð1rð2 "ð3rð4  ð5rð6 :ð7rð8 
%ò9ró ðrðh ð QUØ59Ø>BØ"&Ø37ØIMØ/3ØosØGKð Ø>BØð )-Ø$(Ø"&Ø<Eñ7rð ðrð ð	rð
 Nðrð 3ðrð <ðrð  ðrð 1ðrð Gðrð -ðrð mðrð Eðrððrð( <ð)rð* ð+rð0 &ð1rð2 "ð3rð4  ð5rð6 :ð7rð8 
6ò9ró ðrñh �H�: ¨(Ð3Ó4ð
 QUØ59Ø>BØ"&Ø37ØIMØ/3ØosØGKð ØBFØ>BØð )-Ø$(Ø"&Ø<Eñ7>
ð ð>
ð Nð	>
ð
 3ð>
ð <ð>
ð  ð>
ð 1ð>
ð Gð>
ð -ð>
ð mð>
ð Eð>
ðð>
ð& @ð'>
ð( <ð)>
ð* ð+>
ð0 &ð1>
ð2 "ð3>
ð4  ð5>
ð6 :ð7>
ð8 
6ò9>
ó 5ñ>
r4   c                  óè  — e Zd ZdZedd„«       Zedd„«       Z ej                  d«      e	e	e	e	e	ddde
dœ		 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„«       Zee	e	e	e	e	e	e	e	e	e	e	e	e	ddde
d	œ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„«       Zee	e	e	e	e	e	e	e	e	e	e	e	ddde
dœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„«       Zee	e	e	e	e	e	e	e	e	e	e	e	ddde
dœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„«       Z edd
gg d¢«      e	e	e	e	e	e	e	e	e	e	e	e	e	ddde
d	œ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„«       Zee	e	e	e	e	e	e	e	e	e	e	e	e	ddde
dœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„«       Zee	e	e	e	e	e	e	e	e	e	e	e	ddde
dœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d d„«       Zee	e	e	e	e	e	e	e	e	e	e	e	ddde
dœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d!d„«       Z ed
gd
dg«      e	e	e	e	e	e	e	e	e	e	e	e	e	ddde
dœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d"d„«       Zy)#r*   r,   c                ó   — t        | «      S r.   )ÚAsyncImagesWithRawResponser0   s    r2   r3   zAsyncImages.with_raw_responseé  s   € ô *¨$Ó/Ð/r4   c                ó   — t        | «      S r6   )Ú AsyncImagesWithStreamingResponser0   s    r2   r8   z#AsyncImages.with_streaming_responseó  s   € ô 0°Ó5Ð5r4   r9   Nr:   rD   c       
      ƒ  óH  K  — t        ||||||dœdgg«      }t        t        t        t        t
        f   |«      dgg¬«      }ddi|xs i ¥}| j                  dt        |t        j                  «      ƒ d{  –—† |t        |||	|
dd	i¬
«      t        ¬«      ƒ d{  –—† S 7 Œ(7 Œ­w)rF   rG   rD   rH   rJ   rK   rL   NrM   TrN   rP   )r   r   r   r   rU   rV   rW   r   r   rX   r$   r&   rY   s                r2   rZ   zAsyncImages.create_variationü  sÌ   è ø€ ôf #àØØØ#2ØØñð ˆYˆKó

ˆô œd¤7¬3´¨;Ñ#7¸Ó>ÈÀyÀkÔRˆð (Ð)>ÐXÀ=ÒCVÐTVÐXˆØ—Z‘ZØ Ü,¨TÔ3P×3kÑ3kÓl×lØÜ(Ø+Ø'Ø%ØØ'¨Ð.ôô #ð  ó 
÷ 
ð 	
àløð
ús$   ‚A3B"Á5B
Á6#B"ÂB ÂB"Â B"r[   rd   rc   c             ƒ  ó   K  — y­wrf   rg   rh   s                       r2   ri   zAsyncImages.editM  ó   è ø€ ðx 	ùó   ‚rk   c             ƒ  ó   K  — y­wrm   rg   rn   s                       r2   ri   zAsyncImages.editË  r²   r³   c             ƒ  ó   K  — y­wrm   rg   rn   s                       r2   ri   zAsyncImages.editI  r²   r³   rp   c             ƒ  ó´  K  — t        |||||||||	|
|||||dœdgddgdgg«      }t        t        t        t        t
        f   |«      dgddgdgg¬«      }ddi|xs i ¥}| j                  dt        ||rt        j                  nt        j                  «      ƒ d {  –—† |t        ||||d	d
i¬«      t        |xs dt        t           ¬«      ƒ d {  –—† S 7 Œ97 Œ­wrr   )r   r   r   r   rU   rV   rW   r   r   rt   ru   r$   r&   r#   r(   rv   s                         r2   ri   zAsyncImages.editÇ  s'  è ø€ ô6 #àØ Ø(Ø"0ØØØØ&8Ø!.Ø"0Ø"Ø#2ØØ Øñð" ˆY˜ )Ð,¨v¨hÐ7ó%
ˆô( œd¤7¬3´¨;Ñ#7¸Ó>ÈÀyÐSZÐ\eÐRfÐioÐhpÐFqÔrˆð (Ð)>ÐXÀ=ÒCVÐTVÐXˆØ—Z‘ZØÜ,ØÙ>DÔ!×:Ò:ÔJ[×JwÑJwó÷ ð Ü(Ø+Ø'Ø%ØØ'¨Ð.ôô #Ø’?˜UÜ"Ô#7Ñ8ð!  ó 
÷ 
ð 	
ðøð
ús$   ‚BCÂC
Â4CÃCÃCÃCrw   c             ƒ  ó   K  — y­wr{   rg   r|   s                      r2   r}   zAsyncImages.generate  ó   è ø€ ðf 	ùr³   r   c             ƒ  ó   K  — y­wr�   rg   r‚   s                      r2   r}   zAsyncImages.generateƒ  r¸   r³   c             ƒ  ó   K  — y­wr�   rg   r‚   s                      r2   r}   zAsyncImages.generateø  r¸   r³   c             ƒ  ó  K  — | j                  dt        ||||||||||	|
|||dœ|rt        j                  nt        j                  «      ƒ d {  –—† t        ||||ddi¬«      t        |xs dt        t           ¬«      ƒ d {  –—† S 7 Œ87 Œ­wr…   )	rW   r   r   r†   r‡   r$   r&   r#   r'   r|   s                      r2   r}   zAsyncImages.generatem  sº   è ø€ ð< —Z‘ZØ!Ü,à"Ø$Ø$Ø",Ø",ØØ*<Ø%2Ø&4Ø&Ø'6Ø Ø"Ø ññ" ô &×BÒBä*×JÑJó'÷ ô* )Ø+Ø'Ø%ØØ'¨Ð.ôô #Ø’?˜UÜ"Ô#6Ñ7ðA  ó !
÷ !
ð !	
ðøð!
ús$   ‚AB
ÁB
Á3B
ÂBÂB
ÂB
)rˆ   r­   )rˆ   r¯   r‰   r’   )(rD   r“   rd   rU   rc   r›   r\   r”   r]   r•   r^   r–   r;   rŠ   r<   r‹   r_   r‹   r`   r—   ra   r‹   rb   r˜   r=   rŒ   r>   r™   r?   r�   r@   rŽ   rA   r�   rB   r�   rC   r‘   rˆ   z!AsyncStream[ImageEditStreamEvent])(rD   r“   rd   rU   rc   rœ   r\   r”   r]   r•   r^   r–   r;   rŠ   r<   r‹   r_   r‹   r`   r—   ra   r‹   rb   r˜   r=   rŒ   r>   r™   r?   r�   r@   rŽ   rA   r�   rB   r�   rC   r‘   rˆ   ú2ImagesResponse | AsyncStream[ImageEditStreamEvent])(rD   r“   rd   rU   r\   r”   r]   r•   r^   r–   r;   rŠ   r<   r‹   r_   r‹   r`   r—   ra   r‹   rb   r˜   r=   rŒ   r>   r™   rc   rž   r?   r�   r@   rŽ   rA   r�   rB   r�   rC   r‘   rˆ   r¼   rŸ   )&rd   rU   rc   r›   r\   r”   r;   rŠ   rx   r    r<   r‹   r_   r‹   r`   r—   ra   r‹   rb   r¡   r=   rŒ   r>   r¢   ry   r£   r?   r�   r@   rŽ   rA   r�   rB   r�   rC   r‘   rˆ   z AsyncStream[ImageGenStreamEvent])&rd   rU   rc   rœ   r\   r”   r;   rŠ   rx   r    r<   r‹   r_   r‹   r`   r—   ra   r‹   rb   r¡   r=   rŒ   r>   r¢   ry   r£   r?   r�   r@   rŽ   rA   r�   rB   r�   rC   r‘   rˆ   ú1ImagesResponse | AsyncStream[ImageGenStreamEvent])&rd   rU   r\   r”   r;   rŠ   rx   r    r<   r‹   r_   r‹   r`   r—   ra   r‹   rb   r¡   r=   rŒ   r>   r¢   rc   rž   ry   r£   r?   r�   r@   rŽ   rA   r�   rB   r�   rC   r‘   rˆ   r½   r¥   rg   r4   r2   r*   r*   æ  sF
  „ ÙTàò0ó ð0ð ò6ó ð6ð "Ð×!Ñ! ,Ó/ð
 6:Ø"&ØGKØLPØð )-Ø$(Ø"&Ø<EñN
ð ðN
ð 3ð	N
ð
  ðN
ð EðN
ð JðN
ð ðN
ð &ðN
ð "ðN
ð  ðN
ð :ðN
ð 
òN
ó 0ðN
ð` ð QUØBFØ!%Ø59Ø"&Ø37ØIMØ/3ØimØGKàØ26Øð )-Ø$(Ø"&Ø<Eñ1{ð ;ð{ð ð	{ð
 Nð{ð @ð{ð ð{ð 3ð{ð  ð{ð 1ð{ð Gð{ð -ð{ð gð{ð Eð{ðð{ð" 0ð#{ð$ ð%{ð* &ð+{ð, "ð-{ð.  ð/{ð0 :ð1{ð2 
ò3{ó ð{ðz ð QUØBFØ!%Ø59Ø"&Ø37ØIMØ/3ØimØGKàØð )-Ø$(Ø"&Ø<Eñ1{ð ;ð{ð ð	{ð
 ð{ð Nð{ð @ð{ð ð{ð 3ð{ð  ð{ð 1ð{ð Gð{ð -ð{ð gð{ð Eð{ð ð!{ð$ ð%{ð* &ð+{ð, "ð-{ð.  ð/{ð0 :ð1{ð2 
+ò3{ó ð{ðz ð QUØBFØ!%Ø59Ø"&Ø37ØIMØ/3ØimØGKàØð )-Ø$(Ø"&Ø<Eñ1{ð ;ð{ð ð	{ð
 ð{ð Nð{ð @ð{ð ð{ð 3ð{ð  ð{ð 1ð{ð Gð{ð -ð{ð gð{ð Eð{ð ð!{ð$ ð%{ð* &ð+{ð, "ð-{ð.  ð/{ð0 :ð1{ð2 
<ò3{ó ð{ñz �G˜XÐ&Ò(EÓFð QUØBFØ!%Ø59Ø"&Ø37ØIMØ/3ØimØGKàØBFØð )-Ø$(Ø"&Ø<Eñ1D
ð ;ðD
ð ð	D
ð
 NðD
ð @ðD
ð ðD
ð 3ðD
ð  ðD
ð 1ðD
ð GðD
ð -ðD
ð gðD
ð EðD
ððD
ð" @ð#D
ð$ ð%D
ð* &ð+D
ð, "ð-D
ð.  ð/D
ð0 :ð1D
ð2 
<ò3D
ó GðD
ðL ð
 QUØ59Ø>BØ"&Ø37ØIMØ/3ØosØGKð Ø26Ø>BØð )-Ø$(Ø"&Ø<Eñ7rð ðrð Nð	rð
 3ðrð <ðrð  ðrð 1ðrð Gðrð -ðrð mðrð Eðrððrð& 0ð'rð( <ð)rð* ð+rð0 &ð1rð2 "ð3rð4  ð5rð6 :ð7rð8 
ò9ró ðrðh ð QUØ59Ø>BØ"&Ø37ØIMØ/3ØosØGKð Ø>BØð )-Ø$(Ø"&Ø<Eñ7rð ðrð ð	rð
 Nðrð 3ðrð <ðrð  ðrð 1ðrð Gðrð -ðrð mðrð Eðrððrð( <ð)rð* ð+rð0 &ð1rð2 "ð3rð4  ð5rð6 :ð7rð8 
*ò9ró ðrðh ð QUØ59Ø>BØ"&Ø37ØIMØ/3ØosØGKð Ø>BØð )-Ø$(Ø"&Ø<Eñ7rð ðrð ð	rð
 Nðrð 3ðrð <ðrð  ðrð 1ðrð Gðrð -ðrð mðrð Eðrððrð( <ð)rð* ð+rð0 &ð1rð2 "ð3rð4  ð5rð6 :ð7rð8 
;ò9ró ðrñh �H�: ¨(Ð3Ó4ð
 QUØ59Ø>BØ"&Ø37ØIMØ/3ØosØGKð ØBFØ>BØð )-Ø$(Ø"&Ø<Eñ7>
ð ð>
ð Nð	>
ð
 3ð>
ð <ð>
ð  ð>
ð 1ð>
ð Gð>
ð -ð>
ð mð>
ð Eð>
ðð>
ð& @ð'>
ð( <ð)>
ð* ð+>
ð0 &ð1>
ð2 "ð3>
ð4  ð5>
ð6 :ð7>
ð8 
;ò9>
ó 5ñ>
r4   c                  ó   — e Zd Zdd„Zy)r/   c                óê   — || _         t        j                  |j                  «      | _        t        j                  |j                  «      | _        t        j                  |j
                  «      | _        y ©N)Ú_imagesr   Úto_raw_response_wrapperrZ   ri   r}   ©r1   Úimagess     r2   Ú__init__zImagesWithRawResponse.__init__°  s`   € ØˆŒô ×4Ñ4Ø×'Ñ'óð 	Ôô
 %×<Ñ<Ø�K‰Kó
ˆŒ	ô )×@Ñ@Ø�O‰Oó
ˆ�r4   N©rÄ   r)   rˆ   ÚNone©r¦   r§   r¨   rÅ   rg   r4   r2   r/   r/   ¯  ó   „ ô
r4   r/   c                  ó   — e Zd Zdd„Zy)r­   c                óê   — || _         t        j                  |j                  «      | _        t        j                  |j                  «      | _        t        j                  |j
                  «      | _        y rÀ   )rÁ   r   Úasync_to_raw_response_wrapperrZ   ri   r}   rÃ   s     r2   rÅ   z#AsyncImagesWithRawResponse.__init__Á  s`   € ØˆŒô ×:Ñ:Ø×'Ñ'óð 	Ôô
 %×BÑBØ�K‰Kó
ˆŒ	ô )×FÑFØ�O‰Oó
ˆ�r4   N©rÄ   r*   rˆ   rÇ   rÈ   rg   r4   r2   r­   r­   À  rÉ   r4   r­   c                  ó   — e Zd Zdd„Zy)r7   c                ó®   — || _         t        |j                  «      | _        t        |j                  «      | _        t        |j                  «      | _        y rÀ   )rÁ   r    rZ   ri   r}   rÃ   s     r2   rÅ   z$ImagesWithStreamingResponse.__init__Ò  sN   € ØˆŒô )Ø×'Ñ'óð 	Ôô
 1Ø�K‰Kó
ˆŒ	ô 5Ø�O‰Oó
ˆ�r4   NrÆ   rÈ   rg   r4   r2   r7   r7   Ñ  rÉ   r4   r7   c                  ó   — e Zd Zdd„Zy)r¯   c                ó®   — || _         t        |j                  «      | _        t        |j                  «      | _        t        |j                  «      | _        y rÀ   )rÁ   r!   rZ   ri   r}   rÃ   s     r2   rÅ   z)AsyncImagesWithStreamingResponse.__init__ã  sN   € ØˆŒô /Ø×'Ñ'óð 	Ôô
 7Ø�K‰Kó
ˆŒ	ô ;Ø�O‰Oó
ˆ�r4   NrÍ   rÈ   rg   r4   r2   r¯   r¯   â  rÉ   r4   r¯   )>Ú
__future__r   rª   Útypingr   r   r   r   r   r	   Úhttpx2Ú r   Útypesr   r   r   Ú_filesr   Ú_typesr   r   r   r   r   r   r   r   r   Ú_utilsr   r   r   r   Ú_compatr   Ú	_resourcer   r   Ú	_responser    r!   Ú
_streamingr"   r#   Ú_base_clientr$   Útypes.image_modelr%   Útypes.images_responser&   Útypes.image_gen_stream_eventr'   Útypes.image_edit_stream_eventr(   Ú__all__r)   r*   r/   r­   r7   r¯   rg   r4   r2   Ú<module>rä      s    ðõ #ã ß 1Ó 1ß /ã å ß [Ñ [Ý (ß e× eÕ eß YÓ YÝ %ß 9ß Xß ,Ý /Ý *Ý 2Ý >Ý @à�]Ð
#€ôF
ˆ_ô F
ôRF
Ð"ô F
÷R
ñ 
÷"
ñ 
÷"
ñ 
÷"
ò 
r4   