mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-29 11:23:49 +08:00
17 lines
8.2 KiB
Plaintext
17 lines
8.2 KiB
Plaintext
---
|
|
title: "CreateEmbeddingsUsage"
|
|
---
|
|
|
|
Token usage statistics
|
|
|
|
|
|
## Fields
|
|
|
|
| Field | Type | Required | Description | Example |
|
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
| `cost` | *Optional[float]* | :heavy_minus_sign: | Cost of the request in credits | 0.0001 |
|
|
| `cost_details` | [OptionalNullable[operations.CostDetails]](../operations/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 input | 8 |
|
|
| `prompt_tokens_details` | [Optional[operations.PromptTokensDetails]](../operations/prompttokensdetails.mdx) | :heavy_minus_sign: | Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included. | |
|
|
| `total_tokens` | *int* | :heavy_check_mark: | Total number of tokens used | 8 | |