Fields
| Field | Type | Required | Description |
|---|---|---|---|
completion_tokens | int | :heavy_check_mark: | The tokens generated |
completion_tokens_details | OptionalNullable[components.BodyCompletionTokensDetails] | :heavy_minus_sign: | N/A |
prompt_tokens | int | :heavy_check_mark: | Including images, input audio, and tools if any |
prompt_tokens_details | OptionalNullable[components.BodyPromptTokensDetails1] | :heavy_minus_sign: | Breakdown of tokens used in the prompt. |
server_tool_use | OptionalNullable[components.BodyServerToolUse] | :heavy_minus_sign: | Usage for server-side tool execution (e.g., web search) |
server_tool_use_details | OptionalNullable[components.BatchObjectServerToolUseDetails] | :heavy_minus_sign: | Usage for server-side tool execution (e.g., web search) |
total_tokens | int | :heavy_check_mark: | Sum of the above two fields |