@@ -64187,6 +64187,21 @@ components:
6418764187 An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).
6418864188 type: integer
6418964189 - type: 'null'
64190+ tool_usage:
64191+ $ref: '#/components/schemas/ResponseToolUsage'
64192+ description: |
64193+ Usage reported by hosted tools, separate from base model `usage`. The field
64194+ can be omitted when tool usage is unavailable. When present, tool families
64195+ with no recorded usage have zero counts.
64196+
64197+ `image_gen` sums available token counts across image generation calls.
64198+ Calls with missing or incomplete usage records may be skipped. Output
64199+ token details and cached input counts can be omitted. An omitted cache
64200+ count means cache usage is unknown.
64201+
64202+ `web_search.num_requests` counts billable searches. Discounted searches
64203+ and actions such as opening a page are excluded. Use billing records to
64204+ reconcile final charges.
6419064205 required:
6419164206 - access_programs
6419264207 - id
@@ -105084,6 +105099,21 @@ components:
105084105099 An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).
105085105100 type: integer
105086105101 - type: 'null'
105102+ tool_usage:
105103+ $ref: '#/components/schemas/BetaResponseToolUsage'
105104+ description: |
105105+ Usage reported by hosted tools, separate from base model `usage`. The field
105106+ can be omitted when tool usage is unavailable. When present, tool families
105107+ with no recorded usage have zero counts.
105108+
105109+ `image_gen` sums available token counts across image generation calls.
105110+ Calls with missing or incomplete usage records may be skipped. Output
105111+ token details and cached input counts can be omitted. An omitted cache
105112+ count means cache usage is unknown.
105113+
105114+ `web_search.num_requests` counts billable searches. Discounted searches
105115+ and actions such as opening a page are excluded. Use billing records to
105116+ reconcile final charges.
105087105117 required:
105088105118 - access_programs
105089105119 - id
@@ -110498,6 +110528,156 @@ components:
110498110528 - $ref: '#/components/schemas/BetaResponseCustomToolCallInputDoneEvent'
110499110529 discriminator:
110500110530 propertyName: type
110531+ BetaCachedUsageDetails:
110532+ properties:
110533+ cached_text_tokens:
110534+ type: integer
110535+ cached_image_tokens:
110536+ type: integer
110537+ type: object
110538+ required:
110539+ - cached_text_tokens
110540+ - cached_image_tokens
110541+ BetaImageGenInputUsageDetails:
110542+ properties:
110543+ text_tokens:
110544+ type: integer
110545+ description: The number of text tokens in the input prompt.
110546+ image_tokens:
110547+ type: integer
110548+ description: The number of image tokens in the input prompt.
110549+ type: object
110550+ required:
110551+ - text_tokens
110552+ - image_tokens
110553+ title: Input usage details
110554+ description: The input tokens detailed information for the image generation.
110555+ BetaImageGenOutputTokensDetails:
110556+ properties:
110557+ image_tokens:
110558+ type: integer
110559+ description: The number of image output tokens generated by the model.
110560+ text_tokens:
110561+ type: integer
110562+ description: The number of text output tokens generated by the model.
110563+ type: object
110564+ required:
110565+ - image_tokens
110566+ - text_tokens
110567+ title: Image generation output token details
110568+ description: The output token details for the image generation.
110569+ BetaImageGenToolUsage:
110570+ properties:
110571+ input_tokens:
110572+ type: integer
110573+ description: The number of tokens (images and text) in the input prompt.
110574+ total_tokens:
110575+ type: integer
110576+ description: The total number of tokens (images and text) used for the image generation.
110577+ output_tokens:
110578+ type: integer
110579+ description: The number of output tokens generated by the model.
110580+ output_tokens_details:
110581+ $ref: '#/components/schemas/BetaImageGenOutputTokensDetails'
110582+ input_tokens_details:
110583+ $ref: '#/components/schemas/BetaImageGenInputUsageDetails'
110584+ cached_tokens:
110585+ type: integer
110586+ cached_tokens_details:
110587+ $ref: '#/components/schemas/BetaCachedUsageDetails'
110588+ type: object
110589+ required:
110590+ - input_tokens
110591+ - total_tokens
110592+ - output_tokens
110593+ - input_tokens_details
110594+ title: Image generation tool usage
110595+ description: Token usage for image generation tool calls in a response.
110596+ BetaResponseToolUsage:
110597+ properties:
110598+ image_gen:
110599+ $ref: '#/components/schemas/BetaImageGenToolUsage'
110600+ description: Aggregated usage statistics for image generation tool calls.
110601+ web_search:
110602+ $ref: '#/components/schemas/BetaWebSearchUsage'
110603+ description: Aggregated billable usage statistics for web search tool calls.
110604+ type: object
110605+ required:
110606+ - image_gen
110607+ - web_search
110608+ title: Response tool usage
110609+ description: Aggregated usage details for billable tools that ran while generating the response.
110610+ BetaWebSearchUsage:
110611+ properties:
110612+ num_requests:
110613+ type: integer
110614+ description: The number of billable web search requests issued.
110615+ type: object
110616+ required:
110617+ - num_requests
110618+ title: Web search usage
110619+ description: Usage details for web search requests that ran while generating the response.
110620+ CachedUsageDetails:
110621+ properties:
110622+ cached_text_tokens:
110623+ type: integer
110624+ cached_image_tokens:
110625+ type: integer
110626+ type: object
110627+ required:
110628+ - cached_text_tokens
110629+ - cached_image_tokens
110630+ ImageGenToolUsage:
110631+ properties:
110632+ input_tokens:
110633+ type: integer
110634+ description: The number of tokens (images and text) in the input prompt.
110635+ total_tokens:
110636+ type: integer
110637+ description: The total number of tokens (images and text) used for the image generation.
110638+ output_tokens:
110639+ type: integer
110640+ description: The number of output tokens generated by the model.
110641+ output_tokens_details:
110642+ $ref: '#/components/schemas/ImageGenOutputTokensDetails'
110643+ input_tokens_details:
110644+ $ref: '#/components/schemas/ImageGenInputUsageDetails'
110645+ cached_tokens:
110646+ type: integer
110647+ cached_tokens_details:
110648+ $ref: '#/components/schemas/CachedUsageDetails'
110649+ type: object
110650+ required:
110651+ - input_tokens
110652+ - total_tokens
110653+ - output_tokens
110654+ - input_tokens_details
110655+ title: Image generation tool usage
110656+ description: Token usage for image generation tool calls in a response.
110657+ ResponseToolUsage:
110658+ properties:
110659+ image_gen:
110660+ $ref: '#/components/schemas/ImageGenToolUsage'
110661+ description: Aggregated usage statistics for image generation tool calls.
110662+ web_search:
110663+ $ref: '#/components/schemas/WebSearchUsage'
110664+ description: Aggregated billable usage statistics for web search tool calls.
110665+ type: object
110666+ required:
110667+ - image_gen
110668+ - web_search
110669+ title: Response tool usage
110670+ description: Aggregated usage details for billable tools that ran while generating the response.
110671+ WebSearchUsage:
110672+ properties:
110673+ num_requests:
110674+ type: integer
110675+ description: The number of billable web search requests issued.
110676+ type: object
110677+ required:
110678+ - num_requests
110679+ title: Web search usage
110680+ description: Usage details for web search requests that ran while generating the response.
110501110681 SessionSpendControlResource:
110502110682 type: object
110503110683 properties:
0 commit comments