> ## Documentation Index
> Fetch the complete documentation index at: https://openrouter-d02e98a0-mintlify-5b6e02fd.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Usage - Python SDK

> Usage method reference

<Warning>
  The Python SDK and docs are currently in beta.
  Report issues on [GitHub](https://github.com/OpenRouterTeam/python-sdk/issues).
</Warning>

Token usage information for the response

## Fields

| Field                   | Type                                                                                               | Required             | Description                                                         |
| ----------------------- | -------------------------------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------------- |
| `input_tokens`          | *int*                                                                                              | :heavy\_check\_mark: | N/A                                                                 |
| `input_tokens_details`  | [components.InputTokensDetails](/client-sdks/python/api-reference/components/inputtokensdetails)   | :heavy\_check\_mark: | N/A                                                                 |
| `output_tokens`         | *int*                                                                                              | :heavy\_check\_mark: | N/A                                                                 |
| `output_tokens_details` | [components.OutputTokensDetails](/client-sdks/python/api-reference/components/outputtokensdetails) | :heavy\_check\_mark: | N/A                                                                 |
| `total_tokens`          | *int*                                                                                              | :heavy\_check\_mark: | N/A                                                                 |
| `cost`                  | *OptionalNullable\[float]*                                                                         | :heavy\_minus\_sign: | Cost of the completion                                              |
| `cost_details`          | [Optional\[components.UsageCostDetails\]](../components/usagecostdetails.md)                       | :heavy\_minus\_sign: | N/A                                                                 |
| `is_byok`               | *Optional\[bool]*                                                                                  | :heavy\_minus\_sign: | Whether a request was made using a Bring Your Own Key configuration |
