diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock
index efb88929..2996c30e 100644
--- a/.speakeasy/gen.lock
+++ b/.speakeasy/gen.lock
@@ -1,19 +1,19 @@
lockVersion: 2.0.0
id: c48cf606-fb42-4a45-9c23-8f0555307828
management:
- docChecksum: 3718310285fcd17375c7d4ef9289b97f
+ docChecksum: 038d30c5aef2fef6f084584ab884a16d
docVersion: 1.0.0
speakeasyVersion: 1.787.0
generationVersion: 2.914.0
- releaseVersion: 1.1.146
- configChecksum: 30eb2515921ba2d2752a2978b47a5aba
+ releaseVersion: 1.1.147
+ configChecksum: 20548e0247292451a3ad3caa9cbf2455
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
persistentEdits:
- generation_id: 9bebc4e3-1325-4085-9b3f-f4031b333232
- pristine_commit_hash: 0b6e7d8756a1f00facecf6eb7c2d9780d246d4b5
- pristine_tree_hash: f32caf7a6b6cfb5b084cbc4b3eabeab20704701c
+ generation_id: 8953de43-f3dc-4656-b71b-a33377cb6157
+ pristine_commit_hash: 2d8db605a1914330be452a45ea2de26f22b96285
+ pristine_tree_hash: 9733025a1344184739aeef9d7bf3ab5a580aeb2e
features:
python:
acceptHeaders: 3.0.0
@@ -2112,6 +2112,10 @@ trackedFiles:
id: 4ab07ff3071f
last_write_checksum: sha1:f847f0b700c6ef363ee6c5a2d66e367cacd7863a
pristine_git_object: 7144b8675abe41fa9b576174e702475189291692
+ docs/components/freemodeldailyrequests.mdx:
+ id: ff74b8907a4d
+ last_write_checksum: sha1:9524a3cac755728fd2e644e19fbe35d227309a44
+ pristine_git_object: b0a9f40d07551b62935b28b08387f96d166ce2a7
docs/components/functioncallargsdeltaevent.mdx:
id: ecc6d6613582
last_write_checksum: sha1:b1cc3e1f2ccc6cdc2d87c0cfc17523d9b8cfd10e
@@ -6702,8 +6706,8 @@ trackedFiles:
pristine_git_object: 1f584bb9e540819ce7619172b06ad17edf8a8c34
docs/operations/getcurrentkeydata.mdx:
id: 08c92577eb48
- last_write_checksum: sha1:1c2e45ddfbfb87e44a19f50f729a4942bf12433b
- pristine_git_object: a73217d190349cf765961a1991eee4220ae77533
+ last_write_checksum: sha1:edcff1105b8ad4c6564310093610471279a8c54f
+ pristine_git_object: 63a96376b014ebb3d0d71f6f0a0901b5b14fcc6b
docs/operations/getcurrentkeyglobals.mdx:
id: 2397dfa14af6
last_write_checksum: sha1:59402ba0d664e5fab7daae4cea57dfc01e086460
@@ -6714,8 +6718,8 @@ trackedFiles:
pristine_git_object: 720e0e050e35968f74596a1bd8d791dff97b2b5b
docs/operations/getcurrentkeyresponse.mdx:
id: 8b6709d01b8b
- last_write_checksum: sha1:f2e184cd13408bc6e5776a6a286762ddd9880cc3
- pristine_git_object: 9b358b3316457f17649fae1f83f6bc808392d1cd
+ last_write_checksum: sha1:8c0fd494c989e55b0813ab65708dcfe7deadb358
+ pristine_git_object: c948cc162c525d1a6288ca8f2cd7cc1e2da2d1e5
docs/operations/getfilemetadataglobals.mdx:
id: e4f16f1ce98e
last_write_checksum: sha1:f736518bdebac4aa8c9caf9071e0670885bd83b3
@@ -7666,8 +7670,8 @@ trackedFiles:
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml:
id: 5d07e7d72637
- last_write_checksum: sha1:727c10585708849681bd5584c42a5e1383b0467a
- pristine_git_object: 6e5cbdbd891e75699ff772e002d3752ca14ed4ad
+ last_write_checksum: sha1:422e6996a221ad815b6bbe5a869f966393f3cf8b
+ pristine_git_object: 9fab30af5315cf85645afeb2e94094d39257c8a4
scripts/prepare_readme.py:
id: e0c5957a6035
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
@@ -7694,8 +7698,8 @@ trackedFiles:
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
src/openrouter/_version.py:
id: d8d15ad6c586
- last_write_checksum: sha1:48f42791d2c9bf2f3c278da4c45401d966b4aa90
- pristine_git_object: 5c1a2ed9171dfeaa321b22cb18134c2605f81b02
+ last_write_checksum: sha1:f56c9bd1893513031e700cac75d9269f948d110a
+ pristine_git_object: f770b2710fadd37adaac4c3de558b046ead36a0c
src/openrouter/analytics.py:
id: cb406b5aaabb
last_write_checksum: sha1:1e0004d8d1d5d797e2b54cd1cabeb7f9489d08e9
@@ -7734,8 +7738,8 @@ trackedFiles:
pristine_git_object: ad3d247954547814054c01989a2dff3d12b3e4e1
src/openrouter/components/__init__.py:
id: 81754e97b3f4
- last_write_checksum: sha1:5835a3c880006bd39d83bc1659ea2e81a162e9ce
- pristine_git_object: 9c8f3446387d1d95a9235ca8bc37eba11c9f0b23
+ last_write_checksum: sha1:0b3014bec1e17210006b49d56fc9146b4674a8dc
+ pristine_git_object: caf6dc7f49e27316d9aab83150efd8f8c77841b5
src/openrouter/components/aabenchmarkentry.py:
id: e2e0f0b48c82
last_write_checksum: sha1:fab4d9a24d2cea937bb749d46c5f83941e99d65c
@@ -8656,6 +8660,10 @@ trackedFiles:
id: b0ed6cdd579c
last_write_checksum: sha1:1a0daab524e69a8ce13f133f7ef7ccac857bdecb
pristine_git_object: 00319c889b8f1ea0a610026fb3cf964b3d472c5b
+ src/openrouter/components/freemodeldailyrequests.py:
+ id: 452608eb5b5d
+ last_write_checksum: sha1:83dd5bca4534129da758e581d438a54261236e9c
+ pristine_git_object: 39c51d0c8c3eabbc30c68ff171af185006318879
src/openrouter/components/functioncallargsdeltaevent.py:
id: 4e8187066efd
last_write_checksum: sha1:d618e8c717d93159fd21fe457d03a85549498a71
@@ -10626,8 +10634,8 @@ trackedFiles:
pristine_git_object: 0c48cd8cb2742ed71558ea6d9cd488ccccd74e79
src/openrouter/operations/getcurrentkey.py:
id: baf3e38db22c
- last_write_checksum: sha1:9b319545564a485e70d13d5396a7e9a62cad1f57
- pristine_git_object: d0062378b98ef20bf17dcc00a219edaa1da24424
+ last_write_checksum: sha1:b2b65133108483105fbad3d5916ee7823d4ef7c2
+ pristine_git_object: 1726a9fcf1892c0c3594833fcb5bcd82d53fd6d8
src/openrouter/operations/getfilemetadata.py:
id: 408c34486769
last_write_checksum: sha1:592b6646b4ff082d8427ea08e79e6b34be490857
@@ -11365,7 +11373,7 @@ examples:
speakeasy-default-get-current-key:
responses:
"200":
- application/json: {"data": {"byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_monthly": 17.38, "byok_usage_weekly": 17.38, "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000", "include_byok_in_limit": false, "is_free_tier": false, "is_management_key": false, "is_provisioning_key": false, "label": "sk-or-v1-au7...890", "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "rate_limit": {"interval": "1h", "note": "This field is deprecated and safe to ignore.", "requests": 1000}, "usage": 25.5, "usage_daily": 25.5, "usage_monthly": 25.5, "usage_weekly": 25.5}}
+ application/json: {"data": {"byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_monthly": 17.38, "byok_usage_weekly": 17.38, "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000", "free_model_daily_requests": {"limit": 50, "remaining": 38, "used": 12}, "include_byok_in_limit": false, "is_free_tier": false, "is_management_key": false, "is_provisioning_key": false, "label": "sk-or-v1-au7...890", "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "rate_limit": {"interval": "1h", "note": "This field is deprecated and safe to ignore.", "requests": 1000}, "usage": 25.5, "usage_daily": 25.5, "usage_monthly": 25.5, "usage_weekly": 25.5}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"500":
@@ -12924,9 +12932,4 @@ examples:
examplesVersion: 1.0.2
releaseNotes: |
## Python SDK Changes:
- * `open_router.tts.create_speech()`: `request.trace` **Added**
- * `open_router.stt.create_transcription()`: `request.trace` **Added**
- * `open_router.embeddings.generate()`: `request.trace` **Added**
- * `open_router.images.generate()`: `request.trace` **Added**
- * `open_router.rerank.rerank()`: `request.trace` **Added**
- * `open_router.video_generation.generate()`: `request.trace` **Added**
+ * `open_router.api_keys.get_current_key_metadata()`: `response.data.free_model_daily_requests` **Added**
diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml
index 74a70c4e..9cd17334 100644
--- a/.speakeasy/gen.yaml
+++ b/.speakeasy/gen.yaml
@@ -36,7 +36,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
python:
- version: 1.1.146
+ version: 1.1.147
additionalDependencies:
dev: {}
main: {}
diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml
index dc676834..8b64d1f3 100644
--- a/.speakeasy/out.openapi.yaml
+++ b/.speakeasy/out.openapi.yaml
@@ -8927,6 +8927,30 @@ components:
image_url:
url: 'https://example.com/image.png'
type: 'image_url'
+ FreeModelDailyRequests:
+ description: 'Free-model (`:free` variant) daily request quota for the account that owns the key. Reports the same counter and tier limit that free-model enforcement reads for accounts subject to the free-model limits; the counter resets at UTC midnight. Accounts and endpoints exempt from free-model limits, and BYOK requests, are not gated by it, so `remaining` is the tier policy rather than an enforced ceiling for them.'
+ example:
+ limit: 50
+ remaining: 38
+ used: 12
+ properties:
+ limit:
+ description: 'Free-model requests the account may make per UTC day; the ceiling depends on total credits purchased and is independent of `is_free_tier`'
+ example: 50
+ type: 'integer'
+ remaining:
+ description: 'Free-model requests left in the current UTC day'
+ example: 38
+ type: 'integer'
+ used:
+ description: 'Free-model requests recorded for the account so far in the current UTC day'
+ example: 12
+ type: 'integer'
+ required:
+ - 'used'
+ - 'limit'
+ - 'remaining'
+ type: 'object'
FunctionCallArgsDeltaEvent:
allOf:
- $ref: '#/components/schemas/BaseFunctionCallArgsDeltaEvent'
@@ -34772,6 +34796,10 @@ paths:
byok_usage_weekly: 17.38
creator_user_id: 'user_2dHFtVWx2n56w6HkM0000000000'
expires_at: '2027-12-31T23:59:59Z'
+ free_model_daily_requests:
+ limit: 50
+ remaining: 38
+ used: 12
include_byok_in_limit: false
is_free_tier: false
is_management_key: false
@@ -34797,6 +34825,10 @@ paths:
byok_usage_weekly: 17.38
creator_user_id: 'user_2dHFtVWx2n56w6HkM0000000000'
expires_at: '2027-12-31T23:59:59Z'
+ free_model_daily_requests:
+ limit: 50
+ remaining: 38
+ used: 12
include_byok_in_limit: false
is_free_tier: false
is_management_key: false
@@ -34823,6 +34855,10 @@ paths:
byok_usage_weekly: 17.38
creator_user_id: 'user_2dHFtVWx2n56w6HkM0000000000'
expires_at: '2027-12-31T23:59:59Z'
+ free_model_daily_requests:
+ limit: 50
+ remaining: 38
+ used: 12
include_byok_in_limit: false
is_free_tier: false
is_management_key: false
@@ -34873,6 +34909,8 @@ paths:
type:
- 'string'
- 'null'
+ free_model_daily_requests:
+ $ref: '#/components/schemas/FreeModelDailyRequests'
include_byok_in_limit:
description: 'Whether to include external BYOK usage in the credit limit'
example: false
@@ -34977,6 +35015,7 @@ paths:
- 'limit_reset'
- 'include_byok_in_limit'
- 'creator_user_id'
+ - 'free_model_daily_requests'
- 'rate_limit'
type: 'object'
required:
diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock
index b25c204f..a673f406 100644
--- a/.speakeasy/workflow.lock
+++ b/.speakeasy/workflow.lock
@@ -2,8 +2,8 @@ speakeasyVersion: 1.787.0
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:5bbed2f5e84ee227717f0b2e40a3141db5f0971340b7bb62f227eeade4206ec3
- sourceBlobDigest: sha256:81772f971c3bc11aff0ca276a569ce2f1bd364f3ef0d05ab389ad6dbd615eff3
+ sourceRevisionDigest: sha256:07a62ad9bd15927e02f7b528f1a2213e02d0a5369711fc73b777420a2adfbbc8
+ sourceBlobDigest: sha256:51641883ede95564992c9cc99573bcac53fc67f4231860bdb65084276ea9b57f
tags:
- latest
- 1.0.0
@@ -11,10 +11,10 @@ targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:5bbed2f5e84ee227717f0b2e40a3141db5f0971340b7bb62f227eeade4206ec3
- sourceBlobDigest: sha256:81772f971c3bc11aff0ca276a569ce2f1bd364f3ef0d05ab389ad6dbd615eff3
+ sourceRevisionDigest: sha256:07a62ad9bd15927e02f7b528f1a2213e02d0a5369711fc73b777420a2adfbbc8
+ sourceBlobDigest: sha256:51641883ede95564992c9cc99573bcac53fc67f4231860bdb65084276ea9b57f
codeSamplesNamespace: open-router-python-code-samples
- codeSamplesRevisionDigest: sha256:68eff8471f2da48a208bca86d77d4189a74961e3be3f2457cbd6b3163577b39b
+ codeSamplesRevisionDigest: sha256:7bb4aad9f897c1737ce1025896480f466142266c4803dfd522286aa49219b889
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.787.0
diff --git a/RELEASES.md b/RELEASES.md
index 42edcfe5..e91cf4d1 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -2249,4 +2249,14 @@ Based on:
### Generated
- [python v1.1.146] .
### Releases
-- [PyPI v1.1.146] https://pypi.org/project/openrouter/1.1.146 - .
\ No newline at end of file
+- [PyPI v1.1.146] https://pypi.org/project/openrouter/1.1.146 - .
+
+## 2026-09-16 01:42:18
+### Changes
+Based on:
+- OpenAPI Doc
+- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.1.147] .
+### Releases
+- [PyPI v1.1.147] https://pypi.org/project/openrouter/1.1.147 - .
\ No newline at end of file
diff --git a/docs/components/freemodeldailyrequests.mdx b/docs/components/freemodeldailyrequests.mdx
new file mode 100644
index 00000000..b0a9f40d
--- /dev/null
+++ b/docs/components/freemodeldailyrequests.mdx
@@ -0,0 +1,14 @@
+---
+title: "FreeModelDailyRequests"
+---
+
+Free-model (`:free` variant) daily request quota for the account that owns the key. Reports the same counter and tier limit that free-model enforcement reads for accounts subject to the free-model limits; the counter resets at UTC midnight. Accounts and endpoints exempt from free-model limits, and BYOK requests, are not gated by it, so `remaining` is the tier policy rather than an enforced ceiling for them.
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
+| `limit` | *int* | :heavy_check_mark: | Free-model requests the account may make per UTC day; the ceiling depends on total credits purchased and is independent of `is_free_tier` | 50 |
+| `remaining` | *int* | :heavy_check_mark: | Free-model requests left in the current UTC day | 38 |
+| `used` | *int* | :heavy_check_mark: | Free-model requests recorded for the account so far in the current UTC day | 12 |
\ No newline at end of file
diff --git a/docs/operations/getcurrentkeydata.mdx b/docs/operations/getcurrentkeydata.mdx
index a73217d1..63a96376 100644
--- a/docs/operations/getcurrentkeydata.mdx
+++ b/docs/operations/getcurrentkeydata.mdx
@@ -7,24 +7,25 @@ Current API key information
## Fields
-| Field | Type | Required | Description | Example |
-| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| `byok_usage` | *float* | :heavy_check_mark: | Total external BYOK usage (in USD) for the API key | 17.38 |
-| `byok_usage_daily` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC day | 17.38 |
-| `byok_usage_monthly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for current UTC month | 17.38 |
-| `byok_usage_weekly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 |
-| `creator_user_id` | *Nullable[str]* | :heavy_check_mark: | The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID. | user_2dHFtVWx2n56w6HkM0000000000 |
-| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | ISO 8601 UTC timestamp when the API key expires, or null if no expiration | 2027-12-31T23:59:59Z |
-| `include_byok_in_limit` | *bool* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false |
-| `is_free_tier` | *bool* | :heavy_check_mark: | Whether this is a free tier API key | false |
-| `is_management_key` | *bool* | :heavy_check_mark: | Whether this is a management key | false |
-| ~~`is_provisioning_key`~~ | *bool* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Whether this is a management key | false |
-| `label` | *str* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 |
-| `limit` | *Nullable[float]* | :heavy_check_mark: | Spending limit for the API key in USD | 100 |
-| `limit_remaining` | *Nullable[float]* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 |
-| `limit_reset` | *Nullable[str]* | :heavy_check_mark: | Type of limit reset for the API key | monthly |
-| ~~`rate_limit`~~ | [operations.RateLimit](../operations/ratelimit.mdx) | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Legacy rate limit information about a key. Will always return -1. | \{
"interval": "1h",
"note": "This field is deprecated and safe to ignore.",
"requests": 1000
} |
-| `usage` | *float* | :heavy_check_mark: | Total OpenRouter credit usage (in USD) for the API key | 25.5 |
-| `usage_daily` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC day | 25.5 |
-| `usage_monthly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC month | 25.5 |
-| `usage_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `byok_usage` | *float* | :heavy_check_mark: | Total external BYOK usage (in USD) for the API key | 17.38 |
+| `byok_usage_daily` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC day | 17.38 |
+| `byok_usage_monthly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for current UTC month | 17.38 |
+| `byok_usage_weekly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 |
+| `creator_user_id` | *Nullable[str]* | :heavy_check_mark: | The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID. | user_2dHFtVWx2n56w6HkM0000000000 |
+| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | ISO 8601 UTC timestamp when the API key expires, or null if no expiration | 2027-12-31T23:59:59Z |
+| `free_model_daily_requests` | [components.FreeModelDailyRequests](../components/freemodeldailyrequests.mdx) | :heavy_check_mark: | Free-model (`:free` variant) daily request quota for the account that owns the key. Reports the same counter and tier limit that free-model enforcement reads for accounts subject to the free-model limits; the counter resets at UTC midnight. Accounts and endpoints exempt from free-model limits, and BYOK requests, are not gated by it, so `remaining` is the tier policy rather than an enforced ceiling for them. | \{
"limit": 50,
"remaining": 38,
"used": 12
} |
+| `include_byok_in_limit` | *bool* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false |
+| `is_free_tier` | *bool* | :heavy_check_mark: | Whether this is a free tier API key | false |
+| `is_management_key` | *bool* | :heavy_check_mark: | Whether this is a management key | false |
+| ~~`is_provisioning_key`~~ | *bool* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Whether this is a management key | false |
+| `label` | *str* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 |
+| `limit` | *Nullable[float]* | :heavy_check_mark: | Spending limit for the API key in USD | 100 |
+| `limit_remaining` | *Nullable[float]* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 |
+| `limit_reset` | *Nullable[str]* | :heavy_check_mark: | Type of limit reset for the API key | monthly |
+| ~~`rate_limit`~~ | [operations.RateLimit](../operations/ratelimit.mdx) | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Legacy rate limit information about a key. Will always return -1. | \{
"interval": "1h",
"note": "This field is deprecated and safe to ignore.",
"requests": 1000
} |
+| `usage` | *float* | :heavy_check_mark: | Total OpenRouter credit usage (in USD) for the API key | 25.5 |
+| `usage_daily` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC day | 25.5 |
+| `usage_monthly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC month | 25.5 |
+| `usage_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 |
\ No newline at end of file
diff --git a/docs/operations/getcurrentkeyresponse.mdx b/docs/operations/getcurrentkeyresponse.mdx
index 9b358b33..c948cc16 100644
--- a/docs/operations/getcurrentkeyresponse.mdx
+++ b/docs/operations/getcurrentkeyresponse.mdx
@@ -7,6 +7,6 @@ API key details
## Fields
-| Field | Type | Required | Description | Example |
-| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| `data` | [operations.GetCurrentKeyData](../operations/getcurrentkeydata.mdx) | :heavy_check_mark: | Current API key information | \{
"byok_usage": 17.38,
"byok_usage_daily": 17.38,
"byok_usage_monthly": 17.38,
"byok_usage_weekly": 17.38,
"creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000",
"expires_at": "2027-12-31T23:59:59Z",
"include_byok_in_limit": false,
"is_free_tier": false,
"is_management_key": false,
"is_provisioning_key": false,
"label": "sk-or-v1-au7...890",
"limit": 100,
"limit_remaining": 74.5,
"limit_reset": "monthly",
"rate_limit": \{
"interval": "1h",
"note": "This field is deprecated and safe to ignore.",
"requests": 1000
},
"usage": 25.5,
"usage_daily": 25.5,
"usage_monthly": 25.5,
"usage_weekly": 25.5
} |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `data` | [operations.GetCurrentKeyData](../operations/getcurrentkeydata.mdx) | :heavy_check_mark: | Current API key information | \{
"byok_usage": 17.38,
"byok_usage_daily": 17.38,
"byok_usage_monthly": 17.38,
"byok_usage_weekly": 17.38,
"creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000",
"expires_at": "2027-12-31T23:59:59Z",
"free_model_daily_requests": \{
"limit": 50,
"remaining": 38,
"used": 12
},
"include_byok_in_limit": false,
"is_free_tier": false,
"is_management_key": false,
"is_provisioning_key": false,
"label": "sk-or-v1-au7...890",
"limit": 100,
"limit_remaining": 74.5,
"limit_reset": "monthly",
"rate_limit": \{
"interval": "1h",
"note": "This field is deprecated and safe to ignore.",
"requests": 1000
},
"usage": 25.5,
"usage_daily": 25.5,
"usage_monthly": 25.5,
"usage_weekly": 25.5
} |
\ No newline at end of file
diff --git a/pyproject.toml b/pyproject.toml
index 6e5cbdbd..9fab30af 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "openrouter"
-version = "1.1.146"
+version = "1.1.147"
description = "Official Python Client SDK for OpenRouter."
authors = [{ name = "OpenRouter" },]
readme = "README-PYPI.md"
diff --git a/src/openrouter/_version.py b/src/openrouter/_version.py
index 5c1a2ed9..f770b271 100644
--- a/src/openrouter/_version.py
+++ b/src/openrouter/_version.py
@@ -3,10 +3,10 @@
import importlib.metadata
__title__: str = "openrouter"
-__version__: str = "1.1.146"
+__version__: str = "1.1.147"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.914.0"
-__user_agent__: str = "speakeasy-sdk/python 1.1.146 2.914.0 1.0.0 openrouter"
+__user_agent__: str = "speakeasy-sdk/python 1.1.147 2.914.0 1.0.0 openrouter"
try:
if __package__ is not None:
diff --git a/src/openrouter/components/__init__.py b/src/openrouter/components/__init__.py
index 9c8f3446..caf6dc7f 100644
--- a/src/openrouter/components/__init__.py
+++ b/src/openrouter/components/__init__.py
@@ -1117,6 +1117,10 @@
FrameImageTypedDict,
FrameType,
)
+ from .freemodeldailyrequests import (
+ FreeModelDailyRequests,
+ FreeModelDailyRequestsTypedDict,
+ )
from .functioncallargsdeltaevent import (
FunctionCallArgsDeltaEvent,
FunctionCallArgsDeltaEventType,
@@ -4083,6 +4087,8 @@
"FrameImageType",
"FrameImageTypedDict",
"FrameType",
+ "FreeModelDailyRequests",
+ "FreeModelDailyRequestsTypedDict",
"FunctionCallArgsDeltaEvent",
"FunctionCallArgsDeltaEventType",
"FunctionCallArgsDeltaEventTypedDict",
@@ -6440,6 +6446,8 @@
"FrameImageType": ".frameimage",
"FrameImageTypedDict": ".frameimage",
"FrameType": ".frameimage",
+ "FreeModelDailyRequests": ".freemodeldailyrequests",
+ "FreeModelDailyRequestsTypedDict": ".freemodeldailyrequests",
"FunctionCallArgsDeltaEvent": ".functioncallargsdeltaevent",
"FunctionCallArgsDeltaEventType": ".functioncallargsdeltaevent",
"FunctionCallArgsDeltaEventTypedDict": ".functioncallargsdeltaevent",
diff --git a/src/openrouter/components/freemodeldailyrequests.py b/src/openrouter/components/freemodeldailyrequests.py
new file mode 100644
index 00000000..39c51d0c
--- /dev/null
+++ b/src/openrouter/components/freemodeldailyrequests.py
@@ -0,0 +1,29 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing_extensions import TypedDict
+
+
+class FreeModelDailyRequestsTypedDict(TypedDict):
+ r"""Free-model (`:free` variant) daily request quota for the account that owns the key. Reports the same counter and tier limit that free-model enforcement reads for accounts subject to the free-model limits; the counter resets at UTC midnight. Accounts and endpoints exempt from free-model limits, and BYOK requests, are not gated by it, so `remaining` is the tier policy rather than an enforced ceiling for them."""
+
+ limit: int
+ r"""Free-model requests the account may make per UTC day; the ceiling depends on total credits purchased and is independent of `is_free_tier`"""
+ remaining: int
+ r"""Free-model requests left in the current UTC day"""
+ used: int
+ r"""Free-model requests recorded for the account so far in the current UTC day"""
+
+
+class FreeModelDailyRequests(BaseModel):
+ r"""Free-model (`:free` variant) daily request quota for the account that owns the key. Reports the same counter and tier limit that free-model enforcement reads for accounts subject to the free-model limits; the counter resets at UTC midnight. Accounts and endpoints exempt from free-model limits, and BYOK requests, are not gated by it, so `remaining` is the tier policy rather than an enforced ceiling for them."""
+
+ limit: int
+ r"""Free-model requests the account may make per UTC day; the ceiling depends on total credits purchased and is independent of `is_free_tier`"""
+
+ remaining: int
+ r"""Free-model requests left in the current UTC day"""
+
+ used: int
+ r"""Free-model requests recorded for the account so far in the current UTC day"""
diff --git a/src/openrouter/operations/getcurrentkey.py b/src/openrouter/operations/getcurrentkey.py
index d0062378..1726a9fc 100644
--- a/src/openrouter/operations/getcurrentkey.py
+++ b/src/openrouter/operations/getcurrentkey.py
@@ -2,6 +2,9 @@
from __future__ import annotations
from datetime import datetime
+from openrouter.components import (
+ freemodeldailyrequests as components_freemodeldailyrequests,
+)
from openrouter.types import (
BaseModel,
Nullable,
@@ -187,6 +190,10 @@ class GetCurrentKeyDataTypedDict(TypedDict):
r"""External BYOK usage (in USD) for the current UTC week (Monday-Sunday)"""
creator_user_id: Nullable[str]
r"""The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID."""
+ free_model_daily_requests: (
+ components_freemodeldailyrequests.FreeModelDailyRequestsTypedDict
+ )
+ r"""Free-model (`:free` variant) daily request quota for the account that owns the key. Reports the same counter and tier limit that free-model enforcement reads for accounts subject to the free-model limits; the counter resets at UTC midnight. Accounts and endpoints exempt from free-model limits, and BYOK requests, are not gated by it, so `remaining` is the tier policy rather than an enforced ceiling for them."""
include_byok_in_limit: bool
r"""Whether to include external BYOK usage in the credit limit"""
is_free_tier: bool
@@ -235,6 +242,9 @@ class GetCurrentKeyData(BaseModel):
creator_user_id: Nullable[str]
r"""The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID."""
+ free_model_daily_requests: components_freemodeldailyrequests.FreeModelDailyRequests
+ r"""Free-model (`:free` variant) daily request quota for the account that owns the key. Reports the same counter and tier limit that free-model enforcement reads for accounts subject to the free-model limits; the counter resets at UTC midnight. Accounts and endpoints exempt from free-model limits, and BYOK requests, are not gated by it, so `remaining` is the tier policy rather than an enforced ceiling for them."""
+
include_byok_in_limit: bool
r"""Whether to include external BYOK usage in the credit limit"""
diff --git a/uv.lock b/uv.lock
index 7193e9f3..45d1f2cc 100644
--- a/uv.lock
+++ b/uv.lock
@@ -213,7 +213,7 @@ wheels = [
[[package]]
name = "openrouter"
-version = "1.1.146"
+version = "1.1.147"
source = { editable = "." }
dependencies = [
{ name = "httpcore" },