
    2RjQ                      d dl mZ d dlmZ d dlmZ d dl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 ddl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 ddlm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z* ddl+m,Z, ddl-m.Z. ddl/m0Z0 ddl1m2Z2 ddl3m4Z4 ddl5m6Z6 ddl7m8Z8 ddl9m:Z: ddl;m<Z< ddl=m>Z> ddl?m@Z@ ddgZA G d de      ZB G d de      ZC G d d      ZD G d d       ZE G d! d"      ZF G d# d$      ZGy)%    )annotations)List)LiteralN   )_legacy_response)BodyOmitQueryHeadersNotGivenSequenceNotStromit	not_given)maybe_transformasync_maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)make_request_options)usage_costs_paramsusage_images_paramsusage_embeddings_paramsusage_completions_paramsusage_moderations_paramsusage_vector_stores_paramsusage_audio_speeches_paramsusage_web_search_calls_paramsusage_file_search_calls_params!usage_audio_transcriptions_params&usage_code_interpreter_sessions_params)UsageCostsResponse)UsageImagesResponse)UsageEmbeddingsResponse)UsageCompletionsResponse)UsageModerationsResponse)UsageVectorStoresResponse)UsageAudioSpeechesResponse)UsageWebSearchCallsResponse)UsageFileSearchCallsResponse) UsageAudioTranscriptionsResponse)$UsageCodeInterpreterSessionsResponseUsage
AsyncUsagec                  8   e Zd Zedd       Zedd       Z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ddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ	eeeeeeddded
	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ
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ddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ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ddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ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ddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d dZeeeeeeddded
	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d!dZeeeeeeeeeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d"dZy)#r.   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
        )UsageWithRawResponseselfs    q/var/www/html/meridian/meridian-ai/venv/lib/python3.12/site-packages/openai/resources/admin/organization/usage.pywith_raw_responsezUsage.with_raw_response.   s     $D))    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
        )UsageWithStreamingResponser4   s    r6   with_streaming_responsezUsage.with_streaming_response8   s     *$//r8   Napi_key_idsbucket_widthend_timegroup_bylimitmodelspageproject_idsuser_idsextra_headersextra_query
extra_bodytimeoutc                   | j                  dt        ||||t        |||||||||	|
d
t        j                        ddi      t
              S )  
        Get audio speeches usage details for the organization.

        Args:
          start_time: Start time (Unix seconds) of the query time range, inclusive.

          api_key_ids: Return only usage for these API keys.

          bucket_width: Width of each time bucket in response. Currently `1m`, `1h` and `1d` are
              supported, default to `1d`.

          end_time: End time (Unix seconds) of the query time range, exclusive.

          group_by: Group the usage data by the specified fields. Support fields include
              `project_id`, `user_id`, `api_key_id`, `model` or any combination of them.

          limit: Specifies the number of buckets to return.

              - `bucket_width=1d`: default: 7, max: 31
              - `bucket_width=1h`: default: 24, max: 168
              - `bucket_width=1m`: default: 60, max: 1440

          models: Return only usage for these models.

          page: A cursor for use in pagination. Corresponding to the `next_page` field from the
              previous response.

          project_ids: Return only usage for these projects.

          user_ids: Return only usage for these users.

          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
        "/organization/usage/audio_speeches

