Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
completion_tokens | int | :heavy_check_mark: | Number of tokens in the completion | |
completion_tokens_details | OptionalNullable[components.CompletionTokensDetails] | :heavy_minus_sign: | Detailed completion token usage | |
cost | OptionalNullable[float] | :heavy_minus_sign: | Cost of the completion | |
cost_details | 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} |
is_byok | Optional[bool] | :heavy_minus_sign: | Whether a request was made using a Bring Your Own Key configuration | |
prompt_tokens | int | :heavy_check_mark: | Number of tokens in the prompt | |
prompt_tokens_details | OptionalNullable[components.PromptTokensDetails] | :heavy_minus_sign: | Detailed prompt token usage | |
total_tokens | int | :heavy_check_mark: | Total number of tokens |