> ## 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.

# CreateKeysRequest - Python SDK

> CreateKeysRequest method reference

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

## Fields

| Field                   | Type                                                                                         | Required             | Description                                                                                                                                                           | Example              |
| ----------------------- | -------------------------------------------------------------------------------------------- | -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- |
| `name`                  | *str*                                                                                        | :heavy\_check\_mark: | Name for the new API key                                                                                                                                              | My New API Key       |
| `limit`                 | *OptionalNullable\[float]*                                                                   | :heavy\_minus\_sign: | Optional spending limit for the API key in USD                                                                                                                        | 50                   |
| `limit_reset`           | [OptionalNullable\[operations.CreateKeysLimitReset\]](../operations/createkeyslimitreset.md) | :heavy\_minus\_sign: | Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday. | monthly              |
| `include_byok_in_limit` | *Optional\[bool]*                                                                            | :heavy\_minus\_sign: | Whether to include BYOK usage in the limit                                                                                                                            | true                 |
| `expires_at`            | [date](https://docs.python.org/3/library/datetime.html#date-objects)                         | :heavy\_minus\_sign: | Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected                                                         | 2027-12-31T23:59:59Z |