start_timer>   r?   r@   rA   rB   rC   rD   rE   rF   admin_api_key_authTrG   rH   rI   rJ   querysecurityoptionscast_to)_getr   r   r   UsageAudioSpeechesParamsr)   r5   rO   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   s                  r6   audio_speecheszUsage.audio_speechesA   sw    v yy0(+'%%&0'2(4$,$,!&"( $'2$, 0HH /5), /1  
 	
r8   c                   | j                  dt        ||||t        |||||||||	|
d
t        j                        ddi      t
              S )  
        Get audio transcriptions usage details for the organization.

        Args:
          start_time: Start time (Unix seconds) of the query time range, inclusive.

          api_key_ids: Return only usage for these API keys.

          bucket_width: Width of each time bucket in response. Currently `1m`, `1h` and `1d` are
              supported, default to `1d`.

          end_time: End time (Unix seconds) of the query time range, exclusive.

          group_by: Group the usage data by the specified fields. Support fields include
              `project_id`, `user_id`, `api_key_id`, `model` or any combination of them.

          limit: Specifies the number of buckets to return.

              - `bucket_width=1d`: default: 7, max: 31
              - `bucket_width=1h`: default: 24, max: 168
              - `bucket_width=1m`: default: 60, max: 1440

          models: Return only usage for these models.

          page: A cursor for use in pagination. Corresponding to the `next_page` field from the
              previous response.

          project_ids: Return only usage for these projects.

          user_ids: Return only usage for these users.

          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
        (/organization/usage/audio_transcriptionsrN   rP   TrQ   rT   )rW   r   r   r!   UsageAudioTranscriptionsParamsr,   rY   s                  r6   audio_transcriptionszUsage.audio_transcriptions   sw    v yy6(+'%%&0'2(4$,$,!&"( $'2$, 6TT /5), 51  
 	
r8   
r?   r@   rA   rB   rD   rE   rG   rH   rI   rJ   c                   | j                  dt        ||	|
|t        |||||||dt        j                        ddi      t
              S )  
        Get code interpreter sessions usage details for the organization.

        Args:
          start_time: Start time (Unix seconds) of the query time range, inclusive.

          bucket_width: Width of each time bucket in response. Currently `1m`, `1h` and `1d` are
              supported, default to `1d`.

          end_time: End time (Unix seconds) of the query time range, exclusive.

          group_by: Group the usage data by the specified fields. Support fields include
              `project_id`.

          limit: Specifies the number of buckets to return.

              - `bucket_width=1d`: default: 7, max: 31
              - `bucket_width=1h`: default: 24, max: 168
              - `bucket_width=1m`: default: 60, max: 1440

          page: A cursor for use in pagination. Corresponding to the `next_page` field from the
              previous response.

          project_ids: Return only usage for these projects.

          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
        -/organization/usage/code_interpreter_sessionsrO   r?   r@   rA   rB   rD   rE   rP   TrQ   rT   )rW   r   r   r"   "UsageCodeInterpreterSessionsParamsr-   r5   rO   r?   r@   rA   rB   rD   rE   rG   rH   rI   rJ   s               r6   code_interpreter_sessionszUsage.code_interpreter_sessions   sn    d yy;(+'%%&0(4$,$,!& $'2 ;]] /5#& 9+  
 	
r8   r>   batchr?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   c                   | j                  dt        ||||t        |||||||||	|
|dt        j                        ddi      t
              S )L  
        Get completions usage details for the organization.

        Args:
          start_time: Start time (Unix seconds) of the query time range, inclusive.

          api_key_ids: Return only usage for these API keys.

          batch: If `true`, return batch jobs only. If `false`, return non-batch jobs only. By
              default, return both.

          bucket_width: Width of each time bucket in response. Currently `1m`, `1h` and `1d` are
              supported, default to `1d`.

          end_time: End time (Unix seconds) of the query time range, exclusive.

          group_by: Group the usage data by the specified fields. Support fields include
              `project_id`, `user_id`, `api_key_id`, `model`, `batch`, `service_tier` or any
              combination of them.

          limit: Specifies the number of buckets to return.

              - `bucket_width=1d`: default: 7, max: 31
              - `bucket_width=1h`: default: 24, max: 168
              - `bucket_width=1m`: default: 60, max: 1440

          models: Return only usage for these models.

          page: A cursor for use in pagination. Corresponding to the `next_page` field from the
              previous response.

          project_ids: Return only usage for these projects.

          user_ids: Return only usage for these users.

          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
        /organization/usage/completionsrO   r>   ri   r?   r@   rA   rB   rC   rD   rE   rF   rP   TrQ   rT   )rW   r   r   r   UsageCompletionsParamsr&   r5   rO   r>   ri   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   s                   r6   completionszUsage.completions7  sz    @ yy-(+'%%&0'2!&(4$,$,!&"( $'2$, -CC  /5+. -3  
 	
r8   r>   r?   r@   rA   rB   rD   rE   rG   rH   rI   rJ   c                   | j                  dt        |	|
||t        ||||||||dt        j                        ddi      t
              S )  
        Get costs details for the organization.

        Args:
          start_time: Start time (Unix seconds) of the query time range, inclusive.

          api_key_ids: Return only costs for these API keys.

          bucket_width: Width of each time bucket in response. Currently only `1d` is supported, default
              to `1d`.

          end_time: End time (Unix seconds) of the query time range, exclusive.

          group_by: Group the costs by the specified fields. Support fields include `project_id`,
              `line_item`, `api_key_id` and any combination of them.

          limit: A limit on the number of buckets to be returned. Limit can range between 1 and
              180, and the default is 7.

          page: A cursor for use in pagination. Corresponding to the `next_page` field from the
              previous response.

          project_ids: Return only costs for these projects.

          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
        /organization/costsrO   r>   r?   r@   rA   rB   rD   rE   rP   TrQ   rT   )rW   r   r   r   UsageCostsParamsr#   r5   rO   r>   r?   r@   rA   rB   rD   rE   rG   rH   rI   rJ   s                r6   costszUsage.costs  sq    d yy!(+'%%&0'2(4$,$,!& $'2	 '77 /5%( '-  
 	
