
    eiu                      S SK Jr  S SKJrJrJrJr  S SKJrJ	r	  S SK
r
SSKJr  SSKJrJrJr  SSKJrJrJrJrJrJrJrJrJr  SS	KJrJrJrJrJ r   SS
K!J"r"  SSK#J$r$J%r%  SSK&J'r'J(r(  SSK)J*r*J+r+  SSK,J-r-  SSK.J/r/  SSK0J1r1  SSK2J3r3  SSK4J5r5  SS/r6 " S S\$5      r7 " S S\%5      r8 " S S5      r9 " S S5      r: " S S5      r; " S S5      r<g)    )annotations)UnionMappingOptionalcast)LiteraloverloadN   )_legacy_response)image_edit_paramsimage_generate_paramsimage_create_variation_params)	BodyOmitQueryHeadersNotGiven	FileTypesSequenceNotStromit	not_given)extract_filesrequired_argsmaybe_transformdeepcopy_minimal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                     \ rS rSr\SS j5       r\SS j5       r\\\\\SSS\S.	                     SS jjr	\
\\\\\\\\\\\\\SSS\S.                                       SS jj5       r\
\\\\\\\\\\\\SSS\S.                                       SS jj5       r\
\\\\\\\\\\\\SSS\S.                                       SS jj5       r\" SS	// SQ5      \\\\\\\\\\\\\SSS\S.                                       SS jj5       r\
\\\\\\\\\\\\\SSS\S.                                     SS jj5       r\
\\\\\\\\\\\\SSS\S.                                     S S jj5       r\
\\\\\\\\\\\\SSS\S.                                     S!S jj5       r\" S	/S	S
/5      \\\\\\\\\\\\\SSS\S.                                     S"S jj5       rSrg)#r)      c                    [        U 5      $ z
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    e/var/www/html/BTCUSD/btcusdt_trading_app/venv/lib/python3.13/site-packages/openai/resources/images.pywith_raw_responseImages.with_raw_response   s     %T**    c                    [        U 5      $ 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_responseImages.with_streaming_response&   s     +400r5   N	modelnresponse_formatsizeuserextra_headersextra_query
extra_bodytimeoutimagec       
            [        UUUUUUS.5      n[        [        [        [        [
        4   U5      S//S9nSS0U=(       d    0 EnU R                  S[        U[        R                  5      U[        XxXS9[        S9$ )	`  Creates a variation of a given image.

This endpoint only supports `dall-e-2`.

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 model to use for image generation. Only `dall-e-2` is supported at this
      time.

  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://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).

  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
rE   r<   r=   r>   r?   r@   rE   pathsContent-Typemultipart/form-data/images/variationsrA   rB   rC   rD   bodyfilesoptionscast_to)r   r   r   r   strobject_postr   r   ImageCreateVariationParamsr$   r&   r1   rE   r<   r=   r>   r?   r@   rA   rB   rC   rD   rP   rQ   s                r2   create_variationImages.create_variation/   s    `  #2	
 d73;#7>ykR ()>X=CVTVXzz  'D'_'_`(+Q[ #  
 	
r5   
backgroundinput_fidelitymaskr<   r=   output_compressionoutput_formatpartial_imagesqualityr>   r?   streamr@   rA   rB   rC   rD   promptrc   c                   gaM  Creates an edited or extended image given one or more source images and a
prompt.

This endpoint only supports `gpt-image-1` and `dall-e-2`.

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

      For `gpt-image-1`, 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.

  prompt: A text description of the desired image(s). The maximum length is 1000
      characters for `dall-e-2`, and 32000 characters for `gpt-image-1`.

  background: Allows to set transparency for the background of the generated image(s). This
      parameter is only supported for `gpt-image-1`. 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.

      If `transparent`, the output format needs to support transparency, so it should
      be set to either `png` (default value) or `webp`.

  input_fidelity: 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`. Unsupported for `gpt-image-1-mini`. Supports `high` and
      `low`. Defaults to `low`.

  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 model to use for image generation. Only `dall-e-2` and `gpt-image-1` are
      supported. Defaults to `dall-e-2` unless a parameter specific to `gpt-image-1`
      is used.

  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 `gpt-image-1` 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 `gpt-image-1`. 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. `high`, `medium` and `low` are
      only supported for `gpt-image-1`. `dall-e-2` only supports `standard` quality.
      Defaults to `auto`.

  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`, as `gpt-image-1`
      will always return base64-encoded images.

  size: The size of the generated images. Must be one of `1024x1024`, `1536x1024`
      (landscape), `1024x1536` (portrait), or `auto` (default value) for
      `gpt-image-1`, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.

  stream: Edit the image in streaming mode. Defaults to `false`. See the
      [Image generation guide](https://platform.openai.com/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://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).

  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   rE   rd   r\   r]   r^   r<   r=   r_   r`   ra   rb   r>   r?   rc   r@   rA   rB   rC   rD   s                       r2   editImages.editx       ^ 	r5   r\   r]   r^   r<   r=   r_   r`   ra   rb   r>   r?   r@   rA   rB   rC   rD   c                   gaM  Creates an edited or extended image given one or more source images and a
prompt.

This endpoint only supports `gpt-image-1` and `dall-e-2`.

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

      For `gpt-image-1`, 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.

  prompt: A text description of the desired image(s). The maximum length is 1000
      characters for `dall-e-2`, and 32000 characters for `gpt-image-1`.

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

  background: Allows to set transparency for the background of the generated image(s). This
      parameter is only supported for `gpt-image-1`. 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.

      If `transparent`, the output format needs to support transparency, so it should
      be set to either `png` (default value) or `webp`.

  input_fidelity: 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`. Unsupported for `gpt-image-1-mini`. Supports `high` and
      `low`. Defaults to `low`.

  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 model to use for image generation. Only `dall-e-2` and `gpt-image-1` are
      supported. Defaults to `dall-e-2` unless a parameter specific to `gpt-image-1`
      is used.

  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 `gpt-image-1` 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 `gpt-image-1`. 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. `high`, `medium` and `low` are
      only supported for `gpt-image-1`. `dall-e-2` only supports `standard` quality.
      Defaults to `auto`.

  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`, as `gpt-image-1`
      will always return base64-encoded images.

  size: The size of the generated images. Must be one of `1024x1024`, `1536x1024`
      (landscape), `1024x1536` (portrait), or `auto` (default value) for
      `gpt-image-1`, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.

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

  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   rE   rd   rc   r\   r]   r^   r<   r=   r_   r`   ra   rb   r>   r?   r@   rA   rB   rC   rD   s                       r2   ri   rj      rk   r5   c                   grn   rg   ro   s                       r2   ri   rj   Z  rk   r5   rE   rd   rc   c               z   [        UUUUUUUUU	U
UUUUUS.5      n[        [        [        [        [
        4   U5      S/SS/S//S9nSS0U=(       d    0 EnU R                  S[        UU(       a  [        R                  O[        R                  5      U[        UUUUS	9[        U=(       d    S
[        [           S9$ N)rE   rd   r\   r]   r^   r<   r=   r_   r`   ra   rb   r>   r?   rc   r@   rE   z<array>r^   rI   rK   rL   z/images/editsrN   F)rP   rQ   rR   rS   rc   
stream_cls)r   r   r   r   rT   rU   rV   r   r   ImageEditParamsStreamingImageEditParamsNonStreamingr$   r&   r"   r(   r1   rE   rd   r\   r]   r^   r<   r=   r_   r`   ra   rb   r>   r?   rc   r@   rA   rB   rC   rD   rP   rQ   s                         r2   ri   rj     s    4   ("0&8!."0"#2 
& d73;#7>ySZ\eRfiohpFqr ()>X=CVTVXzz >D!::J[JwJw (+Q[el #?U23  
 	
r5   r\   r<   
moderationr=   r_   r`   ra   rb   r>   r?   rc   styler@   rA   rB   rC   rD   c                   ga  
Creates an image given a prompt.
[Learn more](https://platform.openai.com/docs/guides/images).

Args:
  prompt: A text description of the desired image(s). The maximum length is 32000
      characters for `gpt-image-1`, 1000 characters for `dall-e-2` and 4000 characters
      for `dall-e-3`.

  background: Allows to set transparency for the background of the generated image(s). This
      parameter is only supported for `gpt-image-1`. 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.

      If `transparent`, the output format needs to support transparency, so it should
      be set to either `png` (default value) or `webp`.

  model: The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or
      `gpt-image-1`. Defaults to `dall-e-2` unless a parameter specific to
      `gpt-image-1` is used.

  moderation: Control the content-moderation level for images generated by `gpt-image-1`. 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. For `dall-e-3`, only
      `n=1` is supported.

  output_compression: The compression level (0-100%) for the generated images. This parameter is only
      supported for `gpt-image-1` 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 `gpt-image-1`. 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 `gpt-image-1`.
      - `hd` and `standard` are supported for `dall-e-3`.
      - `standard` is the only option for `dall-e-2`.

  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
      `gpt-image-1` which will always return base64-encoded images.

  size: The size of the generated images. Must be one of `1024x1024`, `1536x1024`
      (landscape), `1024x1536` (portrait), or `auto` (default value) for
      `gpt-image-1`, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and
      one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.

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

  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.

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

  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<   ry   r=   r_   r`   ra   rb   r>   r?   rc   rz   r@   rA   rB   rC   rD   s                      r2   generateImages.generate      X 	r5   r\   r<   ry   r=   r_   r`   ra   rb   r>   r?   rz   r@   rA   rB   rC   rD   c                   ga  
Creates an image given a prompt.
[Learn more](https://platform.openai.com/docs/guides/images).

Args:
  prompt: A text description of the desired image(s). The maximum length is 32000
      characters for `gpt-image-1`, 1000 characters for `dall-e-2` and 4000 characters
      for `dall-e-3`.

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

  background: Allows to set transparency for the background of the generated image(s). This
      parameter is only supported for `gpt-image-1`. 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.

      If `transparent`, the output format needs to support transparency, so it should
      be set to either `png` (default value) or `webp`.

  model: The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or
      `gpt-image-1`. Defaults to `dall-e-2` unless a parameter specific to
      `gpt-image-1` is used.

  moderation: Control the content-moderation level for images generated by `gpt-image-1`. 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. For `dall-e-3`, only
      `n=1` is supported.

  output_compression: The compression level (0-100%) for the generated images. This parameter is only
      supported for `gpt-image-1` 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 `gpt-image-1`. 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 `gpt-image-1`.
      - `hd` and `standard` are supported for `dall-e-3`.
      - `standard` is the only option for `dall-e-2`.

  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
      `gpt-image-1` which will always return base64-encoded images.

  size: The size of the generated images. Must be one of `1024x1024`, `1536x1024`
      (landscape), `1024x1536` (portrait), or `auto` (default value) for
      `gpt-image-1`, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and
      one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.

  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.

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

  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<   ry   r=   r_   r`   ra   rb   r>   r?   rz   r@   rA   rB   rC   rD   s                      r2   r~   r   z  r   r5   c                   gr   rg   r   s                      r2   r~   r     r   r5   c                   U R                  S[        UUUUUUUUU	U
UUUUS.U(       a  [        R                  O[        R                  5      [        UUUUS9[        U=(       d    S[        [           S9$ Nz/images/generations)rd   r\   r<   ry   r=   r_   r`   ra   rb   r>   r?   rc   rz   r@   rN   F)rP   rR   rS   rc   rt   )	rV   r   r   ImageGenerateParamsStreamingImageGenerateParamsNonStreamingr$   r&   r"   r'   r}   s                      r2   r~   r   V  s    8 zz! $","",*<%2&4&'6 $" "  &BB*JJ'* )+Q[el #?U129  
 	
r5   rg   )returnr/   )r   r8   rE   r   r<   #Union[str, ImageModel, None] | Omitr=   Optional[int] | Omitr>   +Optional[Literal['url', 'b64_json']] | Omitr?   z;Optional[Literal['256x256', '512x512', '1024x1024']] | Omitr@   
str | OmitrA   Headers | NonerB   Query | NonerC   Body | NonerD   'float | httpx.Timeout | None | NotGivenr   r&   (rE   +Union[FileTypes, SequenceNotStr[FileTypes]]rd   rT   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   EOptional[Literal['standard', 'low', 'medium', 'high', 'auto']] | Omitr>   r   r?   ]Optional[Literal['256x256', '512x512', '1024x1024', '1536x1024', '1024x1536', 'auto']] | Omitrc   Optional[Literal[False]] | Omitr@   r   rA   r   rB   r   rC   r   rD   r   r   r&   )(rE   r   rd   rT   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   rA   r   rB   r   rC   r   rD   r   r   zStream[ImageEditStreamEvent])(rE   r   rd   rT   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   rA   r   rB   r   rC   r   rD   r   r   -ImagesResponse | Stream[ImageEditStreamEvent])(rE   r   rd   rT   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   rA   r   rB   r   rC   r   rD   r   r   r   &rd   rT   r\   r   r<   r   ry   'Optional[Literal['low', 'auto']] | Omitr=   r   r_   r   r`   r   ra   r   rb   KOptional[Literal['standard', 'hd', 'low', 'medium', 'high', 'auto']] | Omitr>   r   r?   wOptional[Literal['auto', '1024x1024', '1536x1024', '1024x1536', '256x256', '512x512', '1792x1024', '1024x1792']] | Omitrc   r   rz   ,Optional[Literal['vivid', 'natural']] | Omitr@   r   rA   r   rB   r   rC   r   rD   r   r   r&   )&rd   rT   rc   r   r\   r   r<   r   ry   r   r=   r   r_   r   r`   r   ra   r   rb   r   r>   r   r?   r   rz   r   r@   r   rA   r   rB   r   rC   r   rD   r   r   zStream[ImageGenStreamEvent])&rd   rT   rc   r   r\   r   r<   r   ry   r   r=   r   r_   r   r`   r   ra   r   rb   r   r>   r   r?   r   rz   r   r@   r   rA   r   rB   r   rC   r   rD   r   r   ,ImagesResponse | Stream[ImageGenStreamEvent])&rd   rT   r\   r   r<   r   ry   r   r=   r   r_   r   r`   r   ra   r   rb   r   r>   r   r?   r   rc   r   rz   r   r@   r   rA   r   rB   r   rC   r   rD   r   r   r   __name__
__module____qualname____firstlineno__r   r3   r9   r   r   rY   r	   ri   r   r~   __static_attributes__rg   r5   r2   r)   r)      s
   + + 1 1 6:"&GKLP )-$("&;DG
 G
 3	G

  G
 EG
 JG
 G
 &G
 "G
  G
 9G
 
G
R  QUBF!%59"&37IM/3Y]GKnr26 )-$("&;D/n ;n 	n
 Nn @n n 3n  n 1n Gn -n Wn En ln  0!n" #n( &)n* "+n,  -n. 9/n0 
1n n`  QUBF!%59"&37IM/3Y]GKnr )-$("&;D/n ;n 	n
 n Nn @n n 3n  n 1n Gn -n Wn En  l!n" #n( &)n* "+n,  -n. 9/n0 
&1n n`  QUBF!%59"&37IM/3Y]GKnr )-$("&;D/n ;n 	n
 n Nn @n n 3n  n 1n Gn -n Wn En  l!n" #n( &)n* "+n,  -n. 9/n0 
71n n` GX&(EF QUBF!%59"&37IM/3Y]GKnrBF )-$("&;D/>
 ;>
 	>

 N>
 @>
 >
 3>
  >
 1>
 G>
 ->
 W>
 E>
 l>
  @!>
" #>
( &)>
* "+>
,  ->
. 9/>
0 
71>
 G>
@ 
 QU59>B"&37IM/3_cGK 26>B )-$("&;D3k k N	k
 3k <k  k 1k Gk -k ]k Ekk" 0#k$ <%k& 'k, &-k. "/k0  1k2 93k4 
5k kZ  QU59>B"&37IM/3_cGK >B )-$("&;D3k k 	k
 Nk 3k <k  k 1k Gk -k ]k Ekk$ <%k& 'k, &-k. "/k0  1k2 93k4 
%5k kZ  QU59>B"&37IM/3_cGK >B )-$("&;D3k k 	k
 Nk 3k <k  k 1k Gk -k ]k Ekk$ <%k& 'k, &-k. "/k0  1k2 93k4 
65k kZ H:(34
 QU59>B"&37IM/3_cGK BF>B )-$("&;D38
 8
 N	8

 38
 <8
  8
 18
 G8
 -8
 ]8
 E8
8
" @#8
$ <%8
& '8
, &-8
. "/8
0  18
2 938
4 
658
 58
r5   c                     \ rS rSr\SS j5       r\SS j5       r\\\\\SSS\S.	                     SS jjr	\
\\\\\\\\\\\\\SSS\S.                                       SS jj5       r\
\\\\\\\\\\\\SSS\S.                                       SS jj5       r\
\\\\\\\\\\\\SSS\S.                                       SS jj5       r\" SS	// SQ5      \\\\\\\\\\\\\SSS\S.                                       SS jj5       r\
\\\\\\\\\\\\\SSS\S.                                     SS jj5       r\
\\\\\\\\\\\\SSS\S.                                     S S jj5       r\
\\\\\\\\\\\\SSS\S.                                     S!S jj5       r\" S	/S	S
/5      \\\\\\\\\\\\\SSS\S.                                     S"S jj5       rSrg)#r*   i  c                    [        U 5      $ r.   )AsyncImagesWithRawResponser0   s    r2   r3   AsyncImages.with_raw_response  s     *$//r5   c                    [        U 5      $ r7   ) AsyncImagesWithStreamingResponser0   s    r2   r9   #AsyncImages.with_streaming_response  s     055r5   Nr;   rE   c       
        0  #    [        UUUUUUS.5      n[        [        [        [        [
        4   U5      S//S9nSS0U=(       d    0 EnU R                  S[        U[        R                  5      I Sh  vN U[        XxXS9[        S	9I Sh  vN $  N N7f)
rG   rH   rE   rI   rK   rL   rM   NrN   rO   )r   r   r   r   rT   rU   rV   r   r   rW   r$   r&   rX   s                r2   rY   AsyncImages.create_variation  s     `  #2	
 d73;#7>ykR ()>X=CVTVXZZ ,T3P3k3kll(+Q[ #   
 
 	
l
s$   A2B4B
5BBBBr[   rd   rc   c                  #    g7frf   rg   rh   s                       r2   ri   AsyncImages.edit       ^ 	   rl   c                  #    g7frn   rg   ro   s                       r2   ri   r   `  r   r   c                  #    g7frn   rg   ro   s                       r2   ri   r     r   r   rq   c                 #    [        UUUUUUUUU	U
UUUUUS.5      n[        [        [        [        [
        4   U5      S/SS/S//S9nSS0U=(       d    0 EnU R                  S[        UU(       a  [        R                  O[        R                  5      I S h  vN U[        UUUUS	9[        U=(       d    S
[        [           S9I S h  vN $  N5 N7frs   )r   r   r   r   rT   rU   rV   r   r   ru   rv   r$   r&   r#   r(   rw   s                         r2   ri   r   B  s    4   ("0&8!."0"#2 
& d73;#7>ySZ\eRfiohpFqr ()>X=CVTVXZZ,>D!::J[JwJw  (+Q[el #?U"#78   
 
 	

s$   BCC
0C
CCCrx   c                  #    g7fr|   rg   r}   s                      r2   r~   AsyncImages.generate       X 	r   r   c                  #    g7fr   rg   r   s                      r2   r~   r     r   r   c                  #    g7fr   rg   r   s                      r2   r~   r   _  r   r   c                 #    U R                  S[        UUUUUUUUU	U
UUUUS.U(       a  [        R                  O[        R                  5      I S h  vN [        UUUUS9[        U=(       d    S[        [           S9I S h  vN $  N4 N7fr   )	rV   r   r   r   r   r$   r&   r#   r'   r}   s                      r2   r~   r     s     8 ZZ!,$","",*<%2&4&'6 $" "  &BB*JJ' * )+Q[el #?U"#679   
 
 	

s$   ABB
/BB	B	Brg   )r   r   )r   r   r   r   )(rE   r   rd   rT   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   rA   r   rB   r   rC   r   rD   r   r   z!AsyncStream[ImageEditStreamEvent])(rE   r   rd   rT   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   rA   r   rB   r   rC   r   rD   r   r   2ImagesResponse | AsyncStream[ImageEditStreamEvent])(rE   r   rd   rT   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   rA   r   rB   r   rC   r   rD   r   r   r   r   )&rd   rT   rc   r   r\   r   r<   r   ry   r   r=   r   r_   r   r`   r   ra   r   rb   r   r>   r   r?   r   rz   r   r@   r   rA   r   rB   r   rC   r   rD   r   r   z AsyncStream[ImageGenStreamEvent])&rd   rT   rc   r   r\   r   r<   r   ry   r   r=   r   r_   r   r`   r   ra   r   rb   r   r>   r   r?   r   rz   r   r@   r   rA   r   rB   r   rC   r   rD   r   r   1ImagesResponse | AsyncStream[ImageGenStreamEvent])&rd   rT   r\   r   r<   r   ry   r   r=   r   r_   r   r`   r   ra   r   rb   r   r>   r   r?   r   rc   r   rz   r   r@   r   rA   r   rB   r   rC   r   rD   r   r   r   r   rg   r5   r2   r*   r*     s
   0 0 6 6 6:"&GKLP )-$("&;DG
 G
 3	G

  G
 EG
 JG
 G
 &G
 "G
  G
 9G
 
G
R  QUBF!%59"&37IM/3Y]GKnr26 )-$("&;D/n ;n 	n
 Nn @n n 3n  n 1n Gn -n Wn En ln  0!n" #n( &)n* "+n,  -n. 9/n0 
1n n`  QUBF!%59"&37IM/3Y]GKnr )-$("&;D/n ;n 	n
 n Nn @n n 3n  n 1n Gn -n Wn En  l!n" #n( &)n* "+n,  -n. 9/n0 
+1n n`  QUBF!%59"&37IM/3Y]GKnr )-$("&;D/n ;n 	n
 n Nn @n n 3n  n 1n Gn -n Wn En  l!n" #n( &)n* "+n,  -n. 9/n0 
<1n n` GX&(EF QUBF!%59"&37IM/3Y]GKnrBF )-$("&;D/>
 ;>
 	>

 N>
 @>
 >
 3>
  >
 1>
 G>
 ->
 W>
 E>
 l>
  @!>
" #>
( &)>
* "+>
,  ->
. 9/>
0 
<1>
 G>
@ 
 QU59>B"&37IM/3_cGK 26>B )-$("&;D3k k N	k
 3k <k  k 1k Gk -k ]k Ekk" 0#k$ <%k& 'k, &-k. "/k0  1k2 93k4 
5k kZ  QU59>B"&37IM/3_cGK >B )-$("&;D3k k 	k
 Nk 3k <k  k 1k Gk -k ]k Ekk$ <%k& 'k, &-k. "/k0  1k2 93k4 
*5k kZ  QU59>B"&37IM/3_cGK >B )-$("&;D3k k 	k
 Nk 3k <k  k 1k Gk -k ]k Ekk$ <%k& 'k, &-k. "/k0  1k2 93k4 
;5k kZ H:(34
 QU59>B"&37IM/3_cGK BF>B )-$("&;D38
 8
 N	8

 38
 <8
  8
 18
 G8
 -8
 ]8
 E8
8
" @#8
$ <%8
& '8
, &-8
. "/8
0  18
2 938
4 
;58
 58
r5   c                      \ rS rSrSS jrSrg)r/   i	  c                    Xl         [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR
                  5      U l        g N)_imagesr   to_raw_response_wrapperrY   ri   r~   r1   imagess     r2   __init__ImagesWithRawResponse.__init__
  sY     0 H H##!
 %<<KK
	 )@@OO
r5   r   rY   ri   r~   Nr   r)   r   Noner   r   r   r   r   r   rg   r5   r2   r/   r/   	      
r5   r/   c                      \ rS rSrSS jrSrg)r   i  c                    Xl         [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR
                  5      U l        g r   )r   r   async_to_raw_response_wrapperrY   ri   r~   r   s     r2   r   #AsyncImagesWithRawResponse.__init__  sY     0 N N##!
 %BBKK
	 )FFOO
r5   r   Nr   r*   r   r   r   rg   r5   r2   r   r     r   r5   r   c                      \ rS rSrSS jrSrg)r8   i'  c                    Xl         [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        g r   )r   r    rY   ri   r~   r   s     r2   r   $ImagesWithStreamingResponse.__init__(  sG     <##!
 1KK
	 5OO
r5   r   Nr   r   rg   r5   r2   r8   r8   '  r   r5   r8   c                      \ rS rSrSS jrSrg)r   i6  c                    Xl         [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        g r   )r   r!   rY   ri   r~   r   s     r2   r   )AsyncImagesWithStreamingResponse.__init__7  sG     B##!
 7KK
	 ;OO
r5   r   Nr   r   rg   r5   r2   r   r   6  r   r5   r   )=
__future__r   typingr   r   r   r   typing_extensionsr   r	   httpx r   typesr   r   r   _typesr   r   r   r   r   r   r   r   r   _utilsr   r   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   r8   r   rg   r5   r2   <module>r      s    # 1 1 /   [ [ e e e k k % 9 X , / * 2 > @]
#t
_ t
nt
" t
n
 

 

 

 
r5   