docs: Mintlify MDX docs + docs.json; bump Speakeasy to 1.787.0 (#382)

This commit is contained in:
Matt Apperson
2026-06-30 16:13:28 -04:00
committed by GitHub
parent 778e2e36fb
commit babeffc9aa
2100 changed files with 50407 additions and 16612 deletions
+20
View File
@@ -0,0 +1,20 @@
---
title: "ChatUsage"
---
Token usage statistics
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `completion_tokens` | *int* | :heavy_check_mark: | Number of tokens in the completion | |
| `completion_tokens_details` | [OptionalNullable[components.ChatUsageCompletionTokensDetails]](../components/chatusagecompletiontokensdetails.mdx) | :heavy_minus_sign: | Detailed completion token usage | |
| `cost` | *OptionalNullable[float]* | :heavy_minus_sign: | Cost of the completion | |
| `cost_details` | [OptionalNullable[components.CostDetails]](../components/costdetails.mdx) | :heavy_minus_sign: | Breakdown of upstream inference costs | \{<br/>"upstream_inference_completions_cost": 0.0004,<br/>"upstream_inference_cost": null,<br/>"upstream_inference_prompt_cost": 0.0008<br/>} |
| `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.ChatUsagePromptTokensDetails]](../components/chatusageprompttokensdetails.mdx) | :heavy_minus_sign: | Detailed prompt token usage | |
| `server_tool_use_details` | [OptionalNullable[components.ServerToolUseDetails]](../components/servertoolusedetails.mdx) | :heavy_minus_sign: | Usage for server-side tool execution (e.g., web search) | |
| `total_tokens` | *int* | :heavy_check_mark: | Total number of tokens | |