r8   c                   | j                  dt        ||||t        |||||||||	|
d
t        j                        ddi      t
              S )  
        Get embeddings usage details for the organization.

        Args:
          start_time: Start time (Unix seconds) of the query time range, inclusive.

          api_key_ids: Return only usage for these API keys.

          bucket_width: Width of each time bucket in response. Currently `1m`, `1h` and `1d` are
              supported, default to `1d`.

          end_time: End time (Unix seconds) of the query time range, exclusive.

          group_by: Group the usage data by the specified fields. Support fields include
              `project_id`, `user_id`, `api_key_id`, `model` or any combination of them.

          limit: Specifies the number of buckets to return.

              - `bucket_width=1d`: default: 7, max: 31
              - `bucket_width=1h`: default: 24, max: 168
              - `bucket_width=1m`: default: 60, max: 1440

          models: Return only usage for these models.

          page: A cursor for use in pagination. Corresponding to the `next_page` field from the
              previous response.

          project_ids: Return only usage for these projects.

          user_ids: Return only usage for these users.

          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
        /organization/usage/embeddingsrN   rP   TrQ   rT   )rW   r   r   r   UsageEmbeddingsParamsr%   rY   s                  r6   
embeddingszUsage.embeddings  sw    v yy,(+'%%&0'2(4$,$,!&"( $'2$, ,AA /5), ,1  
 	
r8   r>   r?   r@   rA   rB   rD   rE   rF   vector_store_idsrG   rH   rI   rJ   c                   | j                  dt        ||||t        |||||||||	|
d
t        j                        ddi      t
              S )  
        Get file search calls usage details for the organization.

        Args:
          start_time: Start time (Unix seconds) of the query time range, inclusive.

          api_key_ids: Return only usage for these API keys.

          bucket_width: Width of each time bucket in response. Currently `1m`, `1h` and `1d` are
              supported, default to `1d`.

          end_time: End time (Unix seconds) of the query time range, exclusive.

          group_by: Group the usage data by the specified fields. Support fields include
              `project_id`, `user_id`, `api_key_id`, `vector_store_id` or any combination of
              them.

          limit: Specifies the number of buckets to return.

              - `bucket_width=1d`: default: 7, max: 31
              - `bucket_width=1h`: default: 24, max: 168
              - `bucket_width=1m`: default: 60, max: 1440

          page: A cursor for use in pagination. Corresponding to the `next_page` field from the
              previous response.

          project_ids: Return only usage for these projects.

          user_ids: Return only usage for these users.

          vector_store_ids: Return only usage for these vector stores.

          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
        %/organization/usage/file_search_calls
rO   r>   r?   r@   rA   rB   rD   rE   rF   r   rP   TrQ   rT   )rW   r   r   r    UsageFileSearchCallsParamsr+   r5   rO   r>   r?   r@   rA   rB   rD   rE   rF   r   rG   rH   rI   rJ   s                  r6   file_search_callszUsage.file_search_calls4  sw    x yy3(+'%%&0'2(4$,$,!& $'2$,,< 3MM /5), 11  
 	
r8   r>   r?   r@   rA   rB   rC   rD   rE   sizessourcesrF   rG   rH   rI   rJ   c                   | j                  dt        ||||t        |||||||||	|
||dt        j                        ddi      t
              S )  
        Get images usage details for the organization.

        Args:
          start_time: Start time (Unix seconds) of the query time range, inclusive.

          api_key_ids: Return only usage for these API keys.

          bucket_width: Width of each time bucket in response. Currently `1m`, `1h` and `1d` are
              supported, default to `1d`.

          end_time: End time (Unix seconds) of the query time range, exclusive.

          group_by: Group the usage data by the specified fields. Support fields include
              `project_id`, `user_id`, `api_key_id`, `model`, `size`, `source` or any
              combination of them.

          limit: Specifies the number of buckets to return.

              - `bucket_width=1d`: default: 7, max: 31
              - `bucket_width=1h`: default: 24, max: 168
              - `bucket_width=1m`: default: 60, max: 1440

          models: Return only usage for these models.

          page: A cursor for use in pagination. Corresponding to the `next_page` field from the
              previous response.

          project_ids: Return only usage for these projects.

          sizes: Return only usages for these image sizes. Possible values are `256x256`,
              `512x512`, `1024x1024`, `1792x1792`, `1024x1792` or any combination of them.

          sources: Return only usages for these sources. Possible values are `image.generation`,
              `image.edit`, `image.variation` or any combination of them.

          user_ids: Return only usage for these users.

          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
        /organization/usage/imagesrO   r>   r?   r@   rA   rB   rC   rD   rE   r   r   rF   rP   TrQ   rT   )rW   r   r   r   UsageImagesParamsr$   r5   rO   r>   r?   r@   rA   rB   rC   rD   rE   r   r   rF   rG   rH   rI   rJ   s                    r6   imageszUsage.images  s}    H yy((+'%%&0'2(4$,$,!&"( $'2!&#*$, (99" /5-0 (5  
 	
r8   c                   | j                  dt        ||||t        |||||||||	|
d
t        j                        ddi      t
              S )  
        Get moderations usage details for the organization.

        Args:
          start_time: Start time (Unix seconds) of the query time range, inclusive.

          api_key_ids: Return only usage for these API keys.

          bucket_width: Width of each time bucket in response. Currently `1m`, `1h` and `1d` are
              supported, default to `1d`.

          end_time: End time (Unix seconds) of the query time range, exclusive.

          group_by: Group the usage data by the specified fields. Support fields include
              `project_id`, `user_id`, `api_key_id`, `model` or any combination of them.

          limit: Specifies the number of buckets to return.

              - `bucket_width=1d`: default: 7, max: 31
              - `bucket_width=1h`: default: 24, max: 168
              - `bucket_width=1m`: default: 60, max: 1440

          models: Return only usage for these models.

          page: A cursor for use in pagination. Corresponding to the `next_page` field from the
              previous response.

          project_ids: Return only usage for these projects.

          user_ids: Return only usage for these users.

          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
        /organization/usage/moderationsrN   rP   TrQ   rT   )rW   r   r   r   UsageModerationsParamsr'   rY   s                  r6   moderationszUsage.moderations  sw    v yy-(+'%%&0'2(4$,$,!&"( $'2$, -CC /5), -1  
 	
r8   c                   | j                  dt        ||	|
|t        |||||||dt        j                        ddi      t
              S )  
        Get vector stores usage details for the organization.

        Args:
          start_time: Start time (Unix seconds) of the query time range, inclusive.

          bucket_width: Width of each time bucket in response. Currently `1m`, `1h` and `1d` are
              supported, default to `1d`.

          end_time: End time (Unix seconds) of the query time range, exclusive.

          group_by: Group the usage data by the specified fields. Support fields include
              `project_id`.

          limit: Specifies the number of buckets to return.

              - `bucket_width=1d`: default: 7, max: 31
              - `bucket_width=1h`: default: 24, max: 168
              - `bucket_width=1m`: default: 60, max: 1440

          page: A cursor for use in pagination. Corresponding to the `next_page` field from the
              previous response.

          project_ids: Return only usage for these projects.

          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
        !/organization/usage/vector_storesrd   rP   TrQ   rT   )rW   r   r   r   UsageVectorStoresParamsr(   rf   s               r6   vector_storeszUsage.vector_storesB  sn    d yy/(+'%%&0(4$,$,!& $'2 /FF /5#& .+  
 	
r8   r>   r?   context_levelsr@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   c                   | j                  dt        ||||t        |||||||||	|
|dt        j                        ddi      t
              S )  
        Get web search calls usage details for the organization.

        Args:
          start_time: Start time (Unix seconds) of the query time range, inclusive.

          api_key_ids: Return only usage for these API keys.

          bucket_width: Width of each time bucket in response. Currently `1m`, `1h` and `1d` are
              supported, default to `1d`.

          context_levels: Return only web search usage for these context levels.

          end_time: End time (Unix seconds) of the query time range, exclusive.

          group_by: Group the usage data by the specified fields. Support fields include
              `project_id`, `user_id`, `api_key_id`, `model`, `context_level` or any
              combination of them.

          limit: Specifies the number of buckets to return.

              - `bucket_width=1d`: default: 7, max: 31
              - `bucket_width=1h`: default: 24, max: 168
              - `bucket_width=1m`: default: 60, max: 1440

          models: Return only usage for these models.

          page: A cursor for use in pagination. Corresponding to the `next_page` field from the
              previous response.

          project_ids: Return only usage for these projects.

          user_ids: Return only usage for these users.

          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
        $/organization/usage/web_search_callsrO   r>   r?   r   r@   rA   rB   rC   rD   rE   rF   rP   TrQ   rT   )rW   r   r   r   UsageWebSearchCallsParamsr*   r5   rO   r>   r?   r   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   s                   r6   web_search_callszUsage.web_search_calls  sz    ~ yy2(+'%%&0'2(4*8$,$,!&"( $'2$, 2KK  /5+. 03  
 	
r8   )returnr3   )r   r;   rO   intr>   SequenceNotStr[str] | Omitr?    Literal['1m', '1h', '1d'] | Omitr@   
int | OmitrA   DList[Literal['project_id', 'user_id', 'api_key_id', 'model']] | OmitrB   r   rC   r   rD   
str | OmitrE   r   rF   r   rG   Headers | NonerH   Query | NonerI   Body | NonerJ   'float | httpx.Timeout | None | NotGivenr   r)   rO   r   r>   r   r?   r   r@   r   rA   r   rB   r   rC   r   rD   r   rE   r   rF   r   rG   r   rH   r   rI   r   rJ   r   r   r,   rO   r   r?   r   r@   r   rA   "List[Literal['project_id']] | OmitrB   r   rD   r   rE   r   rG   r   rH   r   rI   r   rJ   r   r   r-    rO   r   r>   r   ri   zbool | Omitr?   r   r@   r   rA   z]List[Literal['project_id', 'user_id', 'api_key_id', 'model', 'batch', 'service_tier']] | OmitrB   r   rC   r   rD   r   rE   r   rF   r   rG   r   rH   r   rI   r   rJ   r   r   r&   rO   r   r>   r   r?   zLiteral['1d'] | Omitr@   r   rA   z=List[Literal['project_id', 'line_item', 'api_key_id']] | OmitrB   r   rD   r   rE   r   rG   r   rH   r   rI   r   rJ   r   r   r#   rO   r   r>   r   r?   r   r@   r   rA   r   rB   r   rC   r   rD   r   rE   r   rF   r   rG   r   rH   r   rI   r   rJ   r   r   r%   rO   r   r>   r   r?   r   r@   r   rA   zNList[Literal['project_id', 'user_id', 'api_key_id', 'vector_store_id']] | OmitrB   r   rD   r   rE   r   rF   r   r   r   rG   r   rH   r   rI   r   rJ   r   r   r+   "rO   r   r>   r   r?   r   r@   r   rA   zVList[Literal['project_id', 'user_id', 'api_key_id', 'model', 'size', 'source']] | OmitrB   r   rC   r   rD   r   rE   r   r   zQList[Literal['256x256', '512x512', '1024x1024', '1792x1792', '1024x1792']] | Omitr   zIList[Literal['image.generation', 'image.edit', 'image.variation']] | OmitrF   r   rG   r   rH   r   rI   r   rJ   r   r   r$   rO   r   r>   r   r?   r   r@   r   rA   r   rB   r   rC   r   rD   r   rE   r   rF   r   rG   r   rH   r   rI   r   rJ   r   r   r'   rO   r   r?   r   r@   r   rA   r   rB   r   rD   r   rE   r   rG   r   rH   r   rI   r   rJ   r   r   r(    rO   r   r>   r   r?   r   r   z-List[Literal['low', 'medium', 'high']] | Omitr@   r   rA   zUList[Literal['project_id', 'user_id', 'api_key_id', 'model', 'context_level']] | OmitrB   r   rC   r   rD   r   rE   r   rF   r   rG   r   rH   r   rI   r   rJ   r   r   r*   __name__
__module____qualname__r   r7   r<   r   r   rZ   r_   rg   rp   rx   r}   r   r   r   r   r    r8   r6   r.   r.   -   s8	   * * 0 0 379=#Y] -126/3 )-$("&;D%T
 T
 0	T

 7T
 T
 WT
 T
 +T
 T
 0T
 -T
 &T
  "!T
