diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock
index e68ac820..b05e6d11 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: dd844eac13f976ba74b21b1e501372a5
+ docChecksum: e26b8aa17f6f45241fc4951237a29000
docVersion: 1.0.0
speakeasyVersion: 1.787.0
generationVersion: 2.914.0
- releaseVersion: 1.3.18
- configChecksum: eaeed3df3e4e78face49fcef6e620417
+ releaseVersion: 1.3.19
+ configChecksum: 87456f6f148d309df07e48d003860def
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
persistentEdits:
- generation_id: fcc256d0-08e9-439d-baaf-2ce814fe36c9
- pristine_commit_hash: 914891a5475c37ce0ebcb5ea12e09d9c508df8c3
- pristine_tree_hash: ca77f14e6c48730bdad24a1ccdfb1358445e29b2
+ generation_id: 8bdc1dba-e817-48bc-8ab2-77ad1ab37468
+ pristine_commit_hash: 20353418b707d78c5ea6272809f71158c666a268
+ pristine_tree_hash: cf8aee80660bf4495a3d3312432f0d9300445178
features:
python:
acceptHeaders: 3.0.0
@@ -9800,8 +9800,8 @@ trackedFiles:
pristine_git_object: c1634706646332455817340f5891b4b5c9c6d16c
docs/sdks/apikeys/README.mdx:
id: 27fcaae1c346
- last_write_checksum: sha1:3b8ddf3e038f2dc75d60c4936f270543950020a2
- pristine_git_object: 05cb8497207bd506ac4d84c53a5977e110114806
+ last_write_checksum: sha1:40f52532a5846a5ef9fd20f3ddf00448a15e0890
+ pristine_git_object: 0c76b2d59bd6a8956de83eb064c6205fcedae331
docs/sdks/batch/README.mdx:
id: e367aa4f4295
last_write_checksum: sha1:7e385b464cd4f95f6bbe7454e99a412041017ac7
@@ -9948,8 +9948,8 @@ trackedFiles:
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml:
id: 5d07e7d72637
- last_write_checksum: sha1:e66a3439925efa1634896c19c538834f67f793ca
- pristine_git_object: b76990ff27d4979ff3b6ec1cf668193b6d3b93df
+ last_write_checksum: sha1:6478300ed0220742fd001e94ac77e058cf94dbf1
+ pristine_git_object: 33abb1bc7c1bfe2d3c5323de18901698616b91fb
scripts/prepare_readme.py:
id: e0c5957a6035
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
@@ -9976,8 +9976,8 @@ trackedFiles:
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
src/openrouter/_version.py:
id: d8d15ad6c586
- last_write_checksum: sha1:a867b35b239e6ccc11812f193e14e29eccacf0c6
- pristine_git_object: 70d4881e1a86b1641e4821f1d2ef8729cbc0b656
+ last_write_checksum: sha1:9aaa05abbad118e10741d8e7a6dd24396fd2a45a
+ pristine_git_object: 5020f4771011c5e9d1b51dca9a739b27cb6fdc80
src/openrouter/alpha.py:
id: 306c4d93308d
last_write_checksum: sha1:30f55a360f41376ab194b9ea725fe4e001a5ae1a
@@ -9988,8 +9988,8 @@ trackedFiles:
pristine_git_object: 9587309db4d5e25a00131a48788456139c25e4c0
src/openrouter/api_keys.py:
id: 876fac88fff6
- last_write_checksum: sha1:5c198eef830a56d6030573a073bf0e349a0d8289
- pristine_git_object: 94dd64726b491afb7913f00e8c90d94ef58d1115
+ last_write_checksum: sha1:40921c10e77aceb82de5eaf1470975e9593eaf3f
+ pristine_git_object: 7647d4bc7dfba28a1d8d31c66c1d4331f37b139c
src/openrouter/basesdk.py:
id: c5733c5a1e12
last_write_checksum: sha1:65769ff2cb5473f85b364c6213a0ddc8c68644ea
@@ -14651,6 +14651,24 @@ examples:
application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ invalid_parameters:
+ parameters:
+ path:
+ hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"
+ requestBody:
+ application/json: {}
+ responses:
+ "400":
+ application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
+ no_update_fields:
+ parameters:
+ path:
+ hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"
+ requestBody:
+ application/json: {}
+ responses:
+ "400":
+ application/json: {"error": {"code": 400, "message": "No update fields provided"}}
deleteKeys:
speakeasy-default-delete-keys:
parameters:
@@ -18224,4 +18242,3 @@ examples:
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
examplesVersion: 1.0.2
-releaseNotes: "## Python SDK Changes:\n* `open_router.images.generate()`: \n * `request.resolution.enum(1.5k)` **Added**\n"
diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml
index 8b72a321..81382f73 100644
--- a/.speakeasy/gen.yaml
+++ b/.speakeasy/gen.yaml
@@ -36,7 +36,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
python:
- version: 1.3.18
+ version: 1.3.19
additionalDependencies:
dev: {}
main: {}
diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml
index fb177dcb..6452b763 100644
--- a/.speakeasy/out.openapi.yaml
+++ b/.speakeasy/out.openapi.yaml
@@ -43974,7 +43974,7 @@ paths:
- 'API Keys'
x-speakeasy-name-override: 'get'
patch:
- description: 'Update an existing API key. Authenticate with a [management key](/docs/guides/overview/auth/management-api-keys).'
+ description: "Update an existing API key. Authenticate with a [management key](/docs/guides/overview/auth/management-api-keys).\n\n\nYou can't change `workspace_id` through the API. The request body accepts only the fields listed below, and unrecognized fields are ignored. To move a key to another workspace, use the OpenRouter dashboard. If the body contains none of the accepted fields, the request fails with `400` and the message `No update fields provided`.\n"
operationId: 'updateKeys'
parameters:
- description: 'The hash identifier of the API key to update'
@@ -44257,10 +44257,20 @@ paths:
'400':
content:
application/json:
- example:
- error:
- code: 400
- message: 'Invalid request parameters'
+ examples:
+ invalid_parameters:
+ summary: 'Invalid request parameters'
+ value:
+ error:
+ code: 400
+ message: 'Invalid request parameters'
+ no_update_fields:
+ description: 'Returned when the body contains none of the accepted fields, for example `{"workspace_id": "..."}`. `workspace_id` can''t be changed through the API.'
+ summary: 'No accepted fields in the request body'
+ value:
+ error:
+ code: 400
+ message: 'No update fields provided'
schema:
$ref: '#/components/schemas/BadRequestResponse'
description: 'Bad Request - Invalid request parameters or malformed input'
diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock
index 9a38f55b..c5d01e75 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:a2fb53173f0847a6b6729eca0d73d0690987533ee30075a5212d7ac03f152830
- sourceBlobDigest: sha256:9a886d465d8ca1bbc7393650bea8ce94d547f54e5fe77dba77be5035fd6a793d
+ sourceRevisionDigest: sha256:228bbd13e686a285629ab31d64197c92d3975830d39dba91163445d623d64a2d
+ sourceBlobDigest: sha256:160a74c1c4af1037a6734cd8af4f548caec7a4faa975b242ee4119a4b81fd0c6
tags:
- latest
- 1.0.0
@@ -11,10 +11,10 @@ targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:a2fb53173f0847a6b6729eca0d73d0690987533ee30075a5212d7ac03f152830
- sourceBlobDigest: sha256:9a886d465d8ca1bbc7393650bea8ce94d547f54e5fe77dba77be5035fd6a793d
+ sourceRevisionDigest: sha256:228bbd13e686a285629ab31d64197c92d3975830d39dba91163445d623d64a2d
+ sourceBlobDigest: sha256:160a74c1c4af1037a6734cd8af4f548caec7a4faa975b242ee4119a4b81fd0c6
codeSamplesNamespace: open-router-python-code-samples
- codeSamplesRevisionDigest: sha256:326882ce35a53ebbcff4f5191e760daf76f5d8001826f8d943e3a23b3e3c38ba
+ codeSamplesRevisionDigest: sha256:8fd3208e5a389f6b3b7a4f9a0d23dad49e49c194a0ff83d30d6456c74202f36f
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.787.0
diff --git a/RELEASES.md b/RELEASES.md
index f89789ba..106e9940 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -2949,4 +2949,14 @@ Based on:
### Generated
- [python v1.3.18] .
### Releases
-- [PyPI v1.3.18] https://pypi.org/project/openrouter/1.3.18 - .
\ No newline at end of file
+- [PyPI v1.3.18] https://pypi.org/project/openrouter/1.3.18 - .
+
+## 2026-10-01 21:32:05
+### Changes
+Based on:
+- OpenAPI Doc
+- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.3.19] .
+### Releases
+- [PyPI v1.3.19] https://pypi.org/project/openrouter/1.3.19 - .
\ No newline at end of file
diff --git a/docs/sdks/apikeys/README.mdx b/docs/sdks/apikeys/README.mdx
index 05cb8497..0c76b2d5 100644
--- a/docs/sdks/apikeys/README.mdx
+++ b/docs/sdks/apikeys/README.mdx
@@ -273,7 +273,31 @@ with OpenRouter(
Update an existing API key. Authenticate with a [management key](/docs/guides/overview/auth/management-api-keys).
-### Example Usage
+\
+You can't change `workspace_id` through the API. The request body accepts only the fields listed below, and unrecognized fields are ignored. To move a key to another workspace, use the OpenRouter dashboard. If the body contains none of the accepted fields, the request fails with `400` and the message `No update fields provided`.
+
+
+### Example Usage: invalid_parameters
+
+```python
+from openrouter import OpenRouter
+import os
+
+
+with OpenRouter(
+ http_referer="",
+ x_open_router_title="",
+ x_open_router_categories="",
+ api_key=os.getenv("OPENROUTER_API_KEY", ""),
+) as open_router:
+
+ res = open_router.api_keys.update(hash="f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943")
+
+ # Handle response
+ print(res)
+
+```
+### Example Usage: no_update_fields
```python
from openrouter import OpenRouter
@@ -287,7 +311,7 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
- res = open_router.api_keys.update(hash="f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", disabled=False, include_byok_in_limit=True, limit=75, limit_reset="daily", name="Updated API Key Name")
+ res = open_router.api_keys.update(hash="f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943")
# Handle response
print(res)
diff --git a/pyproject.toml b/pyproject.toml
index b76990ff..33abb1bc 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "openrouter"
-version = "1.3.18"
+version = "1.3.19"
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 70d4881e..5020f477 100644
--- a/src/openrouter/_version.py
+++ b/src/openrouter/_version.py
@@ -3,10 +3,10 @@
import importlib.metadata
__title__: str = "openrouter"
-__version__: str = "1.3.18"
+__version__: str = "1.3.19"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.914.0"
-__user_agent__: str = "speakeasy-sdk/python 1.3.18 2.914.0 1.0.0 openrouter"
+__user_agent__: str = "speakeasy-sdk/python 1.3.19 2.914.0 1.0.0 openrouter"
try:
if __package__ is not None:
diff --git a/src/openrouter/api_keys.py b/src/openrouter/api_keys.py
index 94dd6472..7647d4bc 100644
--- a/src/openrouter/api_keys.py
+++ b/src/openrouter/api_keys.py
@@ -1428,6 +1428,10 @@ def update(
Update an existing API key. Authenticate with a [management key](/docs/guides/overview/auth/management-api-keys).
+
+ You can't change `workspace_id` through the API. The request body accepts only the fields listed below, and unrecognized fields are ignored. To move a key to another workspace, use the OpenRouter dashboard. If the body contains none of the accepted fields, the request fails with `400` and the message `No update fields provided`.
+
+
:param hash: The hash identifier of the API key to update
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
@@ -1590,6 +1594,10 @@ async def update_async(
Update an existing API key. Authenticate with a [management key](/docs/guides/overview/auth/management-api-keys).
+
+ You can't change `workspace_id` through the API. The request body accepts only the fields listed below, and unrecognized fields are ignored. To move a key to another workspace, use the OpenRouter dashboard. If the body contains none of the accepted fields, the request fails with `400` and the message `No update fields provided`.
+
+
:param hash: The hash identifier of the API key to update
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
diff --git a/uv.lock b/uv.lock
index a048268f..02d4d5fa 100644
--- a/uv.lock
+++ b/uv.lock
@@ -213,7 +213,7 @@ wheels = [
[[package]]
name = "openrouter"
-version = "1.3.18"
+version = "1.3.19"
source = { editable = "." }
dependencies = [
{ name = "httpcore" },