Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
CacheCreation | optionalnullable.OptionalNullable[components.AnthropicCacheCreation] | :heavy_minus_sign: | N/A | { “ephemeral_1h_input_tokens”: 0, “ephemeral_5m_input_tokens”: 100 } |
CompletionTokens | int64 | :heavy_check_mark: | The tokens generated | |
CompletionTokensDetails | optionalnullable.OptionalNullable[components.BatchObjectCompletionTokensDetails] | :heavy_minus_sign: | N/A | |
Cost | optionalnullable.OptionalNullable[float64] | :heavy_minus_sign: | Cost of the completion | |
CostDetails | optionalnullable.OptionalNullable[components.CostDetails] | :heavy_minus_sign: | Breakdown of upstream inference costs | { “upstream_inference_completions_cost”: 0.0004, “upstream_inference_cost”: null, “upstream_inference_prompt_cost”: 0.0008 } |
IsBYOK | *bool | :heavy_minus_sign: | Whether a request was made using a Bring Your Own Key configuration | |
Iterations | optionalnullable.OptionalNullable[[]components.AnthropicUsageIteration] | :heavy_minus_sign: | N/A | |
PromptTokens | int64 | :heavy_check_mark: | Including images, input audio, and tools if any | |
PromptTokensDetails | optionalnullable.OptionalNullable[components.BatchObjectPromptTokensDetails] | :heavy_minus_sign: | Breakdown of tokens used in the prompt. | |
ServerToolUse | optionalnullable.OptionalNullable[components.BatchObjectServerToolUse] | :heavy_minus_sign: | Usage for server-side tool execution (e.g., web search) | |
ServiceTier | optionalnullable.OptionalNullable[string] | :heavy_minus_sign: | The service tier used by the upstream provider for this request | |
Speed | optionalnullable.OptionalNullable[components.AnthropicSpeed] | :heavy_minus_sign: | N/A | standard |
TotalTokens | int64 | :heavy_check_mark: | Sum of the above two fields |