diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock
index 7f49b410..082440b1 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: 2b57a910ce900868d69481fbdbb107e2
+ docChecksum: 71daa6f89575defb9d76a73e5fb672ae
docVersion: 1.0.0
speakeasyVersion: 1.787.0
generationVersion: 2.914.0
- releaseVersion: 0.11.30
- configChecksum: 7dc0b5387e8da51843faaa2b3abeb965
+ releaseVersion: 0.11.31
+ configChecksum: 96b0d171f179dadfbe9d5efdfff0c4c2
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
persistentEdits:
- generation_id: a22f6b13-0ff1-4813-b7be-a4b1fab6b7d6
- pristine_commit_hash: 7f32faacc61245f0cf537d83ad96f0cbae0c5e25
- pristine_tree_hash: e68b33ac89a39aaeca3434449e5272b7549f89d5
+ generation_id: 056b9ee4-a227-4cc6-b7e0-3c97d424d043
+ pristine_commit_hash: 9daff37b2becb50eb2fe167e87e1149e4213b27e
+ pristine_tree_hash: 26d42d8bfd711f5fb23141b6ab241881fd7137a9
features:
python:
acceptHeaders: 3.0.0
@@ -1422,12 +1422,12 @@ trackedFiles:
pristine_git_object: 67494d04412539e0cb0b406ef4e4cce61b3a6c87
docs/components/createguardrailrequest.mdx:
id: c1a768f054c0
- last_write_checksum: sha1:8e8d8f957c48303ea3eb1955c182b26e8c2d5729
- pristine_git_object: f26042f6c6a5c769f5c13030df4f9e48a8077e6b
+ last_write_checksum: sha1:4be348500854ec5c2cb903ad498730b1893de714
+ pristine_git_object: 1c7c87df72d92253b110e550066407bcd057ef87
docs/components/createguardrailresponse.mdx:
id: 1477eebdf505
- last_write_checksum: sha1:5b260347acddb3d10bcb9283673646950b4b3c6b
- pristine_git_object: e876cac85124ae1a612a2611c11e7039a7eed07a
+ last_write_checksum: sha1:15a74cf2abd149416117cc525e6fad918d536afc
+ pristine_git_object: b7e89dc116e820a8748af87b83e66f2706ec5599
docs/components/createobservabilitydestinationrequest.mdx:
id: 8d942a601a6e
last_write_checksum: sha1:968666d16e4c3b3249f7e533829d510c5c043179
@@ -2062,8 +2062,8 @@ trackedFiles:
pristine_git_object: 5730056ada30b50ff129f1da9e021fe69310d5b7
docs/components/getguardrailresponse.mdx:
id: a5ffd4aa91ea
- last_write_checksum: sha1:511fa1f74b06e6f9c8b39ec95dbd976d31daa3fe
- pristine_git_object: 7a49600a95781a703124f690ab3440201b3613fe
+ last_write_checksum: sha1:f1f2143e99650fb602f8c5a14c953b9e0b4ebecd
+ pristine_git_object: 0b5936faf7249661e98170af74382cfcd8b7b69c
docs/components/getobservabilitydestinationresponse.mdx:
id: fc89b94d297e
last_write_checksum: sha1:43e6002bcb78df9ee766e6d97c08a6b238f8cae5
@@ -2082,8 +2082,8 @@ trackedFiles:
pristine_git_object: bb16c1fd514e8e4d4f98dfbebd3a29bcdf8ee192
docs/components/guardrail.mdx:
id: 91791d4c83b6
- last_write_checksum: sha1:071ca3eb0a6f158e4107d7f337c3f7a8e6ac95f8
- pristine_git_object: dc72fbb152e23a7e3903e9aa6479e68baf10f556
+ last_write_checksum: sha1:d10ad674399ad65710d1dd4d4d20fc87d2317e14
+ pristine_git_object: 7d6c170b4990eb92cc3e252c1ffa82836a4875c5
docs/components/guardrailinterval.mdx:
id: ccedea0ab250
last_write_checksum: sha1:08342a9cceb4f7a5dc0b574a429d46af9d9a13f4
@@ -5006,12 +5006,12 @@ trackedFiles:
pristine_git_object: 335feb18256a83af9c732525307d1432a718f3a1
docs/components/updateguardrailrequest.mdx:
id: 450912b18db6
- last_write_checksum: sha1:7f4d97114ddca06c474d4a47ea585d6119d7ec89
- pristine_git_object: 6127914dd10312a4fc00e387c9af8d2d2f1a7150
+ last_write_checksum: sha1:fe895becd42233f628907590d8cde52a7a0c2499
+ pristine_git_object: be349dd72e39c127967315f3914d3f7fc6c6b71f
docs/components/updateguardrailresponse.mdx:
id: e00dc0a0c6e0
- last_write_checksum: sha1:528476cf3a4f15900eb0f4d293498450f0b5079a
- pristine_git_object: 9c95861831e9f31f54efd7d48d8f48eece10e369
+ last_write_checksum: sha1:9fa2b237c77138fad34fce39a922eeafb11964a8
+ pristine_git_object: 7fd2bcafeabc1be627f99a868c06c6f597d04856
docs/components/updateobservabilitydestinationrequest.mdx:
id: b54091567003
last_write_checksum: sha1:9ba0d6c18b145237efd307d621834669669838f8
@@ -5502,8 +5502,8 @@ trackedFiles:
pristine_git_object: 89d6df049a07dd0c7fb980daeee97309cc3ce74a
docs/operations/createguardrailrequest.mdx:
id: 3d30aa9a4ec7
- last_write_checksum: sha1:0440e47100b0ce6309e6ea0d16b7e4e9be50ac59
- pristine_git_object: 906c993096e226923d9aac19bf0bb82ffd35936a
+ last_write_checksum: sha1:aa4af15191dde1fc6b51d7139be1ef3e35fabd28
+ pristine_git_object: 645bf9a23e67ec35700da73403da763ceabcd34c
docs/operations/createimagesglobals.mdx:
id: 3eca6cb49159
last_write_checksum: sha1:9ac3837e42882bcb0edab9d0d801c0893d53d3e5
@@ -6114,8 +6114,8 @@ trackedFiles:
pristine_git_object: 285cb55ce46435b741ac96d7f980a609067d432d
docs/operations/listguardrailsresponse.mdx:
id: b96388a22ab2
- last_write_checksum: sha1:0996fb66661b831820683fa58ca3c0819783aa1d
- pristine_git_object: 519808b7794ecf8c5951991a0857cb27106fc130
+ last_write_checksum: sha1:d2b73aa9c8f8f99290b92c0c891595ea01fab031
+ pristine_git_object: 48f98d5e32fbde3b9fe06d53f93588e6bc351fdf
docs/operations/listimagemodelendpointsglobals.mdx:
id: ac044b2c8762
last_write_checksum: sha1:b8b8e4ba63cd49b7eb1b58f0d01c0c43d6cd6a43
@@ -6606,8 +6606,8 @@ trackedFiles:
pristine_git_object: f262b34982a18293f5ae22bfbbf385010bfcdc9c
docs/sdks/guardrails/README.mdx:
id: a0cd4218b8fa
- last_write_checksum: sha1:a21e4a94d1ee8d031f862e23b9282f8977d38fc2
- pristine_git_object: 52efbd96250f06588fea44689bed93f27f2e0230
+ last_write_checksum: sha1:a559f40ebf9b9f04680cc87be4aebfef34bbb6dd
+ pristine_git_object: db67983c1b2386a3ed60fb23a1610faca0785d69
docs/sdks/images/README.mdx:
id: 534a6c102c4f
last_write_checksum: sha1:1c0a9c704bdd9090f5a0a74f4d9ae0c4360707bb
@@ -6658,16 +6658,16 @@ trackedFiles:
pristine_git_object: 429ca7dad6a66516aec6bb1e674af1e09dc42dd5
docs/sdks/workspaces/README.mdx:
id: 0c75d023ef6b
- last_write_checksum: sha1:d44b36396b3773c8522f57b64fdd2b80a925d7f9
- pristine_git_object: 547d8b71101d58f89209eb7354d40cb96dce03fa
+ last_write_checksum: sha1:177cf8e7c0b14f92eadee9e7fbd1282ed6c8f679
+ pristine_git_object: 0c43dff087b5657ea22168564472c35b7e81d63d
py.typed:
id: 258c3ed47ae4
last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml:
id: 5d07e7d72637
- last_write_checksum: sha1:7fff6806442d03388a1eeba7ced666a73f0b9e4b
- pristine_git_object: b5955b6fb83f318988510683756edc44d54bf68d
+ last_write_checksum: sha1:836c2f803d896f76e749fcfbae9070ea43880710
+ pristine_git_object: cc31c2921b9b60ab306c0e306efc843bf847ff03
scripts/prepare_readme.py:
id: e0c5957a6035
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
@@ -6694,8 +6694,8 @@ trackedFiles:
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
src/openrouter/_version.py:
id: d8d15ad6c586
- last_write_checksum: sha1:6fc2a852500a272de2537814ccf9d5ecba9f032e
- pristine_git_object: 4f9e877e356b1d5d1e23594d3f7de4c2f389c1f6
+ last_write_checksum: sha1:94d5d591203cb4700f3decbcd7e864a271821999
+ pristine_git_object: e72721452a9f36dce4f645bd1d995077867882a8
src/openrouter/analytics.py:
id: cb406b5aaabb
last_write_checksum: sha1:9e709b71dd0611056dc0cec6150b578defe32841
@@ -7370,8 +7370,8 @@ trackedFiles:
pristine_git_object: fcfd9d646f216fdbb715cbbaefa4382d75750b79
src/openrouter/components/createguardrailrequest.py:
id: 34d69149fb33
- last_write_checksum: sha1:4138e0c0ec26c3ec904a49846f9ed70f65227a0e
- pristine_git_object: fb9dae6f51b5cd214cc05653f92014e87bc029ab
+ last_write_checksum: sha1:de39a253f2045f0185536b24c8a4983b9f96fb74
+ pristine_git_object: 83ee2b358b34064762f7560d3c3c9fded954f8d4
src/openrouter/components/createguardrailresponse.py:
id: b4e1bdf1de5b
last_write_checksum: sha1:ae20a5e7425510c240e5697d847b1cae65940bd6
@@ -7654,8 +7654,8 @@ trackedFiles:
pristine_git_object: acda534cb0ced2a391479b720434cf0f57f46276
src/openrouter/components/guardrail.py:
id: 67ee78dd06e6
- last_write_checksum: sha1:d3c96a79c8f1b033378f4c2f21fd74c172457185
- pristine_git_object: b087dc33e958e24a59a4e04584d9af3d6538a990
+ last_write_checksum: sha1:911c0b3d65f34d1bad1b55d963fc8d6394c6e25b
+ pristine_git_object: 7839f84e779127c3c97764efbf7434816245f5a6
src/openrouter/components/guardrailinterval.py:
id: 01687fc135ab
last_write_checksum: sha1:430f886f371b85777346de663202d62708cd84cf
@@ -8822,8 +8822,8 @@ trackedFiles:
pristine_git_object: a3664695c9722c531f7694851da76e51c2efe4fb
src/openrouter/components/updateguardrailrequest.py:
id: 6a557cd822a0
- last_write_checksum: sha1:cbdb7d942739143b727a64ad5330116c96aa6402
- pristine_git_object: d80389ace4e8b02227c7b1fab4496789761a26dd
+ last_write_checksum: sha1:b5377f5f986039b0ff74b9f5d1b8a45247b6c4b1
+ pristine_git_object: 22e9f13f221efafeb7c2828e22c63cdc30cd86c4
src/openrouter/components/updateguardrailresponse.py:
id: 7b068d26ce31
last_write_checksum: sha1:2b63cbb90747f07f775d9a22e80f74c67221fea8
@@ -9078,8 +9078,8 @@ trackedFiles:
pristine_git_object: f6dbf5440466ba6b1d92442cad1b91e2b3587c52
src/openrouter/guardrails.py:
id: 705839f34e66
- last_write_checksum: sha1:65e0cab899a38685f01c55aaac154d7c34e4cf71
- pristine_git_object: 0e06ce70572df1bf0dfc202de4fb6f918f27d1c5
+ last_write_checksum: sha1:45c6fa317d2c33c9fc5c3b59ef6b0e2979ccc16a
+ pristine_git_object: b9fa12541a1210e1ba7b50c75ef9acf3c9ab0cbd
src/openrouter/httpclient.py:
id: e9311185443d
last_write_checksum: sha1:5e55338d6ee9f01ab648cad4380201a8a3da7dd7
@@ -9602,8 +9602,8 @@ trackedFiles:
pristine_git_object: 4a82cde858211c0f5a01b08980cee0e9e3d0f52c
src/openrouter/workspaces.py:
id: cd6c533b1802
- last_write_checksum: sha1:02edbeb467aca20ca454d2bc420aceefd6ef340c
- pristine_git_object: d2088f5ad8c1adcd8824271f322b16bfe03731df
+ last_write_checksum: sha1:3c465ee2641e0d0b42b28de96788f0b38e825f75
+ pristine_git_object: 0e31f05047b6c176effc21f3540fcffc9a2cb6b5
examples:
createResponses:
speakeasy-default-create-responses:
@@ -11149,6 +11149,4 @@ examples:
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
examplesVersion: 1.0.2
-releaseNotes: |
- ## Python SDK Changes:
- * `open_router.beta.responses.send()`: `response` **Changed**
+releaseNotes: "## Python SDK Changes:\n* `open_router.guardrails.list()`: `response.data[].enforce_zdr_xai` **Added**\n* `open_router.guardrails.create()`: \n * `request.enforce_zdr_xai` **Added**\n * `response.data.enforce_zdr_xai` **Added**\n* `open_router.guardrails.get()`: `response.data.enforce_zdr_xai` **Added**\n* `open_router.guardrails.update()`: \n * `request.enforce_zdr_xai` **Added**\n * `response.data.enforce_zdr_xai` **Added**\n"
diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml
index 6bad9130..2c82d293 100644
--- a/.speakeasy/gen.yaml
+++ b/.speakeasy/gen.yaml
@@ -36,7 +36,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
python:
- version: 0.11.30
+ version: 0.11.31
additionalDependencies:
dev: {}
main: {}
diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml
index 504784f2..e7874432 100644
--- a/.speakeasy/out.openapi.yaml
+++ b/.speakeasy/out.openapi.yaml
@@ -6626,6 +6626,7 @@ components:
enforce_zdr_google: false
enforce_zdr_openai: true
enforce_zdr_other: false
+ enforce_zdr_xai: false
ignored_models: null
ignored_providers: null
limit_usd: 50
@@ -6683,7 +6684,7 @@ components:
enforce_zdr:
deprecated: true
description: >-
- Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.
+ Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.
example: false
nullable: true
type: boolean
@@ -6704,7 +6705,12 @@ components:
type: boolean
enforce_zdr_other:
description: >-
- Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided.
+ Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, Google, or xAI. Falls back to enforce_zdr when not provided.
+ example: false
+ nullable: true
+ type: boolean
+ enforce_zdr_xai:
+ description: Whether to enforce zero data retention for xAI models. Falls back to enforce_zdr when not provided.
example: false
nullable: true
type: boolean
@@ -6768,6 +6774,7 @@ components:
enforce_zdr_google: false
enforce_zdr_openai: true
enforce_zdr_other: false
+ enforce_zdr_xai: false
id: 550e8400-e29b-41d4-a716-446655440000
ignored_models: null
ignored_providers: null
@@ -9084,6 +9091,7 @@ components:
enforce_zdr_google: false
enforce_zdr_openai: true
enforce_zdr_other: false
+ enforce_zdr_xai: false
id: 550e8400-e29b-41d4-a716-446655440000
ignored_models: null
ignored_providers: null
@@ -9264,6 +9272,7 @@ components:
enforce_zdr_google: false
enforce_zdr_openai: true
enforce_zdr_other: false
+ enforce_zdr_xai: false
id: 550e8400-e29b-41d4-a716-446655440000
ignored_models: null
ignored_providers: null
@@ -9326,7 +9335,7 @@ components:
enforce_zdr:
deprecated: true
description: >-
- Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.
+ Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.
example: false
nullable: true
type: boolean
@@ -9347,7 +9356,12 @@ components:
type: boolean
enforce_zdr_other:
description: >-
- Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided.
+ Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, Google, or xAI. Falls back to enforce_zdr when not provided.
+ example: false
+ nullable: true
+ type: boolean
+ enforce_zdr_xai:
+ description: Whether to enforce zero data retention for xAI models. Falls back to enforce_zdr when not provided.
example: false
nullable: true
type: boolean
@@ -11058,6 +11072,7 @@ components:
enforce_zdr_google: false
enforce_zdr_openai: true
enforce_zdr_other: false
+ enforce_zdr_xai: false
id: 550e8400-e29b-41d4-a716-446655440000
ignored_models: null
ignored_providers: null
@@ -22510,7 +22525,7 @@ components:
enforce_zdr:
deprecated: true
description: >-
- Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.
+ Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.
example: true
nullable: true
type: boolean
@@ -22531,7 +22546,12 @@ components:
type: boolean
enforce_zdr_other:
description: >-
- Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided.
+ Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, Google, or xAI. Falls back to enforce_zdr when not provided.
+ example: true
+ nullable: true
+ type: boolean
+ enforce_zdr_xai:
+ description: Whether to enforce zero data retention for xAI models. Falls back to enforce_zdr when not provided.
example: true
nullable: true
type: boolean
@@ -22586,6 +22606,7 @@ components:
enforce_zdr_google: true
enforce_zdr_openai: true
enforce_zdr_other: true
+ enforce_zdr_xai: true
id: 550e8400-e29b-41d4-a716-446655440000
ignored_models: null
ignored_providers: null
@@ -28079,6 +28100,7 @@ paths:
enforce_zdr_google: false
enforce_zdr_openai: true
enforce_zdr_other: false
+ enforce_zdr_xai: false
ignored_models: null
ignored_providers: null
limit_usd: 50
@@ -28105,6 +28127,7 @@ paths:
enforce_zdr_google: false
enforce_zdr_openai: true
enforce_zdr_other: false
+ enforce_zdr_xai: false
id: 550e8400-e29b-41d4-a716-446655440000
ignored_models: null
ignored_providers: null
@@ -28334,6 +28357,7 @@ paths:
enforce_zdr_google: true
enforce_zdr_openai: true
enforce_zdr_other: true
+ enforce_zdr_xai: true
id: 550e8400-e29b-41d4-a716-446655440000
ignored_models: null
ignored_providers: null
@@ -35533,7 +35557,7 @@ paths:
/workspaces/{id}/members/remove:
post:
description: >-
- Remove multiple members from a workspace. Members with active API keys in the workspace cannot be removed. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ Remove multiple members from a workspace. Members with active API keys in the workspace cannot be removed. SCIM-managed members cannot be removed; changes must be made in your identity provider. [Management key](/docs/guides/overview/auth/management-api-keys) required.
operationId: bulkRemoveWorkspaceMembers
parameters:
- description: The workspace ID (UUID) or slug
diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock
index 1152f690..3caf57a3 100644
--- a/.speakeasy/workflow.lock
+++ b/.speakeasy/workflow.lock
@@ -2,8 +2,8 @@ speakeasyVersion: 1.787.0
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:c6936e0c99ab2b3eb7457eff0cd75cbdb6c29db355e576ef66d79f8e1537ca61
- sourceBlobDigest: sha256:24d9b45658f2838dd80fdea05a8ebb456d32fd16300e8e2f0f438aa54a8c91ee
+ sourceRevisionDigest: sha256:e41d9374b62c6364b29b039f24a6fa33b6e1aecd74f3d592b4e5dc0e8915f539
+ sourceBlobDigest: sha256:3395078b604c8be9e707ef5d4bfc1861adb8b27ec5b3e960694744eb75dce17c
tags:
- latest
- 1.0.0
@@ -11,10 +11,10 @@ targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:c6936e0c99ab2b3eb7457eff0cd75cbdb6c29db355e576ef66d79f8e1537ca61
- sourceBlobDigest: sha256:24d9b45658f2838dd80fdea05a8ebb456d32fd16300e8e2f0f438aa54a8c91ee
+ sourceRevisionDigest: sha256:e41d9374b62c6364b29b039f24a6fa33b6e1aecd74f3d592b4e5dc0e8915f539
+ sourceBlobDigest: sha256:3395078b604c8be9e707ef5d4bfc1861adb8b27ec5b3e960694744eb75dce17c
codeSamplesNamespace: open-router-python-code-samples
- codeSamplesRevisionDigest: sha256:5ffb925a925219f8c5a35ef3f8eb6b82780cd36ac1a2246ae78f35213af457e4
+ codeSamplesRevisionDigest: sha256:4cb898e1201b335e38601e54fb5999ae9b324e5a45e518a0b443bd823affee26
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.787.0
diff --git a/RELEASES.md b/RELEASES.md
index 42742900..8ccf8783 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -408,4 +408,14 @@ Based on:
### Generated
- [python v0.11.30] .
### Releases
-- [PyPI v0.11.30] https://pypi.org/project/openrouter/0.11.30 - .
\ No newline at end of file
+- [PyPI v0.11.30] https://pypi.org/project/openrouter/0.11.30 - .
+
+## 2026-07-14 21:03:59
+### Changes
+Based on:
+- OpenAPI Doc
+- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v0.11.31] .
+### Releases
+- [PyPI v0.11.31] https://pypi.org/project/openrouter/0.11.31 - .
\ No newline at end of file
diff --git a/docs/components/createguardrailrequest.mdx b/docs/components/createguardrailrequest.mdx
index f26042f6..1c7c87df 100644
--- a/docs/components/createguardrailrequest.mdx
+++ b/docs/components/createguardrailrequest.mdx
@@ -4,21 +4,22 @@ title: "CreateGuardrailRequest"
## Fields
-| Field | Type | Required | Description | Example |
-| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [
"openai/gpt-5.2",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] |
-| `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] |
-| `content_filter_builtins` | List[[components.ContentFilterBuiltinEntryInput](../components/contentfilterbuiltinentryinput.mdx)] | :heavy_minus_sign: | Builtin content filters to apply. The "flag" action is only supported for "regex-prompt-injection"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept "block" or "redact" only. | [
\{
"action": "block",
"slug": "regex-prompt-injection"
}
] |
-| `content_filters` | List[[components.ContentFilterEntry](../components/contentfilterentry.mdx)] | :heavy_minus_sign: | Custom regex content filters to apply to request messages | [
\{
"action": "redact",
"label": "[API_KEY]",
"pattern": "\\b(sk-[a-zA-Z0-9]\{48})\\b"
}
] |
-| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the guardrail | A guardrail for limiting API usage |
-| ~~`enforce_zdr`~~ | *OptionalNullable[bool]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request. | false |
-| `enforce_zdr_anthropic` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided. | false |
-| `enforce_zdr_google` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided. | false |
-| `enforce_zdr_openai` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided. | false |
-| `enforce_zdr_other` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided. | false |
-| `ignored_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers to exclude from routing (slug or canonical_slug accepted) | [
"openai/gpt-4o-mini"
] |
-| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] |
-| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 50 |
-| `name` | *str* | :heavy_check_mark: | Name for the new guardrail | My New Guardrail |
-| `reset_interval` | [OptionalNullable[components.GuardrailInterval]](../components/guardrailinterval.mdx) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
-| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | The workspace to create the guardrail in. Defaults to the default workspace if not provided. | 0df9e665-d932-5740-b2c7-b52af166bc11 |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [
"openai/gpt-5.2",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] |
+| `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] |
+| `content_filter_builtins` | List[[components.ContentFilterBuiltinEntryInput](../components/contentfilterbuiltinentryinput.mdx)] | :heavy_minus_sign: | Builtin content filters to apply. The "flag" action is only supported for "regex-prompt-injection"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept "block" or "redact" only. | [
\{
"action": "block",
"slug": "regex-prompt-injection"
}
] |
+| `content_filters` | List[[components.ContentFilterEntry](../components/contentfilterentry.mdx)] | :heavy_minus_sign: | Custom regex content filters to apply to request messages | [
\{
"action": "redact",
"label": "[API_KEY]",
"pattern": "\\b(sk-[a-zA-Z0-9]\{48})\\b"
}
] |
+| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the guardrail | A guardrail for limiting API usage |
+| ~~`enforce_zdr`~~ | *OptionalNullable[bool]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request. | false |
+| `enforce_zdr_anthropic` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided. | false |
+| `enforce_zdr_google` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided. | false |
+| `enforce_zdr_openai` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided. | false |
+| `enforce_zdr_other` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, Google, or xAI. Falls back to enforce_zdr when not provided. | false |
+| `enforce_zdr_xai` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for xAI models. Falls back to enforce_zdr when not provided. | false |
+| `ignored_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers to exclude from routing (slug or canonical_slug accepted) | [
"openai/gpt-4o-mini"
] |
+| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] |
+| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 50 |
+| `name` | *str* | :heavy_check_mark: | Name for the new guardrail | My New Guardrail |
+| `reset_interval` | [OptionalNullable[components.GuardrailInterval]](../components/guardrailinterval.mdx) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
+| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | The workspace to create the guardrail in. Defaults to the default workspace if not provided. | 0df9e665-d932-5740-b2c7-b52af166bc11 |
\ No newline at end of file
diff --git a/docs/components/createguardrailresponse.mdx b/docs/components/createguardrailresponse.mdx
index e876cac8..b7e89dc1 100644
--- a/docs/components/createguardrailresponse.mdx
+++ b/docs/components/createguardrailresponse.mdx
@@ -4,6 +4,6 @@ title: "CreateGuardrailResponse"
## Fields
-| Field | Type | Required | Description | Example |
-| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `data` | [components.Guardrail](../components/guardrail.mdx) | :heavy_check_mark: | N/A | \{
"allowed_models": null,
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"content_filter_builtins": [
\{
"action": "redact",
"label": "[EMAIL]",
"slug": "email"
}
],
"content_filters": null,
"created_at": "2025-08-24T10:30:00Z",
"description": "Guardrail for production environment",
"enforce_zdr": null,
"enforce_zdr_anthropic": true,
"enforce_zdr_google": false,
"enforce_zdr_openai": true,
"enforce_zdr_other": false,
"id": "550e8400-e29b-41d4-a716-446655440000",
"ignored_models": null,
"ignored_providers": null,
"limit_usd": 100,
"name": "Production Guardrail",
"reset_interval": "monthly",
"updated_at": "2025-08-24T15:45:00Z",
"workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"
} |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `data` | [components.Guardrail](../components/guardrail.mdx) | :heavy_check_mark: | N/A | \{
"allowed_models": null,
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"content_filter_builtins": [
\{
"action": "redact",
"label": "[EMAIL]",
"slug": "email"
}
],
"content_filters": null,
"created_at": "2025-08-24T10:30:00Z",
"description": "Guardrail for production environment",
"enforce_zdr": null,
"enforce_zdr_anthropic": true,
"enforce_zdr_google": false,
"enforce_zdr_openai": true,
"enforce_zdr_other": false,
"enforce_zdr_xai": false,
"id": "550e8400-e29b-41d4-a716-446655440000",
"ignored_models": null,
"ignored_providers": null,
"limit_usd": 100,
"name": "Production Guardrail",
"reset_interval": "monthly",
"updated_at": "2025-08-24T15:45:00Z",
"workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"
} |
\ No newline at end of file
diff --git a/docs/components/getguardrailresponse.mdx b/docs/components/getguardrailresponse.mdx
index 7a49600a..0b5936fa 100644
--- a/docs/components/getguardrailresponse.mdx
+++ b/docs/components/getguardrailresponse.mdx
@@ -4,6 +4,6 @@ title: "GetGuardrailResponse"
## Fields
-| Field | Type | Required | Description | Example |
-| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `data` | [components.Guardrail](../components/guardrail.mdx) | :heavy_check_mark: | N/A | \{
"allowed_models": null,
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"content_filter_builtins": [
\{
"action": "redact",
"label": "[EMAIL]",
"slug": "email"
}
],
"content_filters": null,
"created_at": "2025-08-24T10:30:00Z",
"description": "Guardrail for production environment",
"enforce_zdr": null,
"enforce_zdr_anthropic": true,
"enforce_zdr_google": false,
"enforce_zdr_openai": true,
"enforce_zdr_other": false,
"id": "550e8400-e29b-41d4-a716-446655440000",
"ignored_models": null,
"ignored_providers": null,
"limit_usd": 100,
"name": "Production Guardrail",
"reset_interval": "monthly",
"updated_at": "2025-08-24T15:45:00Z",
"workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"
} |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `data` | [components.Guardrail](../components/guardrail.mdx) | :heavy_check_mark: | N/A | \{
"allowed_models": null,
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"content_filter_builtins": [
\{
"action": "redact",
"label": "[EMAIL]",
"slug": "email"
}
],
"content_filters": null,
"created_at": "2025-08-24T10:30:00Z",
"description": "Guardrail for production environment",
"enforce_zdr": null,
"enforce_zdr_anthropic": true,
"enforce_zdr_google": false,
"enforce_zdr_openai": true,
"enforce_zdr_other": false,
"enforce_zdr_xai": false,
"id": "550e8400-e29b-41d4-a716-446655440000",
"ignored_models": null,
"ignored_providers": null,
"limit_usd": 100,
"name": "Production Guardrail",
"reset_interval": "monthly",
"updated_at": "2025-08-24T15:45:00Z",
"workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"
} |
\ No newline at end of file
diff --git a/docs/components/guardrail.mdx b/docs/components/guardrail.mdx
index dc72fbb1..7d6c170b 100644
--- a/docs/components/guardrail.mdx
+++ b/docs/components/guardrail.mdx
@@ -4,24 +4,25 @@ title: "Guardrail"
## Fields
-| Field | Type | Required | Description | Example |
-| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model canonical_slugs (immutable identifiers) | [
"openai/gpt-5.2-20251211",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] |
-| `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"google"
] |
-| `content_filter_builtins` | List[[components.ContentFilterBuiltinEntry](../components/contentfilterbuiltinentry.mdx)] | :heavy_minus_sign: | Builtin content filters applied to requests. Includes PII detectors and the regex-based prompt injection detector. | [
\{
"action": "redact",
"label": "[EMAIL]",
"slug": "email"
}
] |
-| `content_filters` | List[[components.ContentFilterEntry](../components/contentfilterentry.mdx)] | :heavy_minus_sign: | Custom regex content filters applied to request messages | [
\{
"action": "redact",
"label": "[API_KEY]",
"pattern": "\\b(sk-[a-zA-Z0-9]\{48})\\b"
}
] |
-| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the guardrail was created | 2025-08-24T10:30:00Z |
-| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the guardrail | Guardrail for production environment |
-| ~~`enforce_zdr`~~ | *OptionalNullable[bool]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request. | false |
-| `enforce_zdr_anthropic` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided. | false |
-| `enforce_zdr_google` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided. | false |
-| `enforce_zdr_openai` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided. | false |
-| `enforce_zdr_other` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided. | false |
-| `id` | *str* | :heavy_check_mark: | Unique identifier for the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
-| `ignored_models` | List[*str*] | :heavy_minus_sign: | Array of model canonical_slugs to exclude from routing | [
"openai/gpt-4o-mini-2024-07-18"
] |
-| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] |
-| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 100 |
-| `name` | *str* | :heavy_check_mark: | Name of the guardrail | Production Guardrail |
-| `reset_interval` | [OptionalNullable[components.GuardrailInterval]](../components/guardrailinterval.mdx) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
-| `updated_at` | *OptionalNullable[str]* | :heavy_minus_sign: | ISO 8601 timestamp of when the guardrail was last updated | 2025-08-24T15:45:00Z |
-| `workspace_id` | *str* | :heavy_check_mark: | The workspace ID this guardrail belongs to. | 0df9e665-d932-5740-b2c7-b52af166bc11 |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model canonical_slugs (immutable identifiers) | [
"openai/gpt-5.2-20251211",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] |
+| `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"google"
] |
+| `content_filter_builtins` | List[[components.ContentFilterBuiltinEntry](../components/contentfilterbuiltinentry.mdx)] | :heavy_minus_sign: | Builtin content filters applied to requests. Includes PII detectors and the regex-based prompt injection detector. | [
\{
"action": "redact",
"label": "[EMAIL]",
"slug": "email"
}
] |
+| `content_filters` | List[[components.ContentFilterEntry](../components/contentfilterentry.mdx)] | :heavy_minus_sign: | Custom regex content filters applied to request messages | [
\{
"action": "redact",
"label": "[API_KEY]",
"pattern": "\\b(sk-[a-zA-Z0-9]\{48})\\b"
}
] |
+| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the guardrail was created | 2025-08-24T10:30:00Z |
+| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the guardrail | Guardrail for production environment |
+| ~~`enforce_zdr`~~ | *OptionalNullable[bool]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request. | false |
+| `enforce_zdr_anthropic` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided. | false |
+| `enforce_zdr_google` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided. | false |
+| `enforce_zdr_openai` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided. | false |
+| `enforce_zdr_other` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, Google, or xAI. Falls back to enforce_zdr when not provided. | false |
+| `enforce_zdr_xai` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for xAI models. Falls back to enforce_zdr when not provided. | false |
+| `id` | *str* | :heavy_check_mark: | Unique identifier for the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
+| `ignored_models` | List[*str*] | :heavy_minus_sign: | Array of model canonical_slugs to exclude from routing | [
"openai/gpt-4o-mini-2024-07-18"
] |
+| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] |
+| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 100 |
+| `name` | *str* | :heavy_check_mark: | Name of the guardrail | Production Guardrail |
+| `reset_interval` | [OptionalNullable[components.GuardrailInterval]](../components/guardrailinterval.mdx) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
+| `updated_at` | *OptionalNullable[str]* | :heavy_minus_sign: | ISO 8601 timestamp of when the guardrail was last updated | 2025-08-24T15:45:00Z |
+| `workspace_id` | *str* | :heavy_check_mark: | The workspace ID this guardrail belongs to. | 0df9e665-d932-5740-b2c7-b52af166bc11 |
\ No newline at end of file
diff --git a/docs/components/updateguardrailrequest.mdx b/docs/components/updateguardrailrequest.mdx
index 6127914d..be349dd7 100644
--- a/docs/components/updateguardrailrequest.mdx
+++ b/docs/components/updateguardrailrequest.mdx
@@ -4,20 +4,21 @@ title: "UpdateGuardrailRequest"
## Fields
-| Field | Type | Required | Description | Example |
-| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [
"openai/gpt-5.2"
] |
-| `allowed_providers` | List[*str*] | :heavy_minus_sign: | New list of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] |
-| `content_filter_builtins` | List[[components.ContentFilterBuiltinEntryInput](../components/contentfilterbuiltinentryinput.mdx)] | :heavy_minus_sign: | Builtin content filters to apply. Set to null to remove. The "flag" action is only supported for "regex-prompt-injection"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept "block" or "redact" only. | [
\{
"action": "block",
"slug": "regex-prompt-injection"
}
] |
-| `content_filters` | List[[components.ContentFilterEntry](../components/contentfilterentry.mdx)] | :heavy_minus_sign: | Custom regex content filters to apply. Set to null to remove. | null |
-| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | New description for the guardrail | Updated description |
-| ~~`enforce_zdr`~~ | *OptionalNullable[bool]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request. | true |
-| `enforce_zdr_anthropic` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided. | true |
-| `enforce_zdr_google` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided. | true |
-| `enforce_zdr_openai` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided. | true |
-| `enforce_zdr_other` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided. | true |
-| `ignored_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers to exclude from routing (slug or canonical_slug accepted) | [
"openai/gpt-4o-mini"
] |
-| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] |
-| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | New spending limit in USD | 75 |
-| `name` | *Optional[str]* | :heavy_minus_sign: | New name for the guardrail | Updated Guardrail Name |
-| `reset_interval` | [OptionalNullable[components.GuardrailInterval]](../components/guardrailinterval.mdx) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [
"openai/gpt-5.2"
] |
+| `allowed_providers` | List[*str*] | :heavy_minus_sign: | New list of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] |
+| `content_filter_builtins` | List[[components.ContentFilterBuiltinEntryInput](../components/contentfilterbuiltinentryinput.mdx)] | :heavy_minus_sign: | Builtin content filters to apply. Set to null to remove. The "flag" action is only supported for "regex-prompt-injection"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept "block" or "redact" only. | [
\{
"action": "block",
"slug": "regex-prompt-injection"
}
] |
+| `content_filters` | List[[components.ContentFilterEntry](../components/contentfilterentry.mdx)] | :heavy_minus_sign: | Custom regex content filters to apply. Set to null to remove. | null |
+| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | New description for the guardrail | Updated description |
+| ~~`enforce_zdr`~~ | *OptionalNullable[bool]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request. | true |
+| `enforce_zdr_anthropic` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided. | true |
+| `enforce_zdr_google` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided. | true |
+| `enforce_zdr_openai` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided. | true |
+| `enforce_zdr_other` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, Google, or xAI. Falls back to enforce_zdr when not provided. | true |
+| `enforce_zdr_xai` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for xAI models. Falls back to enforce_zdr when not provided. | true |
+| `ignored_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers to exclude from routing (slug or canonical_slug accepted) | [
"openai/gpt-4o-mini"
] |
+| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] |
+| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | New spending limit in USD | 75 |
+| `name` | *Optional[str]* | :heavy_minus_sign: | New name for the guardrail | Updated Guardrail Name |
+| `reset_interval` | [OptionalNullable[components.GuardrailInterval]](../components/guardrailinterval.mdx) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
\ No newline at end of file
diff --git a/docs/components/updateguardrailresponse.mdx b/docs/components/updateguardrailresponse.mdx
index 9c958618..7fd2bcaf 100644
--- a/docs/components/updateguardrailresponse.mdx
+++ b/docs/components/updateguardrailresponse.mdx
@@ -4,6 +4,6 @@ title: "UpdateGuardrailResponse"
## Fields
-| Field | Type | Required | Description | Example |
-| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `data` | [components.Guardrail](../components/guardrail.mdx) | :heavy_check_mark: | N/A | \{
"allowed_models": null,
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"content_filter_builtins": [
\{
"action": "redact",
"label": "[EMAIL]",
"slug": "email"
}
],
"content_filters": null,
"created_at": "2025-08-24T10:30:00Z",
"description": "Guardrail for production environment",
"enforce_zdr": null,
"enforce_zdr_anthropic": true,
"enforce_zdr_google": false,
"enforce_zdr_openai": true,
"enforce_zdr_other": false,
"id": "550e8400-e29b-41d4-a716-446655440000",
"ignored_models": null,
"ignored_providers": null,
"limit_usd": 100,
"name": "Production Guardrail",
"reset_interval": "monthly",
"updated_at": "2025-08-24T15:45:00Z",
"workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"
} |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `data` | [components.Guardrail](../components/guardrail.mdx) | :heavy_check_mark: | N/A | \{
"allowed_models": null,
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"content_filter_builtins": [
\{
"action": "redact",
"label": "[EMAIL]",
"slug": "email"
}
],
"content_filters": null,
"created_at": "2025-08-24T10:30:00Z",
"description": "Guardrail for production environment",
"enforce_zdr": null,
"enforce_zdr_anthropic": true,
"enforce_zdr_google": false,
"enforce_zdr_openai": true,
"enforce_zdr_other": false,
"enforce_zdr_xai": false,
"id": "550e8400-e29b-41d4-a716-446655440000",
"ignored_models": null,
"ignored_providers": null,
"limit_usd": 100,
"name": "Production Guardrail",
"reset_interval": "monthly",
"updated_at": "2025-08-24T15:45:00Z",
"workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"
} |
\ No newline at end of file
diff --git a/docs/operations/createguardrailrequest.mdx b/docs/operations/createguardrailrequest.mdx
index 906c9930..645bf9a2 100644
--- a/docs/operations/createguardrailrequest.mdx
+++ b/docs/operations/createguardrailrequest.mdx
@@ -4,9 +4,9 @@ title: "CreateGuardrailRequest"
## Fields
-| Field | Type | Required | Description | Example |
-| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `http_referer` | *Optional[str]* | :heavy_minus_sign: | 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]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
-| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
-| `create_guardrail_request` | [components.CreateGuardrailRequest](../components/createguardrailrequest.mdx) | :heavy_check_mark: | N/A | \{
"allowed_models": null,
"allowed_providers": [
"openai",
"anthropic",
"deepseek"
],
"content_filter_builtins": [
\{
"action": "block",
"slug": "regex-prompt-injection"
}
],
"content_filters": null,
"description": "A guardrail for limiting API usage",
"enforce_zdr_anthropic": true,
"enforce_zdr_google": false,
"enforce_zdr_openai": true,
"enforce_zdr_other": false,
"ignored_models": null,
"ignored_providers": null,
"limit_usd": 50,
"name": "My New Guardrail",
"reset_interval": "monthly"
} |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `http_referer` | *Optional[str]* | :heavy_minus_sign: | 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]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
+| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
+| `create_guardrail_request` | [components.CreateGuardrailRequest](../components/createguardrailrequest.mdx) | :heavy_check_mark: | N/A | \{
"allowed_models": null,
"allowed_providers": [
"openai",
"anthropic",
"deepseek"
],
"content_filter_builtins": [
\{
"action": "block",
"slug": "regex-prompt-injection"
}
],
"content_filters": null,
"description": "A guardrail for limiting API usage",
"enforce_zdr_anthropic": true,
"enforce_zdr_google": false,
"enforce_zdr_openai": true,
"enforce_zdr_other": false,
"enforce_zdr_xai": false,
"ignored_models": null,
"ignored_providers": null,
"limit_usd": 50,
"name": "My New Guardrail",
"reset_interval": "monthly"
} |
\ No newline at end of file
diff --git a/docs/operations/listguardrailsresponse.mdx b/docs/operations/listguardrailsresponse.mdx
index 519808b7..48f98d5e 100644
--- a/docs/operations/listguardrailsresponse.mdx
+++ b/docs/operations/listguardrailsresponse.mdx
@@ -4,6 +4,6 @@ title: "ListGuardrailsResponse"
## Fields
-| Field | Type | Required | Description | Example |
-| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `result` | [components.ListGuardrailsResponse](../components/listguardrailsresponse.mdx) | :heavy_check_mark: | N/A | \{
"data": [
\{
"allowed_models": null,
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"content_filter_builtins": [
\{
"action": "redact",
"label": "[EMAIL]",
"slug": "email"
}
],
"content_filters": null,
"created_at": "2025-08-24T10:30:00Z",
"description": "Guardrail for production environment",
"enforce_zdr": null,
"enforce_zdr_anthropic": true,
"enforce_zdr_google": false,
"enforce_zdr_openai": true,
"enforce_zdr_other": false,
"id": "550e8400-e29b-41d4-a716-446655440000",
"ignored_models": null,
"ignored_providers": null,
"limit_usd": 100,
"name": "Production Guardrail",
"reset_interval": "monthly",
"updated_at": "2025-08-24T15:45:00Z",
"workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"
}
],
"total_count": 1
} |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `result` | [components.ListGuardrailsResponse](../components/listguardrailsresponse.mdx) | :heavy_check_mark: | N/A | \{
"data": [
\{
"allowed_models": null,
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"content_filter_builtins": [
\{
"action": "redact",
"label": "[EMAIL]",
"slug": "email"
}
],
"content_filters": null,
"created_at": "2025-08-24T10:30:00Z",
"description": "Guardrail for production environment",
"enforce_zdr": null,
"enforce_zdr_anthropic": true,
"enforce_zdr_google": false,
"enforce_zdr_openai": true,
"enforce_zdr_other": false,
"enforce_zdr_xai": false,
"id": "550e8400-e29b-41d4-a716-446655440000",
"ignored_models": null,
"ignored_providers": null,
"limit_usd": 100,
"name": "Production Guardrail",
"reset_interval": "monthly",
"updated_at": "2025-08-24T15:45:00Z",
"workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"
}
],
"total_count": 1
} |
\ No newline at end of file
diff --git a/docs/sdks/guardrails/README.mdx b/docs/sdks/guardrails/README.mdx
index 52efbd96..db67983c 100644
--- a/docs/sdks/guardrails/README.mdx
+++ b/docs/sdks/guardrails/README.mdx
@@ -96,7 +96,7 @@ with OpenRouter(
"openai",
"anthropic",
"deepseek",
- ], description="A guardrail for limiting API usage", enforce_zdr_anthropic=True, enforce_zdr_google=False, enforce_zdr_openai=True, enforce_zdr_other=False, ignored_models=None, ignored_providers=None, limit_usd=50, reset_interval="monthly")
+ ], description="A guardrail for limiting API usage", enforce_zdr_anthropic=True, enforce_zdr_google=False, enforce_zdr_openai=True, enforce_zdr_other=False, enforce_zdr_xai=False, ignored_models=None, ignored_providers=None, limit_usd=50, reset_interval="monthly")
# Handle response
print(res)
@@ -105,28 +105,29 @@ with OpenRouter(
### Parameters
-| Parameter | Type | Required | Description | Example |
-| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `name` | *str* | :heavy_check_mark: | Name for the new guardrail | My New Guardrail |
-| `http_referer` | *Optional[str]* | :heavy_minus_sign: | 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]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
-| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
-| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [
"openai/gpt-5.2",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] |
-| `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] |
-| `content_filter_builtins` | List[[components.ContentFilterBuiltinEntryInput](../../components/contentfilterbuiltinentryinput.mdx)] | :heavy_minus_sign: | Builtin content filters to apply. The "flag" action is only supported for "regex-prompt-injection"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept "block" or "redact" only. | [
\{
"action": "block",
"slug": "regex-prompt-injection"
}
] |
-| `content_filters` | List[[components.ContentFilterEntry](../../components/contentfilterentry.mdx)] | :heavy_minus_sign: | Custom regex content filters to apply to request messages | [
\{
"action": "redact",
"label": "[API_KEY]",
"pattern": "\\b(sk-[a-zA-Z0-9]\{48})\\b"
}
] |
-| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the guardrail | A guardrail for limiting API usage |
-| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request. | false |
-| `enforce_zdr_anthropic` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided. | false |
-| `enforce_zdr_google` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided. | false |
-| `enforce_zdr_openai` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided. | false |
-| `enforce_zdr_other` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided. | false |
-| `ignored_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers to exclude from routing (slug or canonical_slug accepted) | [
"openai/gpt-4o-mini"
] |
-| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] |
-| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 50 |
-| `reset_interval` | [OptionalNullable[components.GuardrailInterval]](../../components/guardrailinterval.mdx) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
-| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | The workspace to create the guardrail in. Defaults to the default workspace if not provided. | 0df9e665-d932-5740-b2c7-b52af166bc11 |
-| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
+| Parameter | Type | Required | Description | Example |
+| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `name` | *str* | :heavy_check_mark: | Name for the new guardrail | My New Guardrail |
+| `http_referer` | *Optional[str]* | :heavy_minus_sign: | 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]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
+| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
+| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [
"openai/gpt-5.2",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] |
+| `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] |
+| `content_filter_builtins` | List[[components.ContentFilterBuiltinEntryInput](../../components/contentfilterbuiltinentryinput.mdx)] | :heavy_minus_sign: | Builtin content filters to apply. The "flag" action is only supported for "regex-prompt-injection"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept "block" or "redact" only. | [
\{
"action": "block",
"slug": "regex-prompt-injection"
}
] |
+| `content_filters` | List[[components.ContentFilterEntry](../../components/contentfilterentry.mdx)] | :heavy_minus_sign: | Custom regex content filters to apply to request messages | [
\{
"action": "redact",
"label": "[API_KEY]",
"pattern": "\\b(sk-[a-zA-Z0-9]\{48})\\b"
}
] |
+| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the guardrail | A guardrail for limiting API usage |
+| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request. | false |
+| `enforce_zdr_anthropic` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided. | false |
+| `enforce_zdr_google` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided. | false |
+| `enforce_zdr_openai` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided. | false |
+| `enforce_zdr_other` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, Google, or xAI. Falls back to enforce_zdr when not provided. | false |
+| `enforce_zdr_xai` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for xAI models. Falls back to enforce_zdr when not provided. | false |
+| `ignored_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers to exclude from routing (slug or canonical_slug accepted) | [
"openai/gpt-4o-mini"
] |
+| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] |
+| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 50 |
+| `reset_interval` | [OptionalNullable[components.GuardrailInterval]](../../components/guardrailinterval.mdx) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
+| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | The workspace to create the guardrail in. Defaults to the default workspace if not provided. | 0df9e665-d932-5740-b2c7-b52af166bc11 |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
### Response
@@ -265,28 +266,29 @@ with OpenRouter(
### Parameters
-| Parameter | Type | Required | Description | Example |
-| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to update | 550e8400-e29b-41d4-a716-446655440000 |
-| `http_referer` | *Optional[str]* | :heavy_minus_sign: | 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]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
-| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
-| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [
"openai/gpt-5.2"
] |
-| `allowed_providers` | List[*str*] | :heavy_minus_sign: | New list of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] |
-| `content_filter_builtins` | List[[components.ContentFilterBuiltinEntryInput](../../components/contentfilterbuiltinentryinput.mdx)] | :heavy_minus_sign: | Builtin content filters to apply. Set to null to remove. The "flag" action is only supported for "regex-prompt-injection"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept "block" or "redact" only. | [
\{
"action": "block",
"slug": "regex-prompt-injection"
}
] |
-| `content_filters` | List[[components.ContentFilterEntry](../../components/contentfilterentry.mdx)] | :heavy_minus_sign: | Custom regex content filters to apply. Set to null to remove. | null |
-| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | New description for the guardrail | Updated description |
-| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request. | true |
-| `enforce_zdr_anthropic` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided. | true |
-| `enforce_zdr_google` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided. | true |
-| `enforce_zdr_openai` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided. | true |
-| `enforce_zdr_other` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided. | true |
-| `ignored_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers to exclude from routing (slug or canonical_slug accepted) | [
"openai/gpt-4o-mini"
] |
-| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] |
-| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | New spending limit in USD | 75 |
-| `name` | *Optional[str]* | :heavy_minus_sign: | New name for the guardrail | Updated Guardrail Name |
-| `reset_interval` | [OptionalNullable[components.GuardrailInterval]](../../components/guardrailinterval.mdx) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
-| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
+| Parameter | Type | Required | Description | Example |
+| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to update | 550e8400-e29b-41d4-a716-446655440000 |
+| `http_referer` | *Optional[str]* | :heavy_minus_sign: | 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]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
+| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
+| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [
"openai/gpt-5.2"
] |
+| `allowed_providers` | List[*str*] | :heavy_minus_sign: | New list of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] |
+| `content_filter_builtins` | List[[components.ContentFilterBuiltinEntryInput](../../components/contentfilterbuiltinentryinput.mdx)] | :heavy_minus_sign: | Builtin content filters to apply. Set to null to remove. The "flag" action is only supported for "regex-prompt-injection"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept "block" or "redact" only. | [
\{
"action": "block",
"slug": "regex-prompt-injection"
}
] |
+| `content_filters` | List[[components.ContentFilterEntry](../../components/contentfilterentry.mdx)] | :heavy_minus_sign: | Custom regex content filters to apply. Set to null to remove. | null |
+| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | New description for the guardrail | Updated description |
+| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request. | true |
+| `enforce_zdr_anthropic` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided. | true |
+| `enforce_zdr_google` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided. | true |
+| `enforce_zdr_openai` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided. | true |
+| `enforce_zdr_other` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, Google, or xAI. Falls back to enforce_zdr when not provided. | true |
+| `enforce_zdr_xai` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for xAI models. Falls back to enforce_zdr when not provided. | true |
+| `ignored_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers to exclude from routing (slug or canonical_slug accepted) | [
"openai/gpt-4o-mini"
] |
+| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] |
+| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | New spending limit in USD | 75 |
+| `name` | *Optional[str]* | :heavy_minus_sign: | New name for the guardrail | Updated Guardrail Name |
+| `reset_interval` | [OptionalNullable[components.GuardrailInterval]](../../components/guardrailinterval.mdx) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
### Response
diff --git a/docs/sdks/workspaces/README.mdx b/docs/sdks/workspaces/README.mdx
index 547d8b71..0c43dff0 100644
--- a/docs/sdks/workspaces/README.mdx
+++ b/docs/sdks/workspaces/README.mdx
@@ -546,7 +546,7 @@ with OpenRouter(
## bulk_remove_members
-Remove multiple members from a workspace. Members with active API keys in the workspace cannot be removed. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+Remove multiple members from a workspace. Members with active API keys in the workspace cannot be removed. SCIM-managed members cannot be removed; changes must be made in your identity provider. [Management key](/docs/guides/overview/auth/management-api-keys) required.
### Example Usage
diff --git a/pyproject.toml b/pyproject.toml
index b5955b6f..cc31c292 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "openrouter"
-version = "0.11.30"
+version = "0.11.31"
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 4f9e877e..e7272145 100644
--- a/src/openrouter/_version.py
+++ b/src/openrouter/_version.py
@@ -3,10 +3,10 @@
import importlib.metadata
__title__: str = "openrouter"
-__version__: str = "0.11.30"
+__version__: str = "0.11.31"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.914.0"
-__user_agent__: str = "speakeasy-sdk/python 0.11.30 2.914.0 1.0.0 openrouter"
+__user_agent__: str = "speakeasy-sdk/python 0.11.31 2.914.0 1.0.0 openrouter"
try:
if __package__ is not None:
diff --git a/src/openrouter/components/createguardrailrequest.py b/src/openrouter/components/createguardrailrequest.py
index fb9dae6f..83ee2b35 100644
--- a/src/openrouter/components/createguardrailrequest.py
+++ b/src/openrouter/components/createguardrailrequest.py
@@ -36,7 +36,7 @@ class CreateGuardrailRequestTypedDict(TypedDict):
description: NotRequired[Nullable[str]]
r"""Description of the guardrail"""
enforce_zdr: NotRequired[Nullable[bool]]
- r"""Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request."""
+ r"""Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request."""
enforce_zdr_anthropic: NotRequired[Nullable[bool]]
r"""Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided."""
enforce_zdr_google: NotRequired[Nullable[bool]]
@@ -44,7 +44,9 @@ class CreateGuardrailRequestTypedDict(TypedDict):
enforce_zdr_openai: NotRequired[Nullable[bool]]
r"""Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided."""
enforce_zdr_other: NotRequired[Nullable[bool]]
- r"""Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided."""
+ r"""Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, Google, or xAI. Falls back to enforce_zdr when not provided."""
+ enforce_zdr_xai: NotRequired[Nullable[bool]]
+ r"""Whether to enforce zero data retention for xAI models. Falls back to enforce_zdr when not provided."""
ignored_models: NotRequired[Nullable[List[str]]]
r"""Array of model identifiers to exclude from routing (slug or canonical_slug accepted)"""
ignored_providers: NotRequired[Nullable[List[str]]]
@@ -84,7 +86,7 @@ class CreateGuardrailRequest(BaseModel):
deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
),
] = UNSET
- r"""Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request."""
+ r"""Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request."""
enforce_zdr_anthropic: OptionalNullable[bool] = UNSET
r"""Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided."""
@@ -96,7 +98,10 @@ class CreateGuardrailRequest(BaseModel):
r"""Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided."""
enforce_zdr_other: OptionalNullable[bool] = UNSET
- r"""Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided."""
+ r"""Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, Google, or xAI. Falls back to enforce_zdr when not provided."""
+
+ enforce_zdr_xai: OptionalNullable[bool] = UNSET
+ r"""Whether to enforce zero data retention for xAI models. Falls back to enforce_zdr when not provided."""
ignored_models: OptionalNullable[List[str]] = UNSET
r"""Array of model identifiers to exclude from routing (slug or canonical_slug accepted)"""
@@ -127,6 +132,7 @@ def serialize_model(self, handler):
"enforce_zdr_google",
"enforce_zdr_openai",
"enforce_zdr_other",
+ "enforce_zdr_xai",
"ignored_models",
"ignored_providers",
"limit_usd",
@@ -146,6 +152,7 @@ def serialize_model(self, handler):
"enforce_zdr_google",
"enforce_zdr_openai",
"enforce_zdr_other",
+ "enforce_zdr_xai",
"ignored_models",
"ignored_providers",
"limit_usd",
diff --git a/src/openrouter/components/guardrail.py b/src/openrouter/components/guardrail.py
index b087dc33..7839f84e 100644
--- a/src/openrouter/components/guardrail.py
+++ b/src/openrouter/components/guardrail.py
@@ -42,7 +42,7 @@ class GuardrailTypedDict(TypedDict):
description: NotRequired[Nullable[str]]
r"""Description of the guardrail"""
enforce_zdr: NotRequired[Nullable[bool]]
- r"""Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request."""
+ r"""Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request."""
enforce_zdr_anthropic: NotRequired[Nullable[bool]]
r"""Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided."""
enforce_zdr_google: NotRequired[Nullable[bool]]
@@ -50,7 +50,9 @@ class GuardrailTypedDict(TypedDict):
enforce_zdr_openai: NotRequired[Nullable[bool]]
r"""Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided."""
enforce_zdr_other: NotRequired[Nullable[bool]]
- r"""Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided."""
+ r"""Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, Google, or xAI. Falls back to enforce_zdr when not provided."""
+ enforce_zdr_xai: NotRequired[Nullable[bool]]
+ r"""Whether to enforce zero data retention for xAI models. Falls back to enforce_zdr when not provided."""
ignored_models: NotRequired[Nullable[List[str]]]
r"""Array of model canonical_slugs to exclude from routing"""
ignored_providers: NotRequired[Nullable[List[str]]]
@@ -97,7 +99,7 @@ class Guardrail(BaseModel):
deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
),
] = UNSET
- r"""Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request."""
+ r"""Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request."""
enforce_zdr_anthropic: OptionalNullable[bool] = UNSET
r"""Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided."""
@@ -109,7 +111,10 @@ class Guardrail(BaseModel):
r"""Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided."""
enforce_zdr_other: OptionalNullable[bool] = UNSET
- r"""Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided."""
+ r"""Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, Google, or xAI. Falls back to enforce_zdr when not provided."""
+
+ enforce_zdr_xai: OptionalNullable[bool] = UNSET
+ r"""Whether to enforce zero data retention for xAI models. Falls back to enforce_zdr when not provided."""
ignored_models: OptionalNullable[List[str]] = UNSET
r"""Array of model canonical_slugs to exclude from routing"""
@@ -140,6 +145,7 @@ def serialize_model(self, handler):
"enforce_zdr_google",
"enforce_zdr_openai",
"enforce_zdr_other",
+ "enforce_zdr_xai",
"ignored_models",
"ignored_providers",
"limit_usd",
@@ -159,6 +165,7 @@ def serialize_model(self, handler):
"enforce_zdr_google",
"enforce_zdr_openai",
"enforce_zdr_other",
+ "enforce_zdr_xai",
"ignored_models",
"ignored_providers",
"limit_usd",
diff --git a/src/openrouter/components/updateguardrailrequest.py b/src/openrouter/components/updateguardrailrequest.py
index d80389ac..22e9f13f 100644
--- a/src/openrouter/components/updateguardrailrequest.py
+++ b/src/openrouter/components/updateguardrailrequest.py
@@ -34,7 +34,7 @@ class UpdateGuardrailRequestTypedDict(TypedDict):
description: NotRequired[Nullable[str]]
r"""New description for the guardrail"""
enforce_zdr: NotRequired[Nullable[bool]]
- r"""Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request."""
+ r"""Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request."""
enforce_zdr_anthropic: NotRequired[Nullable[bool]]
r"""Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided."""
enforce_zdr_google: NotRequired[Nullable[bool]]
@@ -42,7 +42,9 @@ class UpdateGuardrailRequestTypedDict(TypedDict):
enforce_zdr_openai: NotRequired[Nullable[bool]]
r"""Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided."""
enforce_zdr_other: NotRequired[Nullable[bool]]
- r"""Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided."""
+ r"""Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, Google, or xAI. Falls back to enforce_zdr when not provided."""
+ enforce_zdr_xai: NotRequired[Nullable[bool]]
+ r"""Whether to enforce zero data retention for xAI models. Falls back to enforce_zdr when not provided."""
ignored_models: NotRequired[Nullable[List[str]]]
r"""Array of model identifiers to exclude from routing (slug or canonical_slug accepted)"""
ignored_providers: NotRequired[Nullable[List[str]]]
@@ -79,7 +81,7 @@ class UpdateGuardrailRequest(BaseModel):
deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
),
] = UNSET
- r"""Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request."""
+ r"""Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request."""
enforce_zdr_anthropic: OptionalNullable[bool] = UNSET
r"""Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided."""
@@ -91,7 +93,10 @@ class UpdateGuardrailRequest(BaseModel):
r"""Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided."""
enforce_zdr_other: OptionalNullable[bool] = UNSET
- r"""Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided."""
+ r"""Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, Google, or xAI. Falls back to enforce_zdr when not provided."""
+
+ enforce_zdr_xai: OptionalNullable[bool] = UNSET
+ r"""Whether to enforce zero data retention for xAI models. Falls back to enforce_zdr when not provided."""
ignored_models: OptionalNullable[List[str]] = UNSET
r"""Array of model identifiers to exclude from routing (slug or canonical_slug accepted)"""
@@ -122,6 +127,7 @@ def serialize_model(self, handler):
"enforce_zdr_google",
"enforce_zdr_openai",
"enforce_zdr_other",
+ "enforce_zdr_xai",
"ignored_models",
"ignored_providers",
"limit_usd",
@@ -141,6 +147,7 @@ def serialize_model(self, handler):
"enforce_zdr_google",
"enforce_zdr_openai",
"enforce_zdr_other",
+ "enforce_zdr_xai",
"ignored_models",
"ignored_providers",
"limit_usd",
diff --git a/src/openrouter/guardrails.py b/src/openrouter/guardrails.py
index 0e06ce70..b9fa1254 100644
--- a/src/openrouter/guardrails.py
+++ b/src/openrouter/guardrails.py
@@ -367,6 +367,7 @@ def create(
enforce_zdr_google: OptionalNullable[bool] = UNSET,
enforce_zdr_openai: OptionalNullable[bool] = UNSET,
enforce_zdr_other: OptionalNullable[bool] = UNSET,
+ enforce_zdr_xai: OptionalNullable[bool] = UNSET,
ignored_models: OptionalNullable[Iterable[str]] = UNSET,
ignored_providers: OptionalNullable[Iterable[str]] = UNSET,
limit_usd: OptionalNullable[float] = UNSET,
@@ -394,11 +395,12 @@ def create(
:param content_filter_builtins: Builtin content filters to apply. The \"flag\" action is only supported for \"regex-prompt-injection\"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept \"block\" or \"redact\" only.
:param content_filters: Custom regex content filters to apply to request messages
:param description: Description of the guardrail
- :param enforce_zdr: Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.
+ :param enforce_zdr: Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.
:param enforce_zdr_anthropic: Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided.
:param enforce_zdr_google: Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided.
:param enforce_zdr_openai: Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided.
- :param enforce_zdr_other: Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided.
+ :param enforce_zdr_other: Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, Google, or xAI. Falls back to enforce_zdr when not provided.
+ :param enforce_zdr_xai: Whether to enforce zero data retention for xAI models. Falls back to enforce_zdr when not provided.
:param ignored_models: Array of model identifiers to exclude from routing (slug or canonical_slug accepted)
:param ignored_providers: List of provider IDs to exclude from routing
:param limit_usd: Spending limit in USD
@@ -444,6 +446,7 @@ def create(
enforce_zdr_google=enforce_zdr_google,
enforce_zdr_openai=enforce_zdr_openai,
enforce_zdr_other=enforce_zdr_other,
+ enforce_zdr_xai=enforce_zdr_xai,
ignored_models=utils.unmarshal(
ignored_models, OptionalNullable[List[str]]
),
@@ -578,6 +581,7 @@ async def create_async(
enforce_zdr_google: OptionalNullable[bool] = UNSET,
enforce_zdr_openai: OptionalNullable[bool] = UNSET,
enforce_zdr_other: OptionalNullable[bool] = UNSET,
+ enforce_zdr_xai: OptionalNullable[bool] = UNSET,
ignored_models: OptionalNullable[Iterable[str]] = UNSET,
ignored_providers: OptionalNullable[Iterable[str]] = UNSET,
limit_usd: OptionalNullable[float] = UNSET,
@@ -605,11 +609,12 @@ async def create_async(
:param content_filter_builtins: Builtin content filters to apply. The \"flag\" action is only supported for \"regex-prompt-injection\"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept \"block\" or \"redact\" only.
:param content_filters: Custom regex content filters to apply to request messages
:param description: Description of the guardrail
- :param enforce_zdr: Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.
+ :param enforce_zdr: Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.
:param enforce_zdr_anthropic: Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided.
:param enforce_zdr_google: Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided.
:param enforce_zdr_openai: Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided.
- :param enforce_zdr_other: Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided.
+ :param enforce_zdr_other: Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, Google, or xAI. Falls back to enforce_zdr when not provided.
+ :param enforce_zdr_xai: Whether to enforce zero data retention for xAI models. Falls back to enforce_zdr when not provided.
:param ignored_models: Array of model identifiers to exclude from routing (slug or canonical_slug accepted)
:param ignored_providers: List of provider IDs to exclude from routing
:param limit_usd: Spending limit in USD
@@ -655,6 +660,7 @@ async def create_async(
enforce_zdr_google=enforce_zdr_google,
enforce_zdr_openai=enforce_zdr_openai,
enforce_zdr_other=enforce_zdr_other,
+ enforce_zdr_xai=enforce_zdr_xai,
ignored_models=utils.unmarshal(
ignored_models, OptionalNullable[List[str]]
),
@@ -1301,6 +1307,7 @@ def update(
enforce_zdr_google: OptionalNullable[bool] = UNSET,
enforce_zdr_openai: OptionalNullable[bool] = UNSET,
enforce_zdr_other: OptionalNullable[bool] = UNSET,
+ enforce_zdr_xai: OptionalNullable[bool] = UNSET,
ignored_models: OptionalNullable[Iterable[str]] = UNSET,
ignored_providers: OptionalNullable[Iterable[str]] = UNSET,
limit_usd: OptionalNullable[float] = UNSET,
@@ -1328,11 +1335,12 @@ def update(
:param content_filter_builtins: Builtin content filters to apply. Set to null to remove. The \"flag\" action is only supported for \"regex-prompt-injection\"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept \"block\" or \"redact\" only.
:param content_filters: Custom regex content filters to apply. Set to null to remove.
:param description: New description for the guardrail
- :param enforce_zdr: Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.
+ :param enforce_zdr: Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.
:param enforce_zdr_anthropic: Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided.
:param enforce_zdr_google: Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided.
:param enforce_zdr_openai: Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided.
- :param enforce_zdr_other: Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided.
+ :param enforce_zdr_other: Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, Google, or xAI. Falls back to enforce_zdr when not provided.
+ :param enforce_zdr_xai: Whether to enforce zero data retention for xAI models. Falls back to enforce_zdr when not provided.
:param ignored_models: Array of model identifiers to exclude from routing (slug or canonical_slug accepted)
:param ignored_providers: List of provider IDs to exclude from routing
:param limit_usd: New spending limit in USD
@@ -1379,6 +1387,7 @@ def update(
enforce_zdr_google=enforce_zdr_google,
enforce_zdr_openai=enforce_zdr_openai,
enforce_zdr_other=enforce_zdr_other,
+ enforce_zdr_xai=enforce_zdr_xai,
ignored_models=utils.unmarshal(
ignored_models, OptionalNullable[List[str]]
),
@@ -1512,6 +1521,7 @@ async def update_async(
enforce_zdr_google: OptionalNullable[bool] = UNSET,
enforce_zdr_openai: OptionalNullable[bool] = UNSET,
enforce_zdr_other: OptionalNullable[bool] = UNSET,
+ enforce_zdr_xai: OptionalNullable[bool] = UNSET,
ignored_models: OptionalNullable[Iterable[str]] = UNSET,
ignored_providers: OptionalNullable[Iterable[str]] = UNSET,
limit_usd: OptionalNullable[float] = UNSET,
@@ -1539,11 +1549,12 @@ async def update_async(
:param content_filter_builtins: Builtin content filters to apply. Set to null to remove. The \"flag\" action is only supported for \"regex-prompt-injection\"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept \"block\" or \"redact\" only.
:param content_filters: Custom regex content filters to apply. Set to null to remove.
:param description: New description for the guardrail
- :param enforce_zdr: Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.
+ :param enforce_zdr: Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.
:param enforce_zdr_anthropic: Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided.
:param enforce_zdr_google: Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided.
:param enforce_zdr_openai: Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided.
- :param enforce_zdr_other: Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided.
+ :param enforce_zdr_other: Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, Google, or xAI. Falls back to enforce_zdr when not provided.
+ :param enforce_zdr_xai: Whether to enforce zero data retention for xAI models. Falls back to enforce_zdr when not provided.
:param ignored_models: Array of model identifiers to exclude from routing (slug or canonical_slug accepted)
:param ignored_providers: List of provider IDs to exclude from routing
:param limit_usd: New spending limit in USD
@@ -1590,6 +1601,7 @@ async def update_async(
enforce_zdr_google=enforce_zdr_google,
enforce_zdr_openai=enforce_zdr_openai,
enforce_zdr_other=enforce_zdr_other,
+ enforce_zdr_xai=enforce_zdr_xai,
ignored_models=utils.unmarshal(
ignored_models, OptionalNullable[List[str]]
),
diff --git a/src/openrouter/workspaces.py b/src/openrouter/workspaces.py
index d2088f5a..0e31f050 100644
--- a/src/openrouter/workspaces.py
+++ b/src/openrouter/workspaces.py
@@ -3068,7 +3068,7 @@ def bulk_remove_members(
) -> components.BulkRemoveWorkspaceMembersResponse:
r"""Bulk remove members from a workspace
- Remove multiple members from a workspace. Members with active API keys in the workspace cannot be removed. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ Remove multiple members from a workspace. Members with active API keys in the workspace cannot be removed. SCIM-managed members cannot be removed; changes must be made in your identity provider. [Management key](/docs/guides/overview/auth/management-api-keys) required.
:param id: The workspace ID (UUID) or slug
:param user_ids: List of user IDs to remove from the workspace
@@ -3220,7 +3220,7 @@ async def bulk_remove_members_async(
) -> components.BulkRemoveWorkspaceMembersResponse:
r"""Bulk remove members from a workspace
- Remove multiple members from a workspace. Members with active API keys in the workspace cannot be removed. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ Remove multiple members from a workspace. Members with active API keys in the workspace cannot be removed. SCIM-managed members cannot be removed; changes must be made in your identity provider. [Management key](/docs/guides/overview/auth/management-api-keys) required.
:param id: The workspace ID (UUID) or slug
:param user_ids: List of user IDs to remove from the workspace
diff --git a/uv.lock b/uv.lock
index 7c5e31e4..ab467238 100644
--- a/uv.lock
+++ b/uv.lock
@@ -213,7 +213,7 @@ wheels = [
[[package]]
name = "openrouter"
-version = "0.11.30"
+version = "0.11.31"
source = { editable = "." }
dependencies = [
{ name = "httpcore" },