Skip to content

Commit fae41a2

Browse files
authored
chore(docs): add new filter costs by token type docs (#108)
1 parent bb38475 commit fae41a2

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

api-reference/costs/property_costs.mdx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,26 @@ Query your LLM costs broken down by a specific association property. This helps
2323
List of environments to include in the calculation. Separated by comma.
2424
</ParamField>
2525

26+
<ParamField query="selected_token_types" type="string">
27+
<span style={{backgroundColor: '#10b981', color: 'white', padding: '2px 6px', borderRadius: '4px', fontSize: '12px', fontWeight: 'bold'}}>NEW</span> Filter costs by specific token types. Separate multiple types with commas.
28+
29+
**Supported token types:**
30+
- `input_tokens` or `prompt_tokens` (automatically normalized to `prompt_tokens`)
31+
- `output_tokens` or `completion_tokens` (automatically normalized to `completion_tokens`)
32+
- `cache_read_input_tokens`
33+
- `cache_creation_input_tokens`
34+
- Other token types as they appear in your data
35+
36+
**Note:** `total_tokens` cannot be used as a filter.
37+
38+
**Examples:**
39+
- `selected_token_types=input_tokens,output_tokens`
40+
- `selected_token_types=prompt_tokens,cache_read_input_tokens`
41+
- `selected_token_types=completion_tokens`
42+
43+
When this parameter is omitted, costs for all token types are included.
44+
</ParamField>
45+
2646
## Response
2747

2848
<ResponseField name="property_name" type="string">

0 commit comments

Comments
 (0)