"  #T
$ 9%T
& 
$'T
t 379=#Y] -126/3 )-$("&;D%T
 T
 0	T

 7T
 T
 WT
 T
 +T
 T
 0T
 -T
 &T
  "!T
"  #T
$ 9%T
& 
*'T
t :>#7; 26 )-$("&;DH
 H
 7	H

 H
 5H
 H
 H
 0H
 &H
 "H
  H
 9H
  
.!H
\ 37!9=#rv -126/3 )-$("&;D'Z
 Z
 0	Z

 Z
 7Z
 Z
 pZ
 Z
 +Z
 Z
 0Z
 -Z
  &!Z
" "#Z
$  %Z
& 9'Z
( 
")Z
@ 37-1#RV 26 )-$("&;D!I
 I
 0	I

 +I
 I
 PI
 I
 I
 0I
 &I
 "I
  I
  9!I
" 
#I
^ 379=#Y] -126/3 )-$("&;D%T
 T
 0	T

 7T
 T
 WT
 T
 +T
 T
 0T
 -T
 &T
  "!T
"  #T
$ 9%T
& 
!'T
t 379=#cg 26/37; )-$("&;D%U
 U
 0	U

 7U
 U
 aU
 U
 U
 0U
 -U
 5U
 &U
  "!U
"  #U
$ 9%U
& 
&'U
v 379=#ko -126cg]a/3 )-$("&;D)_
 _
 0	_

 7_
 _
 i_
 _
 +_
 _
 0_
 a_
 [_
 -_
" &#_
$ "%_
&  '_
( 9)_
* 
+_
J 379=#Y] -126/3 )-$("&;D%T
 T
 0	T

 7T
 T
 WT
 T
 +T
 T
 0T
 -T
 &T
  "!T
"  #T
$ 9%T
& 
"'T
t :>#7; 26 )-$("&;DH
 H
 7	H

 H
 5H
 H
 H
 0H
 &H
 "H
  H
 9H
  
#!H
\ 379=HL#jn -126/3 )-$("&;D'Y
 Y
 0	Y

 7Y
 FY
 Y
 hY
 Y
 +Y
 Y
 0Y
 -Y
  &!Y
" "#Y
$  %Y
& 9'Y
( 
%)Y
r8   c                  8   e Zd Zedd       Zedd       Z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ddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ	eeeeeeddded
	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ
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ddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ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ddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ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ddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d dZeeeeeeddded
	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d!dZeeeeeeeeeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d"dZy)#r/   c                    t        |       S r2   )AsyncUsageWithRawResponser4   s    r6   r7   zAsyncUsage.with_raw_response  s     )..r8   c                    t        |       S r:   )AsyncUsageWithStreamingResponser4   s    r6   r<   z"AsyncUsage.with_streaming_response  s     /t44r8   Nr=   c                  K   | j                  dt        ||||t        |||||||||	|
d
t        j                         d{   ddi      t
               d{   S 7 7 w)rL   rM   rN   NrP   TrQ   rT   )rW   r   r   r   rX   r)   rY   s                  r6   rZ   zAsyncUsage.audio_speeches  s     v YY0(+'%1&0'2(4$,$,!&"( $'2$, 0HH  /5), /1  
 
 	

#   >A# AA#A!A#!A#c                  K   | j                  dt        ||||t        |||||||||	|
d
t        j                         d{   ddi      t
               d{   S 7 7 w)r\   r]   rN   NrP   TrQ   rT   )rW   r   r   r!   r^   r,   rY   s                  r6   r_   zAsyncUsage.audio_transcriptionsR  s     v YY6(+'%1&0'2(4$,$,!&"( $'2$, 6TT  /5), 51  
 
 	

r   r`   c                  K   | j                  dt        ||	|
|t        |||||||dt        j                         d{   ddi      t
               d{   S 7 7 w)rb   rc   rd   NrP   TrQ   rT   )rW   r   r   r"   re   r-   rf   s               r6   rg   z$AsyncUsage.code_interpreter_sessions  s     d YY;(+'%1&0(4$,$,!& $'2 ;]]  /5#& 9+  
 
 	

!   ;A AA AA A rh   c                  K   | j                  dt        ||||t        |||||||||	|
|dt        j                         d{   ddi      t
               d{   S 7 7 w)rk   rl   rm   NrP   TrQ   rT   )rW   r   r   r   rn   r&   ro   s                   r6   rp   zAsyncUsage.completions  s     @ YY-(+'%1&0'2!&(4$,$,!&"( $'2$, -CC   /5+. -3  
 
 	

#   ?A$A A$A"A$"A$rq   c                  K   | j                  dt        |	|
||t        ||||||||dt        j                         d{   ddi      t
               d{   S 7 7 w)rs   rt   ru   NrP   TrQ   rT   )rW   r   r   r   rv   r#   rw   s                r6   rx   zAsyncUsage.costsN  s     d YY!(+'%1&0'2(4$,$,!& $'2	 '77  /5%( '-  
 
 	

s!   <A!AA!AA!A!c                  K   | j                  dt        ||||t        |||||||||	|
d
t        j                         d{   ddi      t
               d{   S 7 7 w)rz   r{   rN   NrP   TrQ   rT   )rW   r   r   r   r|   r%   rY   s                  r6   r}   zAsyncUsage.embeddings  s     v YY,(+'%1&0'2(4$,$,!&"( $'2$, ,AA  /5), ,1  
 
 	

r   r~   c                  K   | j                  dt        ||||t        |||||||||	|
d
t        j                         d{   ddi      t
               d{   S 7 7 w)r   r   r   NrP   TrQ   rT   )rW   r   r   r    r   r+   r   s                  r6   r   zAsyncUsage.file_search_calls  s     x YY3(+'%1&0'2(4$,$,!& $'2$,,< 3MM  /5), 11  
 
 	

r   r   c                  K   | j                  dt        ||||t        |||||||||	|
||dt        j                         d{   ddi      t
               d{   S 7 7 w)r   r   r   NrP   TrQ   rT   )rW   r   r   r   r   r$   r   s                    r6   r   zAsyncUsage.imagesF  s     H YY((+'%1&0'2(4$,$,!&"( $'2!&#*$, (99 " /5-0 (5  
 
 	

s$   A A%A!A%A#A%#A%c                  K   | j                  dt        ||||t        |||||||||	|
d
t        j                         d{   ddi      t
               d{   S 7 7 w)r   r   rN   NrP   TrQ   rT   )rW   r   r   r   r   r'   rY   s                  r6   r   zAsyncUsage.moderations  s     v YY-(+'%1&0'2(4$,$,!&"( $'2$, -CC  /5), -1  
 
 	

r   c                  K   | j                  dt        ||	|
|t        |||||||dt        j                         d{   ddi      t
               d{   S 7 7 w)r   r   rd   NrP   TrQ   rT   )rW   r   r   r   r   r(   rf   s               r6   r   zAsyncUsage.vector_stores  s     d YY/(+'%1&0(4$,$,!& $'2 /FF  /5#& .+  
 
 	

r   r   c                  K   | j                  dt        ||||t        |||||||||	|
|dt        j                         d{   ddi      t
               d{   S 7 7 w)r   r   r   NrP   TrQ   rT   )rW   r   r   r   r   r*   r   s                   r6   r   zAsyncUsage.web_search_callsG  s     ~ YY2(+'%1&0'2(4*8$,$,!&"( $'2$, 2KK   /5+. 03  
 
 	

r   )r   r   )r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r8   r6   r/   r/     s8	   / / 5 5 379=#Y] -126/3 )-$("&;D%T
 T
 0	T

 7T
 T
 WT
 T
 +T
 T
 0T
 -T
 &T
  "!T
"  #T
$ 9%T
& 
$'T
t 379=#Y] -126/3 )-$("&;D%T
 T
 0	T

 7T
 T
 WT
 T
 +T
 T
 0T
 -T
 &T
  "!T
"  #T
$ 9%T
& 
*'T
t :>#7; 26 )-$("&;DH
 H
 7	H

 H
 5H
 H
 H
 0H
 &H
 "H
  H
 9H
  
.!H
\ 37!9=#rv -126/3 )-$("&;D'Z
 Z
 0	Z

 Z
 7Z
 Z
 pZ
 Z
 +Z
 Z
 0Z
 -Z
  &!Z
" "#Z
$  %Z
& 9'Z
( 
")Z
@ 37-1#RV 26 )-$("&;D!I
 I
 0	I

 +I
 I
 PI
 I
 I
 0I
 &I
 "I
  I
  9!I
" 
#I
^ 379=#Y] -126/3 )-$("&;D%T
 T
 0	T

 7T
 T
 WT
 T
 +T
 T
 0T
 -T
 &T
  "!T
"  #T
$ 9%T
& 
!'T
t 379=#cg 26/37; )-$("&;D%U
 U
 0	U

 7U
 U
 aU
 U
 U
 0U
 -U
 5U
 &U
  "!U
"  #U
$ 9%U
& 
&'U
v 379=#ko -126cg]a/3 )-$("&;D)_
 _
 0	_

 7_
 _
 i_
 _
 +_
 _
 0_
 a_
 [_
 -_
" &#_
$ "%_
&  '_
( 9)_
* 
+_
J 379=#Y] -126/3 )-$("&;D%T
 T
 0	T

 7T
 T
 WT
 T
 +T
 T
 0T
 -T
 &T
  "!T
"  #T
$ 9%T
& 
"'T
t :>#7; 26 )-$("&;DH
 H
 7	H

 H
 5H
 H
 H
 0H
 &H
 "H
  H
 9H
  
#!H
\ 379=HL#jn -126/3 )-$("&;D'Y
 Y
 0	Y

 7Y
 FY
 Y
 hY
 Y
 +Y
 Y
 0Y
 -Y
  &!Y
" "#Y
$  %Y
& 9'Y
( 
%)Y
r8   c                      e Zd ZddZy)r3   c                *   || _         t        j                  |j                        | _        t        j                  |j                        | _        t        j                  |j
                        | _        t        j                  |j                        | _        t        j                  |j                        | _        t        j                  |j                        | _        t        j                  |j                        | _	        t        j                  |j                        | _
        t        j                  |j                        | _        t        j                  |j                        | _        t        j                  |j                        | _        y N)_usager   to_raw_response_wrapperrZ   r_   rg   rp   rx   r}   r   r   r   r   r   r5   usages     r6   __init__zUsageWithRawResponse.__init__  sJ   .FF  
 %5$L$L&&%
! *:)Q)Q++*
& ,CC
 &==KK

 +BB
 "2!I!I##"
 '>>LL
 ,CC
 .EE
 !1 H H""!
r8   Nr   r.   r   Noner   r   r   r   r   r8   r6   r3   r3         #
r8   r3   c                      e Zd ZddZy)r   c                *   || _         t        j                  |j                        | _        t        j                  |j                        | _        t        j                  |j
                        | _        t        j                  |j                        | _        t        j                  |j                        | _        t        j                  |j                        | _        t        j                  |j                        | _	        t        j                  |j                        | _
        t        j                  |j                        | _        t        j                  |j                        | _        t        j                  |j                        | _        y r   )r   r   async_to_raw_response_wrapperrZ   r_   rg   rp   rx   r}   r   r   r   r   r   r   s     r6   r   z"AsyncUsageWithRawResponse.__init__  sJ   .LL  
 %5$R$R&&%
! *:)W)W++*
& ,II
 &CCKK

 +HH
 "2!O!O##"
 'DDLL
 ,II
 .KK
 !1 N N""!
r8   Nr   r/   r   r   r   r   r8   r6   r   r     r   r8   r   c                      e Zd ZddZy)r;   c                N   || _         t        |j                        | _        t        |j                        | _        t        |j                        | _        t        |j
                        | _        t        |j                        | _        t        |j                        | _        t        |j                        | _        t        |j                        | _	        t        |j                        | _
        t        |j                        | _        t        |j                        | _        y r   )r   r   rZ   r_   rg   rp   rx   r}   r   r   r   r   r   r   s     r6   r   z#UsageWithStreamingResponse.__init__  s
   :  
 %A&&%
! *F++*
& 8
 2KK

 7
 ">##"
 3LL
 8
 :
 !=""!
r8   Nr   r   r   r8   r6   r;   r;     r   r8   r;   c                      e Zd ZddZy)r   c                N   || _         t        |j                        | _        t        |j                        | _        t        |j                        | _        t        |j
                        | _        t        |j                        | _        t        |j                        | _        t        |j                        | _        t        |j                        | _	        t        |j                        | _
        t        |j                        | _        t        |j                        | _        y r   )r   r   rZ   r_   rg   rp   rx   r}   r   r   r   r   r   r   s     r6   r   z(AsyncUsageWithStreamingResponse.__init__  s   @  
 %G&&%
! *L++*
& >
 8KK

 =
 "D##"
 9LL
 >
 @
 !C""!
r8   Nr   r   r   r8   r6   r   r     r   r8   r   )H
__future__r   typingr   typing_extensionsr   httpx r   _typesr   r	   r
   r   r   r   r   r   _utilsr   r   _compatr   	_resourcer   r   	_responser   r   _base_clientr   types.admin.organizationr   r   r   r   r   r   r   r   r    r!   r"   -types.admin.organization.usage_costs_responser#   .types.admin.organization.usage_images_responser$   2types.admin.organization.usage_embeddings_responser%   3types.admin.organization.usage_completions_responser&   3types.admin.organization.usage_moderations_responser'   5types.admin.organization.usage_vector_stores_responser(   6types.admin.organization.usage_audio_speeches_responser)   8types.admin.organization.usage_web_search_calls_responser*   9types.admin.organization.usage_file_search_calls_responser+   <types.admin.organization.usage_audio_transcriptions_responser,   Atypes.admin.organization.usage_code_interpreter_sessions_responser-   __all__r.   r/   r3   r   r;   r   r   r8   r6   <module>r      s    #  %  ! \ \ \ = ' ; Z 1    Q R Z \ \ _ a d f m vL
!x
O x
vx
! x
v$
 $
N$
 $
N$
 $
N$
 $
r8   