diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock
index 00ac125b8..93ff55d92 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: a54a9cf16e856c21ea05fd775e19d3b1
+ docChecksum: fb25ea45ea38d174ed1781b0fe76f3da
docVersion: 1.0.0
speakeasyVersion: 1.803.2
generationVersion: 2.950.13
- releaseVersion: 1.3.160
- configChecksum: eadfe268c501a725f58717b7e39fd719
+ releaseVersion: 1.3.161
+ configChecksum: b10b378bcf96c67cf35c44595ecca9e9
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
persistentEdits:
- generation_id: 9f94eb68-cf50-44c3-bc20-c7e7456b3d0b
- pristine_commit_hash: 21c5277bf41b91518ee56fd59635a344a0906710
- pristine_tree_hash: 87fe8df3a640f253b7102895aaed1ec62813cf97
+ generation_id: 8eec1049-b1d4-4ea5-806e-00e72f4c9cc2
+ pristine_commit_hash: 69a26d6b77b73d538ffd60b1527aca93bd7b9a2f
+ pristine_tree_hash: 83b09277e0b2ac0b7210ea5080d00c085d3b30f0
features:
python:
acceptHeaders: 3.0.0
@@ -1856,8 +1856,8 @@ trackedFiles:
pristine_git_object: ab64c8c0210948fce5ca2c155f3b535158aa59b0
docs/components/byokkey.mdx:
id: f67303c7207c
- last_write_checksum: sha1:0b6fd340e2320e4396077690570a3b145d74bc77
- pristine_git_object: c47ceb4a4f7d3a4b8cf81dbd33626e71cf1dbdf8
+ last_write_checksum: sha1:264f7d0f9ba0cc7248dfa2f9e0e0df43b8311ca0
+ pristine_git_object: e1baa0b81756d8a6edb4b38ee399f05d5bb87117
docs/components/byokkeydeclaredregion.mdx:
id: 772fe37bc6e7
last_write_checksum: sha1:10487523756c9cfa3364b15fb32a3b5de5f971e6
@@ -2756,8 +2756,8 @@ trackedFiles:
pristine_git_object: 75d065626ced9c4f737636bbc5948ff2722d536c
docs/components/createbyokkeyrequest.mdx:
id: 2af3019aa2a7
- last_write_checksum: sha1:6e8a1f073d56db6b4e9646daf4690448a82936a4
- pristine_git_object: b07a1563201f95cca245040c3d76047adc81a1d0
+ last_write_checksum: sha1:af6bd42cf77ac71922e85c1e50db092b28c9b40d
+ pristine_git_object: d99c958ad04cbd4213eaac2115ede26b34b66635
docs/components/createbyokkeyrequestdeclaredregion.mdx:
id: dacd66376c4c
last_write_checksum: sha1:62ebc64a4c47cb5a28fcdaf54d4c99524344f247
@@ -2796,8 +2796,8 @@ trackedFiles:
pristine_git_object: c95bbced65547cea7697bf83f58cd006e31bd23f
docs/components/createobservabilitydestinationrequest.mdx:
id: 8d942a601a6e
- last_write_checksum: sha1:873ee33ab76629a9cb7fad40fb6d1d3a756f5ab1
- pristine_git_object: 05f742367fb620747fe6c6afcbf4951d999300ab
+ last_write_checksum: sha1:c7a11f19a8d8156476c14f0b67f086973279d0c3
+ pristine_git_object: 60bbcc518e4ab16f773d7b539c08a59a447932f2
docs/components/createobservabilitydestinationrequesttype.mdx:
id: 0cb269425077
last_write_checksum: sha1:f8608dbed4fcc4407be03f34d5a5ab50c5cd085e
@@ -8884,8 +8884,8 @@ trackedFiles:
pristine_git_object: 68aff39c75f4c57ea9dbea6742c257f7fe48fd6e
docs/components/updatebyokkeyrequest.mdx:
id: db0862ec6814
- last_write_checksum: sha1:37fc220e5368699ba46f141cb2beebdbe271632e
- pristine_git_object: 4f2c51aa05be497535f5be4e657a847cdacb0e52
+ last_write_checksum: sha1:301aab246a71f4044a44bfd08118559e4c2260c6
+ pristine_git_object: 3d0e8681331f02410691dd11281a89235088bb9b
docs/components/updatebyokkeyrequestdeclaredregion.mdx:
id: c4441f08b1d6
last_write_checksum: sha1:3bf8612e33ef2fd206f740ffa5de5ca57649948b
@@ -8916,8 +8916,8 @@ trackedFiles:
pristine_git_object: a6369339cd14c92db7c2c735173440c00544a6e2
docs/components/updateobservabilitydestinationrequest.mdx:
id: b54091567003
- last_write_checksum: sha1:4a9c4dd11807734487e23f088c5aa6150114b73f
- pristine_git_object: 2f9670f03461794c36378933056816fdabbede97
+ last_write_checksum: sha1:0a742a219854ce3960c213d82fc1be35f03be9f6
+ pristine_git_object: 504f0f7cb47f2c29780589be5691367b2df7e623
docs/components/updateobservabilitydestinationresponse.mdx:
id: be9661c3676e
last_write_checksum: sha1:b7504a75a09ae5b3277ab9912bf02db2dcbdc101
@@ -9100,12 +9100,12 @@ trackedFiles:
pristine_git_object: 47158d146ef4e92c5f47cb737170922102bfec11
docs/components/videogenerationrequest.mdx:
id: b92ddbd15ee4
- last_write_checksum: sha1:35af7901a2943fbb46a544fa611f49593c375590
- pristine_git_object: b6bdecc241f733e900c1c90006545ef42214e081
+ last_write_checksum: sha1:d0d21e9ba8a8ecd32c060852cb1b17c6881e9119
+ pristine_git_object: 0cbdf4bed1314757cab2b6a7a2141160137b1b6e
docs/components/videogenerationrequestaspectratio.mdx:
id: c14859c0d8c3
- last_write_checksum: sha1:4ad4aae702af1cd2ddee7b443c35c9b3df6824e8
- pristine_git_object: 67f56887bb4758559189e3e9e6123dff9a38df81
+ last_write_checksum: sha1:6bbcc801080774c36e090c4746e5fd957409357f
+ pristine_git_object: 0d230cee6404c6b7fc4044e308db451f07140a6b
docs/components/videogenerationrequestignore.mdx:
id: ac6278a72d93
last_write_checksum: sha1:21dc880010c8cfc07b1c1a0e53e7b163b74b6300
@@ -9144,8 +9144,8 @@ trackedFiles:
pristine_git_object: cc366e2b197444c825c9fffe84ef851c3173afab
docs/components/videomodel.mdx:
id: 7477360941c9
- last_write_checksum: sha1:3428290a49bedc5e1e5c08fad6e054379efba012
- pristine_git_object: 17c89b5a9eec73200492028379f60bd6f5776c55
+ last_write_checksum: sha1:ef06a52997edb8baa651919e442ef107399de931
+ pristine_git_object: 49399d9bcc5f4034d0594a53385585ec38903136
docs/components/videomodelslistresponse.mdx:
id: da08c4cf70a1
last_write_checksum: sha1:27832c961bd79cd825823edaf91ff78a621ffaa8
@@ -11448,8 +11448,8 @@ trackedFiles:
pristine_git_object: d8a2042d4ec07f41bb5bf9d08f9cf8e9dc637ca9
docs/sdks/byok/README.mdx:
id: 17792f3b180d
- last_write_checksum: sha1:6110cd1b36ed14d69d1bf83de9b8adb459562b4b
- pristine_git_object: 69a08230694cf3066db5d33b62689d603d8c7e5c
+ last_write_checksum: sha1:d1591e36b066c16a0af88856ff54759f7dfab3ab
+ pristine_git_object: d3ff828a8a0903f632f5f5e31ba64e279a851003
docs/sdks/chat/README.mdx:
id: 1dd859c23fe1
last_write_checksum: sha1:bc2edd54fa566184caacfa6f238bfe70ac435cbb
@@ -11520,8 +11520,8 @@ trackedFiles:
pristine_git_object: ccd01ea3052fba9ab4f07c91b0fc20fe96687715
docs/sdks/observability/README.mdx:
id: 75811527e651
- last_write_checksum: sha1:3856f7d60b1f301f4c3cadd3c8a474907ea1b2f0
- pristine_git_object: 9680c97efa801154001c6705b86e313f0e6cff6a
+ last_write_checksum: sha1:b01bb09b9ef3543335bc1da6078de84ceaba3c14
+ pristine_git_object: 608b9a7a848c876af4705eab18e1e84a4a34af68
docs/sdks/organization/README.mdx:
id: f41b85542db0
last_write_checksum: sha1:d725f284dbc94679015993513869cee9b25fc379
@@ -11576,8 +11576,8 @@ trackedFiles:
pristine_git_object: 63da02745c8b365676c3a049a527dc6964b1480b
docs/sdks/videogeneration/README.mdx:
id: 9a8fa04c3872
- last_write_checksum: sha1:4e6cb071ff96f55a226a685b29160a2d08e36472
- pristine_git_object: 8d19de6bd101c9076774c43620db0252eebffd51
+ last_write_checksum: sha1:53701d6dd2b287509cca780989aadedbe27d51dd
+ pristine_git_object: cc656447f123c27432f52b08a244348033479481
docs/sdks/workspaces/README.mdx:
id: 0c75d023ef6b
last_write_checksum: sha1:308d7b7981ce09372279d81af532e52c7d3f56dc
@@ -11588,8 +11588,8 @@ trackedFiles:
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml:
id: 5d07e7d72637
- last_write_checksum: sha1:c6561f7cdcd94562e0ad654eea881ea67ca05817
- pristine_git_object: 83dded9bdf63c85bddedd51068f16973d015bb52
+ last_write_checksum: sha1:23675a7f96d6207b43071f874a24c0c366407099
+ pristine_git_object: 40aeec2cf362056ece236220960327fa622c02df
scripts/prepare_readme.py:
id: e0c5957a6035
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
@@ -11616,8 +11616,8 @@ trackedFiles:
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
src/openrouter/_version.py:
id: d8d15ad6c586
- last_write_checksum: sha1:864f761d40190f3a37d49aa8e479c93e410fd701
- pristine_git_object: fb55d7245a63d6bae0abd8e856f8d895d0147347
+ last_write_checksum: sha1:4bfbd6a3c6baea3f74aa1906449fbaf1e7e37425
+ pristine_git_object: daa46c243c91df43aca1c8f821d47f4dcb4b6e30
src/openrouter/alpha.py:
id: 306c4d93308d
last_write_checksum: sha1:80cc0f39649445431cc2247ed0e0765438467766
@@ -11652,8 +11652,8 @@ trackedFiles:
pristine_git_object: 7f694159275ebd1a7badbce458671d0f79456fe9
src/openrouter/byok.py:
id: bec352462ae1
- last_write_checksum: sha1:01220a9866a0b607d6a01c1451b18c808671d279
- pristine_git_object: f406badc2e1eda5070d69c32c76d5a3fc2b83f42
+ last_write_checksum: sha1:7dcf7307ab168b9abe88c4a534c70d213d4a445a
+ pristine_git_object: 68837b47f5dde4ec73c8ff291bd816ff2a6aeafd
src/openrouter/chat.py:
id: 723fdce15c1d
last_write_checksum: sha1:bf5eb38e11216ea7cbdf7cada0a28015878df867
@@ -12432,8 +12432,8 @@ trackedFiles:
pristine_git_object: 219148fc990faf0541310cf55cf11ffbcccc2e55
src/openrouter/components/byokkey.py:
id: 94a3339e7dfc
- last_write_checksum: sha1:48070d87d3d12ff83d44d0f4b7b7925d84f10651
- pristine_git_object: 913b6a89b386a6c3f76ddf20a4bebc7a25aa98cb
+ last_write_checksum: sha1:1d8f506f95287997752c34c0014d62ac999e19b0
+ pristine_git_object: 4ba4656e16f5facd3f4d292615d8afcde5a24e2a
src/openrouter/components/byokproviderslug.py:
id: 6738a8516caf
last_write_checksum: sha1:29e2c8fcf7a702d61841251d27165a3a54bb6a48
@@ -12824,8 +12824,8 @@ trackedFiles:
pristine_git_object: 1baab50ee7abc3c8a00dbff58dfb84eaf639677b
src/openrouter/components/createbyokkeyrequest.py:
id: 238e868445b4
- last_write_checksum: sha1:5c4443b37e857776901973b9c70d3df60756249d
- pristine_git_object: e20af3b2f6f7c9e8b10fb7178491bff3b2c865b0
+ last_write_checksum: sha1:c25651db5e05aba775fcd417b7d508292c370410
+ pristine_git_object: 56172f8550ff665d7280c825c04e664c7b2017aa
src/openrouter/components/createbyokkeyresponse.py:
id: 2b6c5e13270a
last_write_checksum: sha1:a7a2a40b9ac16a975a4c5ecc8802fc0b7785691c
@@ -12852,8 +12852,8 @@ trackedFiles:
pristine_git_object: 5a1db586e1e6a97ccb298c62f116212ed852a611
src/openrouter/components/createobservabilitydestinationrequest.py:
id: 58587fb98a32
- last_write_checksum: sha1:e82a9713a3c5ac67dbbb4fcb29f8237d973c3e65
- pristine_git_object: aa510e4cd9c328c6eda5b75154b110b666505e17
+ last_write_checksum: sha1:77c2f86b0f7afe33d0919d8fbb793bc6d1583dec
+ pristine_git_object: fadb1814b0a8f74248d98219f7f531ff83f9d15e
src/openrouter/components/createobservabilitydestinationresponse.py:
id: 9a8561661e52
last_write_checksum: sha1:730054c12ad209d5f83b88825c946fd6f322e6e9
@@ -15228,8 +15228,8 @@ trackedFiles:
pristine_git_object: 426fd8de3b8dc00cba5ebc7803750e0e8b761d9b
src/openrouter/components/updatebyokkeyrequest.py:
id: 5edad69c278d
- last_write_checksum: sha1:b2005ad6a3a3c7da49786f4d8dd4e9f3fce33f84
- pristine_git_object: bdf534ee210edc2fbb021b11d501fa87fa9f4259
+ last_write_checksum: sha1:5567f37feeb91b7f85485e4fd2317de5c66fbd46
+ pristine_git_object: 493e539a7a86546c34790028c97d911185b72385
src/openrouter/components/updatebyokkeyresponse.py:
id: 31338080f7cc
last_write_checksum: sha1:794d77355ae37451076a6b5754c6c8cc77063047
@@ -15256,8 +15256,8 @@ trackedFiles:
pristine_git_object: b5b3c434ba42ebfd3ea5b809a812d5722e813298
src/openrouter/components/updateobservabilitydestinationrequest.py:
id: d7a39fe04386
- last_write_checksum: sha1:24d9caae99e5030d7c1156d42b672e2187db86bf
- pristine_git_object: 139c81904ff11505e2a3a145758d0a58784f3c1b
+ last_write_checksum: sha1:b9bfd0c650c2d78e71f4c9cb96c69a172e1dcab6
+ pristine_git_object: 24c718b327740a26411a982de9c06ca3558e7ee1
src/openrouter/components/updateobservabilitydestinationresponse.py:
id: 187c51d2b3a4
last_write_checksum: sha1:cadc62b37feddb4281e471d15627a9a1bef32cb1
@@ -15352,8 +15352,8 @@ trackedFiles:
pristine_git_object: c2f15eb53f14024dfd1e620c52a564bf4682854f
src/openrouter/components/videogenerationrequest.py:
id: 70e3c9ff288c
- last_write_checksum: sha1:962f7c2e32af04c4d7b6c1b07969353261480aea
- pristine_git_object: 955c38e2071767d27a4a3b275c7bee8925ca168a
+ last_write_checksum: sha1:aeb065fbdf51c913165831efcd6db7fa25b9bff7
+ pristine_git_object: f5f1d6daab8935e332748014378eb8f11574ecf4
src/openrouter/components/videogenerationresponse.py:
id: 541f1321b072
last_write_checksum: sha1:6ba68c4551af144f37be940f0222f434d156e275
@@ -15364,8 +15364,8 @@ trackedFiles:
pristine_git_object: c6f80ef4af6effc740beb6e0f1abfee653340717
src/openrouter/components/videomodel.py:
id: a544a49f7891
- last_write_checksum: sha1:6713df6432c90a6ea768bed2d5b9e7a6fa3763e4
- pristine_git_object: 2d36013f440a10d4eab7d16bb89a0ebc411403df
+ last_write_checksum: sha1:f813253b5c9869c766907455ff1957b986c93912
+ pristine_git_object: b754781cf95b395e2d1da5759c1b9dfcec61b104
src/openrouter/components/videomodelslistresponse.py:
id: 2e9d1ce2cf19
last_write_checksum: sha1:b94977aa6941f7cf15c889f1b7cc69b50cd35856
@@ -15660,8 +15660,8 @@ trackedFiles:
pristine_git_object: 6f9385e6aa6f990eaad1ec72e4d8ddc793c1f42e
src/openrouter/observability.py:
id: 6a17f32d3f33
- last_write_checksum: sha1:7b82abd5032fa87dd0e323b22b13d93ec2b6e6f2
- pristine_git_object: a77a677d433275c4f5e957b22cbc68ddd96a042e
+ last_write_checksum: sha1:9d7a47a0ac91ad487db2e304adf0f5b55bfded69
+ pristine_git_object: dd8a6eccda3fb29e478c0edef674bd491a1dad24
src/openrouter/operations/__init__.py:
id: 9afcea1e7161
last_write_checksum: sha1:698becc71b7c317e30a1849cd5ecd6b4fba66051
@@ -16492,8 +16492,8 @@ trackedFiles:
pristine_git_object: 301f5a486f27e1dcfcb4c9029b47d6df7b683d95
src/openrouter/video_generation.py:
id: d0a90c1b8efe
- last_write_checksum: sha1:232e599b8972ca4aabf2ffdbb2af4bd880e48c0a
- pristine_git_object: 80463dc184cef6adeabe8b97ab8abcf7caac1780
+ last_write_checksum: sha1:d1d5ab60663040e7ce7b632fb48595585c603a41
+ pristine_git_object: 0e38feef7d65512bdbdc1ecbec4ebcf8821ee1ca
src/openrouter/workspaces.py:
id: cd6c533b1802
last_write_checksum: sha1:68af669c94b28b0a42648c30e72ebf55802a5da6
@@ -21577,6 +21577,3 @@ examples:
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
examplesVersion: 1.0.2
-releaseNotes: |
- ## Python SDK Changes:
- * `open_router.presets.create_presets_chat_completions()`: `request.reasoning` **Changed**
diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml
index 090d4a959..fe32d7001 100644
--- a/.speakeasy/gen.yaml
+++ b/.speakeasy/gen.yaml
@@ -37,7 +37,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
python:
- version: 1.3.160
+ version: 1.3.161
additionalDependencies:
dev:
pytest: '>=8.3'
diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml
index bf66450c1..2675e4f96 100644
--- a/.speakeasy/out.openapi.yaml
+++ b/.speakeasy/out.openapi.yaml
@@ -7302,7 +7302,7 @@ components:
workspace_id: '550e8400-e29b-41d4-a716-446655440000'
properties:
allowed_api_key_hashes:
- description: 'Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. A workspace-scoped management key can only name API keys in its own workspace.'
+ description: 'Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. Keys newly added to a credential pinned to a workspace must be in that workspace; a listed key that has since moved to another workspace stays listed.'
example:
- 'f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943'
items:
@@ -10402,7 +10402,7 @@ components:
provider: 'openai'
properties:
allowed_api_key_hashes:
- description: 'Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a workspace-scoped management key, so do hashes of API keys outside its own workspace.'
+ description: 'Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a credential pinned to a workspace, so do hashes of API keys outside that workspace.'
example:
- 'f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943'
items:
@@ -10960,7 +10960,7 @@ components:
type: 'langfuse'
properties:
api_key_hashes:
- description: 'Optional allowlist of OpenRouter API key hashes whose traffic is forwarded. `null` or omitted means all keys. Must contain at least one hash if provided. A workspace-scoped management key can only name API keys in its own workspace; any other hash returns 400.'
+ description: 'Optional allowlist of OpenRouter API key hashes whose traffic is forwarded. `null` or omitted means all keys. Must contain at least one hash if provided. Every hash must belong to an API key in the destination''s workspace; any other hash returns 400.'
example: null
items:
type: 'string'
@@ -36446,7 +36446,7 @@ components:
name: 'Updated OpenAI Key'
properties:
allowed_api_key_hashes:
- description: 'Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` clears the restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a workspace-scoped management key, so do hashes of API keys outside its own workspace.'
+ description: 'Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` clears the restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a credential pinned to a workspace, so do hashes of API keys outside that workspace, unless the credential already lists them (a listed key that has since moved to another workspace stays listed and can be written back).'
example:
- 'f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943'
items:
@@ -36899,7 +36899,7 @@ components:
name: 'Updated Langfuse'
properties:
api_key_hashes:
- description: 'Optional allowlist of OpenRouter API key hashes. `null` clears the filter (all keys). Omitting leaves the current value, including any API key from another workspace that an organization-scoped key attached. Must contain at least one hash if provided. A workspace-scoped management key can only name API keys in its own workspace; any other hash returns 400.'
+ description: 'Optional allowlist of OpenRouter API key hashes. `null` clears the filter (all keys). Omitting leaves the current value. Must contain at least one hash if provided. Every hash must belong to an API key in the destination''s workspace; any other hash returns 400. A hash the destination already lists is kept even if that key has since moved to another workspace, so an already-listed hash can always be written back.'
example: null
items:
type: 'string'
@@ -38095,7 +38095,7 @@ components:
resolution: '720p'
properties:
aspect_ratio:
- description: 'Aspect ratio of the generated video'
+ description: 'Aspect ratio of the generated video. Omit it to use the model default, which on models with adaptive aspect ratio (e.g. BytePlus Seedance) follows the input image or video.'
enum:
- '16:9'
- '9:16'
@@ -38119,9 +38119,9 @@ components:
example: 1
type: 'integer'
duration:
- description: 'Duration of the generated video in seconds'
+ description: 'Duration of the generated video in seconds, or -1 to let the provider choose the length (e.g. following an input video). -1 is only accepted by models that list it in supported_durations.'
example: 8
- minimum: 1
+ minimum: -1
type: 'integer'
frame_images:
description: 'Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame.'
@@ -38399,7 +38399,7 @@ components:
- 'array'
- 'null'
supported_durations:
- description: 'Supported video durations in seconds'
+ description: 'Supported video durations in seconds. -1 means the model accepts duration -1 and chooses the length itself.'
items:
type: 'integer'
type:
diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock
index 9879bbcfd..02e841767 100644
--- a/.speakeasy/workflow.lock
+++ b/.speakeasy/workflow.lock
@@ -2,8 +2,8 @@ speakeasyVersion: 1.803.2
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:065d13d8834eab43892196c2ddd12a2be62721b8db973e8e979dd95e0ae0041b
- sourceBlobDigest: sha256:3d450bed4d2afe95015cf2cc9ab685242e127d758e339399c791b19badc51954
+ sourceRevisionDigest: sha256:f4379159e4c5d6d05d158c3579d3103b30744f6a225c31f9a89c7cc348ac1e90
+ sourceBlobDigest: sha256:30ee3837d50b20731a7ad325f1bbb7bc0ff1319b9c0fe631070acecab6b82279
tags:
- latest
- 1.0.0
@@ -11,10 +11,10 @@ targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:065d13d8834eab43892196c2ddd12a2be62721b8db973e8e979dd95e0ae0041b
- sourceBlobDigest: sha256:3d450bed4d2afe95015cf2cc9ab685242e127d758e339399c791b19badc51954
+ sourceRevisionDigest: sha256:f4379159e4c5d6d05d158c3579d3103b30744f6a225c31f9a89c7cc348ac1e90
+ sourceBlobDigest: sha256:30ee3837d50b20731a7ad325f1bbb7bc0ff1319b9c0fe631070acecab6b82279
codeSamplesNamespace: open-router-python-code-samples
- codeSamplesRevisionDigest: sha256:a2c6618b6c2021bd41b07cf526fcf35e9551e1d29a929a842c05fd541f9a51b3
+ codeSamplesRevisionDigest: sha256:0adccb2698a6ed530a39716814ff8246a4c82c64076663e29c9b657ac9bd898e
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.803.2
diff --git a/RELEASES.md b/RELEASES.md
index 1a69f7d9b..82e889f3b 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -4369,4 +4369,14 @@ Based on:
### Generated
- [python v1.3.160] .
### Releases
-- [PyPI v1.3.160] https://pypi.org/project/openrouter/1.3.160 - .
\ No newline at end of file
+- [PyPI v1.3.160] https://pypi.org/project/openrouter/1.3.160 - .
+
+## 2026-11-11 18:59:49
+### Changes
+Based on:
+- OpenAPI Doc
+- Speakeasy CLI 1.803.2 (2.950.13) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.3.161] .
+### Releases
+- [PyPI v1.3.161] https://pypi.org/project/openrouter/1.3.161 - .
\ No newline at end of file
diff --git a/docs/components/byokkey.mdx b/docs/components/byokkey.mdx
index c47ceb4a4..e1baa0b81 100644
--- a/docs/components/byokkey.mdx
+++ b/docs/components/byokkey.mdx
@@ -6,7 +6,7 @@ title: "BYOKKey"
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| `allowed_api_key_hashes` | List[*str*] | ✔️ | Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. A workspace-scoped management key can only name API keys in its own workspace. | [
"f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"
] |
+| `allowed_api_key_hashes` | List[*str*] | ✔️ | Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. Keys newly added to a credential pinned to a workspace must be in that workspace; a listed key that has since moved to another workspace stays listed. | [
"f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"
] |
| `allowed_models` | List[*str*] | ✔️ | Optional allowlist of model slugs this credential may be used for. `null` means no restriction. | null |
| `allowed_user_ids` | List[*str*] | ✔️ | Optional allowlist of user IDs that may use this credential. `null` means no restriction. | null |
| `created_at` | *str* | ✔️ | ISO timestamp of when the credential was created. | 2025-08-24T10:30:00Z |
diff --git a/docs/components/createbyokkeyrequest.mdx b/docs/components/createbyokkeyrequest.mdx
index b07a15632..d99c958ad 100644
--- a/docs/components/createbyokkeyrequest.mdx
+++ b/docs/components/createbyokkeyrequest.mdx
@@ -6,7 +6,7 @@ title: "CreateBYOKKeyRequest"
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `allowed_api_key_hashes` | List[*str*] | ➖ | Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a workspace-scoped management key, so do hashes of API keys outside its own workspace. | [
"f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"
] |
+| `allowed_api_key_hashes` | List[*str*] | ➖ | Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a credential pinned to a workspace, so do hashes of API keys outside that workspace. | [
"f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"
] |
| `allowed_models` | List[*str*] | ➖ | Optional allowlist of model slugs this credential may be used for. `null` means no restriction. | null |
| `allowed_user_ids` | List[*str*] | ➖ | Optional allowlist of user IDs that may use this credential. `null` means no restriction. | null |
| `declared_region` | [OptionalNullable[components.CreateBYOKKeyRequestDeclaredRegion]](../components/createbyokkeyrequestdeclaredregion.mdx) | ➖ | Your declaration of the data region in which the upstream provider account behind this credential processes requests, used for routing eligibility on OpenRouter's regional hosts. `null` means undeclared and `global` is behaviorally identical: the credential follows the region OpenRouter records for the endpoint. `europe` or `us` lets requests to `eu.openrouter.ai` or `us.openrouter.ai` use this credential for that provider (private endpoints, endpoints pinned to another cloud region, cross-region inference profiles and video models are excluded). Self-declared and not verified by OpenRouter. For OpenAI and Fireworks the region comes from the key material (a `{"api_key": ..., "region": ...}` key), so the value must match the key's region. Among other providers, Azure accepts `europe` or `us` and Anthropic accepts `us` only. Defaults to the key's region for OpenAI and Fireworks, otherwise `null`. | null |
diff --git a/docs/components/createobservabilitydestinationrequest.mdx b/docs/components/createobservabilitydestinationrequest.mdx
index 05f742367..60bbcc518 100644
--- a/docs/components/createobservabilitydestinationrequest.mdx
+++ b/docs/components/createobservabilitydestinationrequest.mdx
@@ -4,19 +4,19 @@ title: "CreateObservabilityDestinationRequest"
## Fields
-| Field | Type | Required | Description | Example |
-| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `api_key_hashes` | List[*str*] | ➖ | Optional allowlist of OpenRouter API key hashes whose traffic is forwarded. `null` or omitted means all keys. Must contain at least one hash if provided. A workspace-scoped management key can only name API keys in its own workspace; any other hash returns 400. | null |
-| `broadcast_generation_cost` | *Optional[bool]* | ➖ | When true, include cost and billing generation metadata. | false |
-| `broadcast_generation_cost_allocation` | *Optional[bool]* | ➖ | Beta. When true, include openrouter_cost_allocation: per-token-kind usage and cost, sent only when they reconcile with the billed cost. | false |
-| `broadcast_generation_identity` | *Optional[bool]* | ➖ | When true, include identity generation metadata. | false |
-| `broadcast_generation_request_context` | *Optional[bool]* | ➖ | When true, include request-context generation metadata. | false |
-| `config` | Dict[str, *Any*] | ✔️ | Provider-specific configuration. The shape depends on `type` and is validated server-side. | \{
"baseUrl": "https://us.cloud.langfuse.com",
"publicKey": "pk-l...EfGh",
"secretKey": "sk-l...AbCd"
} |
-| `enabled` | *Optional[bool]* | ➖ | Whether this destination should be enabled immediately. | true |
-| `filter_rules` | [OptionalNullable[components.ObservabilityFilterRulesConfigNullable]](../components/observabilityfilterrulesconfignullable.mdx) | ➖ | Optional structured filter rules controlling which events are forwarded. | null |
-| `name` | *str* | ✔️ | Human-readable name for the destination. | Production Langfuse |
-| `privacy_mode` | *Optional[bool]* | ➖ | When true, request/response bodies are not forwarded — only metadata. | false |
-| `regions` | List[[components.ObservabilityDataRegionInput](../components/observabilitydataregioninput.mdx)] | ➖ | Data regions this destination applies to. `eu` is accepted as an alias for `europe` and normalizes to `europe`. Omitting this field defaults to ['global']; the array must be non-empty. | [
"global"
] |
-| `sampling_rate` | *Optional[float]* | ➖ | Sampling rate between 0.0001 and 1 (1 = 100%). | 1 |
-| `type` | [components.CreateObservabilityDestinationRequestType](../components/createobservabilitydestinationrequesttype.mdx) | ✔️ | The destination type. Only stable destination types are accepted. | langfuse |
-| `workspace_id` | *Optional[str]* | ➖ | Optional workspace ID. Defaults to the authenticated entity's default workspace, or a workspace-scoped management key's own workspace. | 550e8400-e29b-41d4-a716-446655440000 |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `api_key_hashes` | List[*str*] | ➖ | Optional allowlist of OpenRouter API key hashes whose traffic is forwarded. `null` or omitted means all keys. Must contain at least one hash if provided. Every hash must belong to an API key in the destination's workspace; any other hash returns 400. | null |
+| `broadcast_generation_cost` | *Optional[bool]* | ➖ | When true, include cost and billing generation metadata. | false |
+| `broadcast_generation_cost_allocation` | *Optional[bool]* | ➖ | Beta. When true, include openrouter_cost_allocation: per-token-kind usage and cost, sent only when they reconcile with the billed cost. | false |
+| `broadcast_generation_identity` | *Optional[bool]* | ➖ | When true, include identity generation metadata. | false |
+| `broadcast_generation_request_context` | *Optional[bool]* | ➖ | When true, include request-context generation metadata. | false |
+| `config` | Dict[str, *Any*] | ✔️ | Provider-specific configuration. The shape depends on `type` and is validated server-side. | \{
"baseUrl": "https://us.cloud.langfuse.com",
"publicKey": "pk-l...EfGh",
"secretKey": "sk-l...AbCd"
} |
+| `enabled` | *Optional[bool]* | ➖ | Whether this destination should be enabled immediately. | true |
+| `filter_rules` | [OptionalNullable[components.ObservabilityFilterRulesConfigNullable]](../components/observabilityfilterrulesconfignullable.mdx) | ➖ | Optional structured filter rules controlling which events are forwarded. | null |
+| `name` | *str* | ✔️ | Human-readable name for the destination. | Production Langfuse |
+| `privacy_mode` | *Optional[bool]* | ➖ | When true, request/response bodies are not forwarded — only metadata. | false |
+| `regions` | List[[components.ObservabilityDataRegionInput](../components/observabilitydataregioninput.mdx)] | ➖ | Data regions this destination applies to. `eu` is accepted as an alias for `europe` and normalizes to `europe`. Omitting this field defaults to ['global']; the array must be non-empty. | [
"global"
] |
+| `sampling_rate` | *Optional[float]* | ➖ | Sampling rate between 0.0001 and 1 (1 = 100%). | 1 |
+| `type` | [components.CreateObservabilityDestinationRequestType](../components/createobservabilitydestinationrequesttype.mdx) | ✔️ | The destination type. Only stable destination types are accepted. | langfuse |
+| `workspace_id` | *Optional[str]* | ➖ | Optional workspace ID. Defaults to the authenticated entity's default workspace, or a workspace-scoped management key's own workspace. | 550e8400-e29b-41d4-a716-446655440000 |
\ No newline at end of file
diff --git a/docs/components/updatebyokkeyrequest.mdx b/docs/components/updatebyokkeyrequest.mdx
index 4f2c51aa0..3d0e86813 100644
--- a/docs/components/updatebyokkeyrequest.mdx
+++ b/docs/components/updatebyokkeyrequest.mdx
@@ -6,7 +6,7 @@ title: "UpdateBYOKKeyRequest"
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| `allowed_api_key_hashes` | List[*str*] | ➖ | Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` clears the restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a workspace-scoped management key, so do hashes of API keys outside its own workspace. | [
"f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"
] |
+| `allowed_api_key_hashes` | List[*str*] | ➖ | Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` clears the restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a credential pinned to a workspace, so do hashes of API keys outside that workspace, unless the credential already lists them (a listed key that has since moved to another workspace stays listed and can be written back). | [
"f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"
] |
| `allowed_models` | List[*str*] | ➖ | Optional allowlist of model slugs this credential may be used for. `null` means no restriction. | null |
| `allowed_user_ids` | List[*str*] | ➖ | Optional allowlist of user IDs that may use this credential. `null` means no restriction. | null |
| `declared_region` | [OptionalNullable[components.UpdateBYOKKeyRequestDeclaredRegion]](../components/updatebyokkeyrequestdeclaredregion.mdx) | ➖ | Your declaration of the data region in which the upstream provider account behind this credential processes requests, used for routing eligibility on OpenRouter's regional hosts. `null` means undeclared and `global` is behaviorally identical: the credential follows the region OpenRouter records for the endpoint. `europe` or `us` lets requests to `eu.openrouter.ai` or `us.openrouter.ai` use this credential for that provider (private endpoints, endpoints pinned to another cloud region, cross-region inference profiles and video models are excluded). Self-declared and not verified by OpenRouter. For OpenAI and Fireworks the region comes from the key material (a `{"api_key": ..., "region": ...}` key), so the value must match the key's region. Among other providers, Azure accepts `europe` or `us` and Anthropic accepts `us` only. Omit to leave the stored value unchanged (rotating an OpenAI or Fireworks `key` re-derives it from the new key); `null` clears the declaration. | null |
diff --git a/docs/components/updateobservabilitydestinationrequest.mdx b/docs/components/updateobservabilitydestinationrequest.mdx
index 2f9670f03..504f0f7cb 100644
--- a/docs/components/updateobservabilitydestinationrequest.mdx
+++ b/docs/components/updateobservabilitydestinationrequest.mdx
@@ -4,17 +4,17 @@ title: "UpdateObservabilityDestinationRequest"
## Fields
-| Field | Type | Required | Description | Example |
-| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `api_key_hashes` | List[*str*] | ➖ | Optional allowlist of OpenRouter API key hashes. `null` clears the filter (all keys). Omitting leaves the current value, including any API key from another workspace that an organization-scoped key attached. Must contain at least one hash if provided. A workspace-scoped management key can only name API keys in its own workspace; any other hash returns 400. | null |
-| `broadcast_generation_cost` | *Optional[bool]* | ➖ | Whether to include cost and billing generation metadata. | false |
-| `broadcast_generation_cost_allocation` | *Optional[bool]* | ➖ | Beta. When true, include openrouter_cost_allocation: per-token-kind usage and cost, sent only when they reconcile with the billed cost. | false |
-| `broadcast_generation_identity` | *Optional[bool]* | ➖ | Whether to include identity generation metadata. | false |
-| `broadcast_generation_request_context` | *Optional[bool]* | ➖ | Whether to include request-context generation metadata. | false |
-| `config` | Dict[str, *Any*] | ➖ | Provider-specific configuration fields to update. Masked values are ignored; unset fields keep their current value. | \{
"baseUrl": "https://us.cloud.langfuse.com",
"publicKey": "pk-l...EfGh",
"secretKey": "sk-l...AbCd"
} |
-| `enabled` | *Optional[bool]* | ➖ | Whether the destination is enabled. | true |
-| `filter_rules` | [OptionalNullable[components.ObservabilityFilterRulesConfigNullable]](../components/observabilityfilterrulesconfignullable.mdx) | ➖ | N/A | null |
-| `name` | *Optional[str]* | ➖ | Human-readable name for the destination. | Production Langfuse |
-| `privacy_mode` | *Optional[bool]* | ➖ | When true, request/response bodies are not forwarded — only metadata. | false |
-| `regions` | List[[components.ObservabilityDataRegionInput](../components/observabilitydataregioninput.mdx)] | ➖ | Data regions this destination applies to. `eu` is accepted as an alias for `europe` and normalizes to `europe`. Omitting this field keeps the current value; it cannot be cleared. | [
"global"
] |
-| `sampling_rate` | *Optional[float]* | ➖ | Sampling rate between 0.0001 and 1 (1 = 100%). | 1 |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `api_key_hashes` | List[*str*] | ➖ | Optional allowlist of OpenRouter API key hashes. `null` clears the filter (all keys). Omitting leaves the current value. Must contain at least one hash if provided. Every hash must belong to an API key in the destination's workspace; any other hash returns 400. A hash the destination already lists is kept even if that key has since moved to another workspace, so an already-listed hash can always be written back. | null |
+| `broadcast_generation_cost` | *Optional[bool]* | ➖ | Whether to include cost and billing generation metadata. | false |
+| `broadcast_generation_cost_allocation` | *Optional[bool]* | ➖ | Beta. When true, include openrouter_cost_allocation: per-token-kind usage and cost, sent only when they reconcile with the billed cost. | false |
+| `broadcast_generation_identity` | *Optional[bool]* | ➖ | Whether to include identity generation metadata. | false |
+| `broadcast_generation_request_context` | *Optional[bool]* | ➖ | Whether to include request-context generation metadata. | false |
+| `config` | Dict[str, *Any*] | ➖ | Provider-specific configuration fields to update. Masked values are ignored; unset fields keep their current value. | \{
"baseUrl": "https://us.cloud.langfuse.com",
"publicKey": "pk-l...EfGh",
"secretKey": "sk-l...AbCd"
} |
+| `enabled` | *Optional[bool]* | ➖ | Whether the destination is enabled. | true |
+| `filter_rules` | [OptionalNullable[components.ObservabilityFilterRulesConfigNullable]](../components/observabilityfilterrulesconfignullable.mdx) | ➖ | N/A | null |
+| `name` | *Optional[str]* | ➖ | Human-readable name for the destination. | Production Langfuse |
+| `privacy_mode` | *Optional[bool]* | ➖ | When true, request/response bodies are not forwarded — only metadata. | false |
+| `regions` | List[[components.ObservabilityDataRegionInput](../components/observabilitydataregioninput.mdx)] | ➖ | Data regions this destination applies to. `eu` is accepted as an alias for `europe` and normalizes to `europe`. Omitting this field keeps the current value; it cannot be cleared. | [
"global"
] |
+| `sampling_rate` | *Optional[float]* | ➖ | Sampling rate between 0.0001 and 1 (1 = 100%). | 1 |
\ No newline at end of file
diff --git a/docs/components/videogenerationrequest.mdx b/docs/components/videogenerationrequest.mdx
index b6bdecc24..0cbdf4bed 100644
--- a/docs/components/videogenerationrequest.mdx
+++ b/docs/components/videogenerationrequest.mdx
@@ -6,10 +6,10 @@ title: "VideoGenerationRequest"
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `aspect_ratio` | [Optional[components.VideoGenerationRequestAspectRatio]](../components/videogenerationrequestaspectratio.mdx) | ➖ | Aspect ratio of the generated video | 16:9 |
+| `aspect_ratio` | [Optional[components.VideoGenerationRequestAspectRatio]](../components/videogenerationrequestaspectratio.mdx) | ➖ | Aspect ratio of the generated video. Omit it to use the model default, which on models with adaptive aspect ratio (e.g. BytePlus Seedance) follows the input image or video. | 16:9 |
| `callback_url` | *Optional[str]* | ➖ | URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. | https://example.com/webhook |
| `creativity` | *Optional[int]* | ➖ | Creativity level for video upscaling models only. This parameter is not supported by video generation models. | 1 |
-| `duration` | *Optional[int]* | ➖ | Duration of the generated video in seconds | 8 |
+| `duration` | *Optional[int]* | ➖ | Duration of the generated video in seconds, or -1 to let the provider choose the length (e.g. following an input video). -1 is only accepted by models that list it in supported_durations. | 8 |
| `frame_images` | List[[components.FrameImage](../components/frameimage.mdx)] | ➖ | Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. | |
| `generate_audio` | *Optional[bool]* | ➖ | Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. | true |
| `input_references` | List[[components.InputReference](../components/inputreference.mdx)] | ➖ | Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. | |
diff --git a/docs/components/videogenerationrequestaspectratio.mdx b/docs/components/videogenerationrequestaspectratio.mdx
index 67f56887b..0d230cee6 100644
--- a/docs/components/videogenerationrequestaspectratio.mdx
+++ b/docs/components/videogenerationrequestaspectratio.mdx
@@ -2,7 +2,7 @@
title: "VideoGenerationRequestAspectRatio"
---
-Aspect ratio of the generated video
+Aspect ratio of the generated video. Omit it to use the model default, which on models with adaptive aspect ratio (e.g. BytePlus Seedance) follows the input image or video.
## Example Usage
diff --git a/docs/components/videomodel.mdx b/docs/components/videomodel.mdx
index 17c89b5a9..49399d9bc 100644
--- a/docs/components/videomodel.mdx
+++ b/docs/components/videomodel.mdx
@@ -4,22 +4,22 @@ title: "VideoModel"
## Fields
-| Field | Type | Required | Description | Example |
-| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
-| `allowed_passthrough_parameters` | List[*str*] | ✔️ | List of parameters that are allowed to be passed through to the provider | |
-| `canonical_slug` | *str* | ✔️ | Canonical slug for the model | openai/gpt-4 |
-| `created` | *int* | ✔️ | Unix timestamp of when the model was created | 1692901234 |
-| `creativity` | List[*int*] | ✔️ | Supported creativity levels for video upscaling models | |
-| `description` | *Optional[str]* | ➖ | Description of the model | GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy. |
-| `generate_audio` | *Nullable[bool]* | ✔️ | Whether the model supports generating audio alongside video | |
-| `hugging_face_id` | *OptionalNullable[str]* | ➖ | Hugging Face model identifier, if applicable | microsoft/DialoGPT-medium |
-| `id` | *str* | ✔️ | Unique identifier for the model | openai/gpt-4 |
-| `name` | *str* | ✔️ | Display name of the model | GPT-4 |
-| `pricing_skus` | Dict[str, *str*] | ➖ | Pricing SKUs with provider prefix stripped, values as strings | |
-| `seed` | *Nullable[bool]* | ✔️ | Whether the model supports deterministic generation via seed parameter | |
-| `supported_aspect_ratios` | List[[components.SupportedAspectRatio](../components/supportedaspectratio.mdx)] | ✔️ | Supported output aspect ratios | |
-| `supported_durations` | List[*int*] | ✔️ | Supported video durations in seconds | |
-| `supported_frame_images` | List[[components.SupportedFrameImage](../components/supportedframeimage.mdx)] | ✔️ | Supported frame image types (e.g. first_frame, last_frame) | |
-| `supported_resolutions` | List[[components.SupportedResolution](../components/supportedresolution.mdx)] | ✔️ | Supported output resolutions | |
-| `supported_sizes` | List[[components.SupportedSize](../components/supportedsize.mdx)] | ✔️ | Supported output sizes (width x height) | |
-| `upscale_factor` | [Nullable[components.UpscaleFactor]](../components/upscalefactor.mdx) | ✔️ | Supported upscale factor range for video upscaling models | |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
+| `allowed_passthrough_parameters` | List[*str*] | ✔️ | List of parameters that are allowed to be passed through to the provider | |
+| `canonical_slug` | *str* | ✔️ | Canonical slug for the model | openai/gpt-4 |
+| `created` | *int* | ✔️ | Unix timestamp of when the model was created | 1692901234 |
+| `creativity` | List[*int*] | ✔️ | Supported creativity levels for video upscaling models | |
+| `description` | *Optional[str]* | ➖ | Description of the model | GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy. |
+| `generate_audio` | *Nullable[bool]* | ✔️ | Whether the model supports generating audio alongside video | |
+| `hugging_face_id` | *OptionalNullable[str]* | ➖ | Hugging Face model identifier, if applicable | microsoft/DialoGPT-medium |
+| `id` | *str* | ✔️ | Unique identifier for the model | openai/gpt-4 |
+| `name` | *str* | ✔️ | Display name of the model | GPT-4 |
+| `pricing_skus` | Dict[str, *str*] | ➖ | Pricing SKUs with provider prefix stripped, values as strings | |
+| `seed` | *Nullable[bool]* | ✔️ | Whether the model supports deterministic generation via seed parameter | |
+| `supported_aspect_ratios` | List[[components.SupportedAspectRatio](../components/supportedaspectratio.mdx)] | ✔️ | Supported output aspect ratios | |
+| `supported_durations` | List[*int*] | ✔️ | Supported video durations in seconds. -1 means the model accepts duration -1 and chooses the length itself. | |
+| `supported_frame_images` | List[[components.SupportedFrameImage](../components/supportedframeimage.mdx)] | ✔️ | Supported frame image types (e.g. first_frame, last_frame) | |
+| `supported_resolutions` | List[[components.SupportedResolution](../components/supportedresolution.mdx)] | ✔️ | Supported output resolutions | |
+| `supported_sizes` | List[[components.SupportedSize](../components/supportedsize.mdx)] | ✔️ | Supported output sizes (width x height) | |
+| `upscale_factor` | [Nullable[components.UpscaleFactor]](../components/upscalefactor.mdx) | ✔️ | Supported upscale factor range for video upscaling models | |
\ No newline at end of file
diff --git a/docs/sdks/byok/README.mdx b/docs/sdks/byok/README.mdx
index 69a082306..d3ff828a8 100644
--- a/docs/sdks/byok/README.mdx
+++ b/docs/sdks/byok/README.mdx
@@ -103,7 +103,7 @@ with OpenRouter(
| `http_referer` | *Optional[str]* | ➖ | 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.
| |
| `x_open_router_title` | *Optional[str]* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
| `x_open_router_categories` | *Optional[str]* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
-| `allowed_api_key_hashes` | List[*str*] | ➖ | Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a workspace-scoped management key, so do hashes of API keys outside its own workspace. | [
"f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"
] |
+| `allowed_api_key_hashes` | List[*str*] | ➖ | Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a credential pinned to a workspace, so do hashes of API keys outside that workspace. | [
"f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"
] |
| `allowed_models` | List[*str*] | ➖ | Optional allowlist of model slugs this credential may be used for. `null` means no restriction. | null |
| `allowed_user_ids` | List[*str*] | ➖ | Optional allowlist of user IDs that may use this credential. `null` means no restriction. | null |
| `declared_region` | [OptionalNullable[components.CreateBYOKKeyRequestDeclaredRegion]](../../components/createbyokkeyrequestdeclaredregion.mdx) | ➖ | Your declaration of the data region in which the upstream provider account behind this credential processes requests, used for routing eligibility on OpenRouter's regional hosts. `null` means undeclared and `global` is behaviorally identical: the credential follows the region OpenRouter records for the endpoint. `europe` or `us` lets requests to `eu.openrouter.ai` or `us.openrouter.ai` use this credential for that provider (private endpoints, endpoints pinned to another cloud region, cross-region inference profiles and video models are excluded). Self-declared and not verified by OpenRouter. For OpenAI and Fireworks the region comes from the key material (a `{"api_key": ..., "region": ...}` key), so the value must match the key's region. Among other providers, Azure accepts `europe` or `us` and Anthropic accepts `us` only. Defaults to the key's region for OpenAI and Fireworks, otherwise `null`. | null |
@@ -261,7 +261,7 @@ with OpenRouter(
| `http_referer` | *Optional[str]* | ➖ | 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.
| |
| `x_open_router_title` | *Optional[str]* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
| `x_open_router_categories` | *Optional[str]* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
-| `allowed_api_key_hashes` | List[*str*] | ➖ | Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` clears the restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a workspace-scoped management key, so do hashes of API keys outside its own workspace. | [
"f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"
] |
+| `allowed_api_key_hashes` | List[*str*] | ➖ | Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` clears the restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a credential pinned to a workspace, so do hashes of API keys outside that workspace, unless the credential already lists them (a listed key that has since moved to another workspace stays listed and can be written back). | [
"f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"
] |
| `allowed_models` | List[*str*] | ➖ | Optional allowlist of model slugs this credential may be used for. `null` means no restriction. | null |
| `allowed_user_ids` | List[*str*] | ➖ | Optional allowlist of user IDs that may use this credential. `null` means no restriction. | null |
| `declared_region` | [OptionalNullable[components.UpdateBYOKKeyRequestDeclaredRegion]](../../components/updatebyokkeyrequestdeclaredregion.mdx) | ➖ | Your declaration of the data region in which the upstream provider account behind this credential processes requests, used for routing eligibility on OpenRouter's regional hosts. `null` means undeclared and `global` is behaviorally identical: the credential follows the region OpenRouter records for the endpoint. `europe` or `us` lets requests to `eu.openrouter.ai` or `us.openrouter.ai` use this credential for that provider (private endpoints, endpoints pinned to another cloud region, cross-region inference profiles and video models are excluded). Self-declared and not verified by OpenRouter. For OpenAI and Fireworks the region comes from the key material (a `{"api_key": ..., "region": ...}` key), so the value must match the key's region. Among other providers, Azure accepts `europe` or `us` and Anthropic accepts `us` only. Omit to leave the stored value unchanged (rotating an OpenAI or Fireworks `key` re-derives it from the new key); `null` clears the declaration. | null |
diff --git a/docs/sdks/observability/README.mdx b/docs/sdks/observability/README.mdx
index 9680c97ef..608b9a7a8 100644
--- a/docs/sdks/observability/README.mdx
+++ b/docs/sdks/observability/README.mdx
@@ -99,26 +99,26 @@ with OpenRouter(
### Parameters
-| Parameter | Type | Required | Description | Example |
-| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `config` | Dict[str, *Any*] | ✔️ | Provider-specific configuration. The shape depends on `type` and is validated server-side. | \{
"baseUrl": "https://us.cloud.langfuse.com",
"publicKey": "pk-l...EfGh",
"secretKey": "sk-l...AbCd"
} |
-| `name` | *str* | ✔️ | Human-readable name for the destination. | Production Langfuse |
-| `type` | [components.CreateObservabilityDestinationRequestType](../../components/createobservabilitydestinationrequesttype.mdx) | ✔️ | The destination type. Only stable destination types are accepted. | langfuse |
-| `http_referer` | *Optional[str]* | ➖ | 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.
| |
-| `x_open_router_title` | *Optional[str]* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
-| `x_open_router_categories` | *Optional[str]* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
-| `api_key_hashes` | List[*str*] | ➖ | Optional allowlist of OpenRouter API key hashes whose traffic is forwarded. `null` or omitted means all keys. Must contain at least one hash if provided. A workspace-scoped management key can only name API keys in its own workspace; any other hash returns 400. | null |
-| `broadcast_generation_cost` | *Optional[bool]* | ➖ | When true, include cost and billing generation metadata. | false |
-| `broadcast_generation_cost_allocation` | *Optional[bool]* | ➖ | Beta. When true, include openrouter_cost_allocation: per-token-kind usage and cost, sent only when they reconcile with the billed cost. | false |
-| `broadcast_generation_identity` | *Optional[bool]* | ➖ | When true, include identity generation metadata. | false |
-| `broadcast_generation_request_context` | *Optional[bool]* | ➖ | When true, include request-context generation metadata. | false |
-| `enabled` | *Optional[bool]* | ➖ | Whether this destination should be enabled immediately. | true |
-| `filter_rules` | [OptionalNullable[components.ObservabilityFilterRulesConfigNullable]](../../components/observabilityfilterrulesconfignullable.mdx) | ➖ | Optional structured filter rules controlling which events are forwarded. | null |
-| `privacy_mode` | *Optional[bool]* | ➖ | When true, request/response bodies are not forwarded — only metadata. | false |
-| `regions` | List[[components.ObservabilityDataRegionInput](../../components/observabilitydataregioninput.mdx)] | ➖ | Data regions this destination applies to. `eu` is accepted as an alias for `europe` and normalizes to `europe`. Omitting this field defaults to ['global']; the array must be non-empty. | [
"global"
] |
-| `sampling_rate` | *Optional[float]* | ➖ | Sampling rate between 0.0001 and 1 (1 = 100%). | 1 |
-| `workspace_id` | *Optional[str]* | ➖ | Optional workspace ID. Defaults to the authenticated entity's default workspace, or a workspace-scoped management key's own workspace. | 550e8400-e29b-41d4-a716-446655440000 |
-| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | ➖ | Configuration to override the default retry behavior of the client. | |
+| Parameter | Type | Required | Description | Example |
+| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `config` | Dict[str, *Any*] | ✔️ | Provider-specific configuration. The shape depends on `type` and is validated server-side. | \{
"baseUrl": "https://us.cloud.langfuse.com",
"publicKey": "pk-l...EfGh",
"secretKey": "sk-l...AbCd"
} |
+| `name` | *str* | ✔️ | Human-readable name for the destination. | Production Langfuse |
+| `type` | [components.CreateObservabilityDestinationRequestType](../../components/createobservabilitydestinationrequesttype.mdx) | ✔️ | The destination type. Only stable destination types are accepted. | langfuse |
+| `http_referer` | *Optional[str]* | ➖ | 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.
| |
+| `x_open_router_title` | *Optional[str]* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
+| `x_open_router_categories` | *Optional[str]* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
+| `api_key_hashes` | List[*str*] | ➖ | Optional allowlist of OpenRouter API key hashes whose traffic is forwarded. `null` or omitted means all keys. Must contain at least one hash if provided. Every hash must belong to an API key in the destination's workspace; any other hash returns 400. | null |
+| `broadcast_generation_cost` | *Optional[bool]* | ➖ | When true, include cost and billing generation metadata. | false |
+| `broadcast_generation_cost_allocation` | *Optional[bool]* | ➖ | Beta. When true, include openrouter_cost_allocation: per-token-kind usage and cost, sent only when they reconcile with the billed cost. | false |
+| `broadcast_generation_identity` | *Optional[bool]* | ➖ | When true, include identity generation metadata. | false |
+| `broadcast_generation_request_context` | *Optional[bool]* | ➖ | When true, include request-context generation metadata. | false |
+| `enabled` | *Optional[bool]* | ➖ | Whether this destination should be enabled immediately. | true |
+| `filter_rules` | [OptionalNullable[components.ObservabilityFilterRulesConfigNullable]](../../components/observabilityfilterrulesconfignullable.mdx) | ➖ | Optional structured filter rules controlling which events are forwarded. | null |
+| `privacy_mode` | *Optional[bool]* | ➖ | When true, request/response bodies are not forwarded — only metadata. | false |
+| `regions` | List[[components.ObservabilityDataRegionInput](../../components/observabilitydataregioninput.mdx)] | ➖ | Data regions this destination applies to. `eu` is accepted as an alias for `europe` and normalizes to `europe`. Omitting this field defaults to ['global']; the array must be non-empty. | [
"global"
] |
+| `sampling_rate` | *Optional[float]* | ➖ | Sampling rate between 0.0001 and 1 (1 = 100%). | 1 |
+| `workspace_id` | *Optional[str]* | ➖ | Optional workspace ID. Defaults to the authenticated entity's default workspace, or a workspace-scoped management key's own workspace. | 550e8400-e29b-41d4-a716-446655440000 |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | ➖ | Configuration to override the default retry behavior of the client. | |
### Response
@@ -260,25 +260,25 @@ with OpenRouter(
### Parameters
-| Parameter | Type | Required | Description | Example |
-| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `id` | *str* | ✔️ | The destination ID (UUID). | 99999999-aaaa-bbbb-cccc-dddddddddddd |
-| `http_referer` | *Optional[str]* | ➖ | 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.
| |
-| `x_open_router_title` | *Optional[str]* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
-| `x_open_router_categories` | *Optional[str]* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
-| `api_key_hashes` | List[*str*] | ➖ | Optional allowlist of OpenRouter API key hashes. `null` clears the filter (all keys). Omitting leaves the current value, including any API key from another workspace that an organization-scoped key attached. Must contain at least one hash if provided. A workspace-scoped management key can only name API keys in its own workspace; any other hash returns 400. | null |
-| `broadcast_generation_cost` | *Optional[bool]* | ➖ | Whether to include cost and billing generation metadata. | false |
-| `broadcast_generation_cost_allocation` | *Optional[bool]* | ➖ | Beta. When true, include openrouter_cost_allocation: per-token-kind usage and cost, sent only when they reconcile with the billed cost. | false |
-| `broadcast_generation_identity` | *Optional[bool]* | ➖ | Whether to include identity generation metadata. | false |
-| `broadcast_generation_request_context` | *Optional[bool]* | ➖ | Whether to include request-context generation metadata. | false |
-| `config` | Dict[str, *Any*] | ➖ | Provider-specific configuration fields to update. Masked values are ignored; unset fields keep their current value. | \{
"baseUrl": "https://us.cloud.langfuse.com",
"publicKey": "pk-l...EfGh",
"secretKey": "sk-l...AbCd"
} |
-| `enabled` | *Optional[bool]* | ➖ | Whether the destination is enabled. | true |
-| `filter_rules` | [OptionalNullable[components.ObservabilityFilterRulesConfigNullable]](../../components/observabilityfilterrulesconfignullable.mdx) | ➖ | N/A | null |
-| `name` | *Optional[str]* | ➖ | Human-readable name for the destination. | Production Langfuse |
-| `privacy_mode` | *Optional[bool]* | ➖ | When true, request/response bodies are not forwarded — only metadata. | false |
-| `regions` | List[[components.ObservabilityDataRegionInput](../../components/observabilitydataregioninput.mdx)] | ➖ | Data regions this destination applies to. `eu` is accepted as an alias for `europe` and normalizes to `europe`. Omitting this field keeps the current value; it cannot be cleared. | [
"global"
] |
-| `sampling_rate` | *Optional[float]* | ➖ | Sampling rate between 0.0001 and 1 (1 = 100%). | 1 |
-| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | ➖ | Configuration to override the default retry behavior of the client. | |
+| Parameter | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `id` | *str* | ✔️ | The destination ID (UUID). | 99999999-aaaa-bbbb-cccc-dddddddddddd |
+| `http_referer` | *Optional[str]* | ➖ | 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.
| |
+| `x_open_router_title` | *Optional[str]* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
+| `x_open_router_categories` | *Optional[str]* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
+| `api_key_hashes` | List[*str*] | ➖ | Optional allowlist of OpenRouter API key hashes. `null` clears the filter (all keys). Omitting leaves the current value. Must contain at least one hash if provided. Every hash must belong to an API key in the destination's workspace; any other hash returns 400. A hash the destination already lists is kept even if that key has since moved to another workspace, so an already-listed hash can always be written back. | null |
+| `broadcast_generation_cost` | *Optional[bool]* | ➖ | Whether to include cost and billing generation metadata. | false |
+| `broadcast_generation_cost_allocation` | *Optional[bool]* | ➖ | Beta. When true, include openrouter_cost_allocation: per-token-kind usage and cost, sent only when they reconcile with the billed cost. | false |
+| `broadcast_generation_identity` | *Optional[bool]* | ➖ | Whether to include identity generation metadata. | false |
+| `broadcast_generation_request_context` | *Optional[bool]* | ➖ | Whether to include request-context generation metadata. | false |
+| `config` | Dict[str, *Any*] | ➖ | Provider-specific configuration fields to update. Masked values are ignored; unset fields keep their current value. | \{
"baseUrl": "https://us.cloud.langfuse.com",
"publicKey": "pk-l...EfGh",
"secretKey": "sk-l...AbCd"
} |
+| `enabled` | *Optional[bool]* | ➖ | Whether the destination is enabled. | true |
+| `filter_rules` | [OptionalNullable[components.ObservabilityFilterRulesConfigNullable]](../../components/observabilityfilterrulesconfignullable.mdx) | ➖ | N/A | null |
+| `name` | *Optional[str]* | ➖ | Human-readable name for the destination. | Production Langfuse |
+| `privacy_mode` | *Optional[bool]* | ➖ | When true, request/response bodies are not forwarded — only metadata. | false |
+| `regions` | List[[components.ObservabilityDataRegionInput](../../components/observabilitydataregioninput.mdx)] | ➖ | Data regions this destination applies to. `eu` is accepted as an alias for `europe` and normalizes to `europe`. Omitting this field keeps the current value; it cannot be cleared. | [
"global"
] |
+| `sampling_rate` | *Optional[float]* | ➖ | Sampling rate between 0.0001 and 1 (1 = 100%). | 1 |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | ➖ | Configuration to override the default retry behavior of the client. | |
### Response
diff --git a/docs/sdks/videogeneration/README.mdx b/docs/sdks/videogeneration/README.mdx
index 8d19de6bd..cc656447f 100644
--- a/docs/sdks/videogeneration/README.mdx
+++ b/docs/sdks/videogeneration/README.mdx
@@ -47,10 +47,10 @@ with OpenRouter(
| `http_referer` | *Optional[str]* | ➖ | 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.
| |
| `x_open_router_title` | *Optional[str]* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
| `x_open_router_categories` | *Optional[str]* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
-| `aspect_ratio` | [Optional[components.VideoGenerationRequestAspectRatio]](../../components/videogenerationrequestaspectratio.mdx) | ➖ | Aspect ratio of the generated video | 16:9 |
+| `aspect_ratio` | [Optional[components.VideoGenerationRequestAspectRatio]](../../components/videogenerationrequestaspectratio.mdx) | ➖ | Aspect ratio of the generated video. Omit it to use the model default, which on models with adaptive aspect ratio (e.g. BytePlus Seedance) follows the input image or video. | 16:9 |
| `callback_url` | *Optional[str]* | ➖ | URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. | https://example.com/webhook |
| `creativity` | *Optional[int]* | ➖ | Creativity level for video upscaling models only. This parameter is not supported by video generation models. | 1 |
-| `duration` | *Optional[int]* | ➖ | Duration of the generated video in seconds | 8 |
+| `duration` | *Optional[int]* | ➖ | Duration of the generated video in seconds, or -1 to let the provider choose the length (e.g. following an input video). -1 is only accepted by models that list it in supported_durations. | 8 |
| `frame_images` | List[[components.FrameImage](../../components/frameimage.mdx)] | ➖ | Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. | |
| `generate_audio` | *Optional[bool]* | ➖ | Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. | true |
| `input_references` | List[[components.InputReference](../../components/inputreference.mdx)] | ➖ | Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. | |
diff --git a/pyproject.toml b/pyproject.toml
index 83dded9bd..40aeec2cf 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "openrouter"
-version = "1.3.160"
+version = "1.3.161"
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 fb55d7245..daa46c243 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.160"
+__version__: str = "1.3.161"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.950.13"
-__user_agent__: str = "speakeasy-sdk/python 1.3.160 2.950.13 1.0.0 openrouter"
+__user_agent__: str = "speakeasy-sdk/python 1.3.161 2.950.13 1.0.0 openrouter"
try:
if __package__ is not None:
diff --git a/src/openrouter/byok.py b/src/openrouter/byok.py
index f406badc2..68837b47f 100644
--- a/src/openrouter/byok.py
+++ b/src/openrouter/byok.py
@@ -407,7 +407,7 @@ def create(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param allowed_api_key_hashes: Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a workspace-scoped management key, so do hashes of API keys outside its own workspace.
+ :param allowed_api_key_hashes: Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a credential pinned to a workspace, so do hashes of API keys outside that workspace.
:param allowed_models: Optional allowlist of model slugs this credential may be used for. `null` means no restriction.
:param allowed_user_ids: Optional allowlist of user IDs that may use this credential. `null` means no restriction.
:param declared_region: Your declaration of the data region in which the upstream provider account behind this credential processes requests, used for routing eligibility on OpenRouter's regional hosts. `null` means undeclared and `global` is behaviorally identical: the credential follows the region OpenRouter records for the endpoint. `europe` or `us` lets requests to `eu.openrouter.ai` or `us.openrouter.ai` use this credential for that provider (private endpoints, endpoints pinned to another cloud region, cross-region inference profiles and video models are excluded). Self-declared and not verified by OpenRouter. For OpenAI and Fireworks the region comes from the key material (a `{\"api_key\": ..., \"region\": ...}` key), so the value must match the key's region. Among other providers, Azure accepts `europe` or `us` and Anthropic accepts `us` only. Defaults to the key's region for OpenAI and Fireworks, otherwise `null`.
@@ -593,7 +593,7 @@ async def create_async(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param allowed_api_key_hashes: Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a workspace-scoped management key, so do hashes of API keys outside its own workspace.
+ :param allowed_api_key_hashes: Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a credential pinned to a workspace, so do hashes of API keys outside that workspace.
:param allowed_models: Optional allowlist of model slugs this credential may be used for. `null` means no restriction.
:param allowed_user_ids: Optional allowlist of user IDs that may use this credential. `null` means no restriction.
:param declared_region: Your declaration of the data region in which the upstream provider account behind this credential processes requests, used for routing eligibility on OpenRouter's regional hosts. `null` means undeclared and `global` is behaviorally identical: the credential follows the region OpenRouter records for the endpoint. `europe` or `us` lets requests to `eu.openrouter.ai` or `us.openrouter.ai` use this credential for that provider (private endpoints, endpoints pinned to another cloud region, cross-region inference profiles and video models are excluded). Self-declared and not verified by OpenRouter. For OpenAI and Fireworks the region comes from the key material (a `{\"api_key\": ..., \"region\": ...}` key), so the value must match the key's region. Among other providers, Azure accepts `europe` or `us` and Anthropic accepts `us` only. Defaults to the key's region for OpenAI and Fireworks, otherwise `null`.
@@ -1309,7 +1309,7 @@ def update(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param allowed_api_key_hashes: Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` clears the restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a workspace-scoped management key, so do hashes of API keys outside its own workspace.
+ :param allowed_api_key_hashes: Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` clears the restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a credential pinned to a workspace, so do hashes of API keys outside that workspace, unless the credential already lists them (a listed key that has since moved to another workspace stays listed and can be written back).
:param allowed_models: Optional allowlist of model slugs this credential may be used for. `null` means no restriction.
:param allowed_user_ids: Optional allowlist of user IDs that may use this credential. `null` means no restriction.
:param declared_region: Your declaration of the data region in which the upstream provider account behind this credential processes requests, used for routing eligibility on OpenRouter's regional hosts. `null` means undeclared and `global` is behaviorally identical: the credential follows the region OpenRouter records for the endpoint. `europe` or `us` lets requests to `eu.openrouter.ai` or `us.openrouter.ai` use this credential for that provider (private endpoints, endpoints pinned to another cloud region, cross-region inference profiles and video models are excluded). Self-declared and not verified by OpenRouter. For OpenAI and Fireworks the region comes from the key material (a `{\"api_key\": ..., \"region\": ...}` key), so the value must match the key's region. Among other providers, Azure accepts `europe` or `us` and Anthropic accepts `us` only. Omit to leave the stored value unchanged (rotating an OpenAI or Fireworks `key` re-derives it from the new key); `null` clears the declaration.
@@ -1502,7 +1502,7 @@ async def update_async(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param allowed_api_key_hashes: Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` clears the restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a workspace-scoped management key, so do hashes of API keys outside its own workspace.
+ :param allowed_api_key_hashes: Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` clears the restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a credential pinned to a workspace, so do hashes of API keys outside that workspace, unless the credential already lists them (a listed key that has since moved to another workspace stays listed and can be written back).
:param allowed_models: Optional allowlist of model slugs this credential may be used for. `null` means no restriction.
:param allowed_user_ids: Optional allowlist of user IDs that may use this credential. `null` means no restriction.
:param declared_region: Your declaration of the data region in which the upstream provider account behind this credential processes requests, used for routing eligibility on OpenRouter's regional hosts. `null` means undeclared and `global` is behaviorally identical: the credential follows the region OpenRouter records for the endpoint. `europe` or `us` lets requests to `eu.openrouter.ai` or `us.openrouter.ai` use this credential for that provider (private endpoints, endpoints pinned to another cloud region, cross-region inference profiles and video models are excluded). Self-declared and not verified by OpenRouter. For OpenAI and Fireworks the region comes from the key material (a `{\"api_key\": ..., \"region\": ...}` key), so the value must match the key's region. Among other providers, Azure accepts `europe` or `us` and Anthropic accepts `us` only. Omit to leave the stored value unchanged (rotating an OpenAI or Fireworks `key` re-derives it from the new key); `null` clears the declaration.
diff --git a/src/openrouter/components/byokkey.py b/src/openrouter/components/byokkey.py
index 913b6a89b..4ba4656e1 100644
--- a/src/openrouter/components/byokkey.py
+++ b/src/openrouter/components/byokkey.py
@@ -28,7 +28,7 @@
class BYOKKeyTypedDict(TypedDict):
allowed_api_key_hashes: Nullable[List[str]]
- r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. A workspace-scoped management key can only name API keys in its own workspace."""
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. Keys newly added to a credential pinned to a workspace must be in that workspace; a listed key that has since moved to another workspace stays listed."""
allowed_models: Nullable[List[str]]
r"""Optional allowlist of model slugs this credential may be used for. `null` means no restriction."""
allowed_user_ids: Nullable[List[str]]
@@ -63,7 +63,7 @@ class BYOKKeyTypedDict(TypedDict):
class BYOKKey(BaseModel):
allowed_api_key_hashes: Nullable[List[str]]
- r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. A workspace-scoped management key can only name API keys in its own workspace."""
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. Keys newly added to a credential pinned to a workspace must be in that workspace; a listed key that has since moved to another workspace stays listed."""
allowed_models: Nullable[List[str]]
r"""Optional allowlist of model slugs this credential may be used for. `null` means no restriction."""
diff --git a/src/openrouter/components/createbyokkeyrequest.py b/src/openrouter/components/createbyokkeyrequest.py
index e20af3b2f..56172f855 100644
--- a/src/openrouter/components/createbyokkeyrequest.py
+++ b/src/openrouter/components/createbyokkeyrequest.py
@@ -32,7 +32,7 @@ class CreateBYOKKeyRequestTypedDict(TypedDict):
provider: BYOKProviderSlug
r"""The upstream provider this credential authenticates against, as a lowercase slug (e.g. `openai`, `anthropic`, `amazon-bedrock`)."""
allowed_api_key_hashes: NotRequired[Nullable[List[str]]]
- r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a workspace-scoped management key, so do hashes of API keys outside its own workspace."""
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a credential pinned to a workspace, so do hashes of API keys outside that workspace."""
allowed_models: NotRequired[Nullable[List[str]]]
r"""Optional allowlist of model slugs this credential may be used for. `null` means no restriction."""
allowed_user_ids: NotRequired[Nullable[List[str]]]
@@ -63,7 +63,7 @@ class CreateBYOKKeyRequest(BaseModel):
r"""The upstream provider this credential authenticates against, as a lowercase slug (e.g. `openai`, `anthropic`, `amazon-bedrock`)."""
allowed_api_key_hashes: OptionalNullable[List[str]] = UNSET
- r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a workspace-scoped management key, so do hashes of API keys outside its own workspace."""
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a credential pinned to a workspace, so do hashes of API keys outside that workspace."""
allowed_models: OptionalNullable[List[str]] = UNSET
r"""Optional allowlist of model slugs this credential may be used for. `null` means no restriction."""
diff --git a/src/openrouter/components/createobservabilitydestinationrequest.py b/src/openrouter/components/createobservabilitydestinationrequest.py
index aa510e4cd..fadb1814b 100644
--- a/src/openrouter/components/createobservabilitydestinationrequest.py
+++ b/src/openrouter/components/createobservabilitydestinationrequest.py
@@ -52,7 +52,7 @@ class CreateObservabilityDestinationRequestTypedDict(TypedDict):
type: CreateObservabilityDestinationRequestType
r"""The destination type. Only stable destination types are accepted."""
api_key_hashes: NotRequired[Nullable[List[str]]]
- r"""Optional allowlist of OpenRouter API key hashes whose traffic is forwarded. `null` or omitted means all keys. Must contain at least one hash if provided. A workspace-scoped management key can only name API keys in its own workspace; any other hash returns 400."""
+ r"""Optional allowlist of OpenRouter API key hashes whose traffic is forwarded. `null` or omitted means all keys. Must contain at least one hash if provided. Every hash must belong to an API key in the destination's workspace; any other hash returns 400."""
broadcast_generation_cost: NotRequired[bool]
r"""When true, include cost and billing generation metadata."""
broadcast_generation_cost_allocation: NotRequired[bool]
@@ -86,7 +86,7 @@ class CreateObservabilityDestinationRequest(BaseModel):
r"""The destination type. Only stable destination types are accepted."""
api_key_hashes: OptionalNullable[List[str]] = UNSET
- r"""Optional allowlist of OpenRouter API key hashes whose traffic is forwarded. `null` or omitted means all keys. Must contain at least one hash if provided. A workspace-scoped management key can only name API keys in its own workspace; any other hash returns 400."""
+ r"""Optional allowlist of OpenRouter API key hashes whose traffic is forwarded. `null` or omitted means all keys. Must contain at least one hash if provided. Every hash must belong to an API key in the destination's workspace; any other hash returns 400."""
broadcast_generation_cost: Optional[bool] = False
r"""When true, include cost and billing generation metadata."""
diff --git a/src/openrouter/components/updatebyokkeyrequest.py b/src/openrouter/components/updatebyokkeyrequest.py
index bdf534ee2..493e539a7 100644
--- a/src/openrouter/components/updatebyokkeyrequest.py
+++ b/src/openrouter/components/updatebyokkeyrequest.py
@@ -27,7 +27,7 @@
class UpdateBYOKKeyRequestTypedDict(TypedDict):
allowed_api_key_hashes: NotRequired[Nullable[List[str]]]
- r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` clears the restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a workspace-scoped management key, so do hashes of API keys outside its own workspace."""
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` clears the restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a credential pinned to a workspace, so do hashes of API keys outside that workspace, unless the credential already lists them (a listed key that has since moved to another workspace stays listed and can be written back)."""
allowed_models: NotRequired[Nullable[List[str]]]
r"""Optional allowlist of model slugs this credential may be used for. `null` means no restriction."""
allowed_user_ids: NotRequired[Nullable[List[str]]]
@@ -52,7 +52,7 @@ class UpdateBYOKKeyRequestTypedDict(TypedDict):
class UpdateBYOKKeyRequest(BaseModel):
allowed_api_key_hashes: OptionalNullable[List[str]] = UNSET
- r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` clears the restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a workspace-scoped management key, so do hashes of API keys outside its own workspace."""
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` clears the restriction. Must contain at least one hash if provided. Hashes that do not belong to your account return a 400; for a credential pinned to a workspace, so do hashes of API keys outside that workspace, unless the credential already lists them (a listed key that has since moved to another workspace stays listed and can be written back)."""
allowed_models: OptionalNullable[List[str]] = UNSET
r"""Optional allowlist of model slugs this credential may be used for. `null` means no restriction."""
diff --git a/src/openrouter/components/updateobservabilitydestinationrequest.py b/src/openrouter/components/updateobservabilitydestinationrequest.py
index 139c81904..24c718b32 100644
--- a/src/openrouter/components/updateobservabilitydestinationrequest.py
+++ b/src/openrouter/components/updateobservabilitydestinationrequest.py
@@ -20,7 +20,7 @@
class UpdateObservabilityDestinationRequestTypedDict(TypedDict):
api_key_hashes: NotRequired[Nullable[List[str]]]
- r"""Optional allowlist of OpenRouter API key hashes. `null` clears the filter (all keys). Omitting leaves the current value, including any API key from another workspace that an organization-scoped key attached. Must contain at least one hash if provided. A workspace-scoped management key can only name API keys in its own workspace; any other hash returns 400."""
+ r"""Optional allowlist of OpenRouter API key hashes. `null` clears the filter (all keys). Omitting leaves the current value. Must contain at least one hash if provided. Every hash must belong to an API key in the destination's workspace; any other hash returns 400. A hash the destination already lists is kept even if that key has since moved to another workspace, so an already-listed hash can always be written back."""
broadcast_generation_cost: NotRequired[bool]
r"""Whether to include cost and billing generation metadata."""
broadcast_generation_cost_allocation: NotRequired[bool]
@@ -46,7 +46,7 @@ class UpdateObservabilityDestinationRequestTypedDict(TypedDict):
class UpdateObservabilityDestinationRequest(BaseModel):
api_key_hashes: OptionalNullable[List[str]] = UNSET
- r"""Optional allowlist of OpenRouter API key hashes. `null` clears the filter (all keys). Omitting leaves the current value, including any API key from another workspace that an organization-scoped key attached. Must contain at least one hash if provided. A workspace-scoped management key can only name API keys in its own workspace; any other hash returns 400."""
+ r"""Optional allowlist of OpenRouter API key hashes. `null` clears the filter (all keys). Omitting leaves the current value. Must contain at least one hash if provided. Every hash must belong to an API key in the destination's workspace; any other hash returns 400. A hash the destination already lists is kept even if that key has since moved to another workspace, so an already-listed hash can always be written back."""
broadcast_generation_cost: Optional[bool] = None
r"""Whether to include cost and billing generation metadata."""
diff --git a/src/openrouter/components/videogenerationrequest.py b/src/openrouter/components/videogenerationrequest.py
index 955c38e20..f5f1d6daa 100644
--- a/src/openrouter/components/videogenerationrequest.py
+++ b/src/openrouter/components/videogenerationrequest.py
@@ -33,7 +33,7 @@
],
UnrecognizedStr,
]
-r"""Aspect ratio of the generated video"""
+r"""Aspect ratio of the generated video. Omit it to use the model default, which on models with adaptive aspect ratio (e.g. BytePlus Seedance) follows the input image or video."""
VideoGenerationRequestIgnoreTypedDict = TypeAliasType(
@@ -845,13 +845,13 @@ def serialize_model(self, handler):
class VideoGenerationRequestTypedDict(TypedDict):
model: str
aspect_ratio: NotRequired[VideoGenerationRequestAspectRatio]
- r"""Aspect ratio of the generated video"""
+ r"""Aspect ratio of the generated video. Omit it to use the model default, which on models with adaptive aspect ratio (e.g. BytePlus Seedance) follows the input image or video."""
callback_url: NotRequired[str]
r"""URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS."""
creativity: NotRequired[int]
r"""Creativity level for video upscaling models only. This parameter is not supported by video generation models."""
duration: NotRequired[int]
- r"""Duration of the generated video in seconds"""
+ r"""Duration of the generated video in seconds, or -1 to let the provider choose the length (e.g. following an input video). -1 is only accepted by models that list it in supported_durations."""
frame_images: NotRequired[List[FrameImageTypedDict]]
r"""Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame."""
generate_audio: NotRequired[bool]
@@ -884,7 +884,7 @@ class VideoGenerationRequest(BaseModel):
model: str
aspect_ratio: Optional[VideoGenerationRequestAspectRatio] = None
- r"""Aspect ratio of the generated video"""
+ r"""Aspect ratio of the generated video. Omit it to use the model default, which on models with adaptive aspect ratio (e.g. BytePlus Seedance) follows the input image or video."""
callback_url: Optional[str] = None
r"""URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS."""
@@ -893,7 +893,7 @@ class VideoGenerationRequest(BaseModel):
r"""Creativity level for video upscaling models only. This parameter is not supported by video generation models."""
duration: Optional[int] = None
- r"""Duration of the generated video in seconds"""
+ r"""Duration of the generated video in seconds, or -1 to let the provider choose the length (e.g. following an input video). -1 is only accepted by models that list it in supported_durations."""
frame_images: Optional[List[FrameImage]] = None
r"""Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame."""
diff --git a/src/openrouter/components/videomodel.py b/src/openrouter/components/videomodel.py
index 2d36013f4..b754781cf 100644
--- a/src/openrouter/components/videomodel.py
+++ b/src/openrouter/components/videomodel.py
@@ -194,7 +194,7 @@ class VideoModelTypedDict(TypedDict):
supported_aspect_ratios: Nullable[List[SupportedAspectRatio]]
r"""Supported output aspect ratios"""
supported_durations: Nullable[List[int]]
- r"""Supported video durations in seconds"""
+ r"""Supported video durations in seconds. -1 means the model accepts duration -1 and chooses the length itself."""
supported_frame_images: Nullable[List[SupportedFrameImage]]
r"""Supported frame image types (e.g. first_frame, last_frame)"""
supported_resolutions: Nullable[List[SupportedResolution]]
@@ -240,7 +240,7 @@ class VideoModel(BaseModel):
r"""Supported output aspect ratios"""
supported_durations: Nullable[List[int]]
- r"""Supported video durations in seconds"""
+ r"""Supported video durations in seconds. -1 means the model accepts duration -1 and chooses the length itself."""
supported_frame_images: Nullable[List[SupportedFrameImage]]
r"""Supported frame image types (e.g. first_frame, last_frame)"""
diff --git a/src/openrouter/observability.py b/src/openrouter/observability.py
index a77a677d4..dd8a6eccd 100644
--- a/src/openrouter/observability.py
+++ b/src/openrouter/observability.py
@@ -406,7 +406,7 @@ def create(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param api_key_hashes: Optional allowlist of OpenRouter API key hashes whose traffic is forwarded. `null` or omitted means all keys. Must contain at least one hash if provided. A workspace-scoped management key can only name API keys in its own workspace; any other hash returns 400.
+ :param api_key_hashes: Optional allowlist of OpenRouter API key hashes whose traffic is forwarded. `null` or omitted means all keys. Must contain at least one hash if provided. Every hash must belong to an API key in the destination's workspace; any other hash returns 400.
:param broadcast_generation_cost: When true, include cost and billing generation metadata.
:param broadcast_generation_cost_allocation: Beta. When true, include openrouter_cost_allocation: per-token-kind usage and cost, sent only when they reconcile with the billed cost.
:param broadcast_generation_identity: When true, include identity generation metadata.
@@ -606,7 +606,7 @@ async def create_async(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param api_key_hashes: Optional allowlist of OpenRouter API key hashes whose traffic is forwarded. `null` or omitted means all keys. Must contain at least one hash if provided. A workspace-scoped management key can only name API keys in its own workspace; any other hash returns 400.
+ :param api_key_hashes: Optional allowlist of OpenRouter API key hashes whose traffic is forwarded. `null` or omitted means all keys. Must contain at least one hash if provided. Every hash must belong to an API key in the destination's workspace; any other hash returns 400.
:param broadcast_generation_cost: When true, include cost and billing generation metadata.
:param broadcast_generation_cost_allocation: Beta. When true, include openrouter_cost_allocation: per-token-kind usage and cost, sent only when they reconcile with the billed cost.
:param broadcast_generation_identity: When true, include identity generation metadata.
@@ -1343,7 +1343,7 @@ def update(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param api_key_hashes: Optional allowlist of OpenRouter API key hashes. `null` clears the filter (all keys). Omitting leaves the current value, including any API key from another workspace that an organization-scoped key attached. Must contain at least one hash if provided. A workspace-scoped management key can only name API keys in its own workspace; any other hash returns 400.
+ :param api_key_hashes: Optional allowlist of OpenRouter API key hashes. `null` clears the filter (all keys). Omitting leaves the current value. Must contain at least one hash if provided. Every hash must belong to an API key in the destination's workspace; any other hash returns 400. A hash the destination already lists is kept even if that key has since moved to another workspace, so an already-listed hash can always be written back.
:param broadcast_generation_cost: Whether to include cost and billing generation metadata.
:param broadcast_generation_cost_allocation: Beta. When true, include openrouter_cost_allocation: per-token-kind usage and cost, sent only when they reconcile with the billed cost.
:param broadcast_generation_identity: Whether to include identity generation metadata.
@@ -1545,7 +1545,7 @@ async def update_async(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param api_key_hashes: Optional allowlist of OpenRouter API key hashes. `null` clears the filter (all keys). Omitting leaves the current value, including any API key from another workspace that an organization-scoped key attached. Must contain at least one hash if provided. A workspace-scoped management key can only name API keys in its own workspace; any other hash returns 400.
+ :param api_key_hashes: Optional allowlist of OpenRouter API key hashes. `null` clears the filter (all keys). Omitting leaves the current value. Must contain at least one hash if provided. Every hash must belong to an API key in the destination's workspace; any other hash returns 400. A hash the destination already lists is kept even if that key has since moved to another workspace, so an already-listed hash can always be written back.
:param broadcast_generation_cost: Whether to include cost and billing generation metadata.
:param broadcast_generation_cost_allocation: Beta. When true, include openrouter_cost_allocation: per-token-kind usage and cost, sent only when they reconcile with the billed cost.
:param broadcast_generation_identity: Whether to include identity generation metadata.
diff --git a/src/openrouter/video_generation.py b/src/openrouter/video_generation.py
index 80463dc18..0e38feef7 100644
--- a/src/openrouter/video_generation.py
+++ b/src/openrouter/video_generation.py
@@ -71,10 +71,10 @@ def generate(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param aspect_ratio: Aspect ratio of the generated video
+ :param aspect_ratio: Aspect ratio of the generated video. Omit it to use the model default, which on models with adaptive aspect ratio (e.g. BytePlus Seedance) follows the input image or video.
:param callback_url: URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS.
:param creativity: Creativity level for video upscaling models only. This parameter is not supported by video generation models.
- :param duration: Duration of the generated video in seconds
+ :param duration: Duration of the generated video in seconds, or -1 to let the provider choose the length (e.g. following an input video). -1 is only accepted by models that list it in supported_durations.
:param frame_images: Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame.
:param generate_audio: Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set.
:param input_references: Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest.
@@ -317,10 +317,10 @@ async def generate_async(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param aspect_ratio: Aspect ratio of the generated video
+ :param aspect_ratio: Aspect ratio of the generated video. Omit it to use the model default, which on models with adaptive aspect ratio (e.g. BytePlus Seedance) follows the input image or video.
:param callback_url: URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS.
:param creativity: Creativity level for video upscaling models only. This parameter is not supported by video generation models.
- :param duration: Duration of the generated video in seconds
+ :param duration: Duration of the generated video in seconds, or -1 to let the provider choose the length (e.g. following an input video). -1 is only accepted by models that list it in supported_durations.
:param frame_images: Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame.
:param generate_audio: Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set.
:param input_references: Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest.
diff --git a/uv.lock b/uv.lock
index 2978b1deb..45ae74f5d 100644
--- a/uv.lock
+++ b/uv.lock
@@ -231,7 +231,7 @@ wheels = [
[[package]]
name = "openrouter"
-version = "1.3.160"
+version = "1.3.161"
source = { editable = "." }
dependencies = [
{ name = "httpcore" },