mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-30 12:20:57 +08:00
docs: Mintlify MDX docs + docs.json; bump Speakeasy to 1.787.0 (#382)
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
# Guardrails
|
||||
---
|
||||
title: "Guardrails"
|
||||
description: "Guardrails endpoints"
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -26,7 +29,6 @@ List all guardrails for the authenticated user. [Management key](/docs/guides/ov
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="listGuardrails" method="get" path="/guardrails" -->
|
||||
```python
|
||||
from openrouter import OpenRouter
|
||||
import os
|
||||
@@ -58,11 +60,11 @@ with OpenRouter(
|
||||
| `offset` | *Optional[int]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
|
||||
| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||
| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Filter guardrails by workspace ID. By default, guardrails in the default workspace are returned. | 0df9e665-d932-5740-b2c7-b52af166bc11 |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.ListGuardrailsResponse](../../operations/listguardrailsresponse.md)**
|
||||
**[operations.ListGuardrailsResponse](../../operations/listguardrailsresponse.mdx)**
|
||||
|
||||
### Errors
|
||||
|
||||
@@ -78,7 +80,6 @@ Create a new guardrail for the authenticated user. [Management key](/docs/guides
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="createGuardrail" method="post" path="/guardrails" -->
|
||||
```python
|
||||
from openrouter import OpenRouter
|
||||
import os
|
||||
@@ -112,8 +113,8 @@ with OpenRouter(
|
||||
| `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.<br/> | |
|
||||
| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [<br/>"openai/gpt-5.2",<br/>"anthropic/claude-4.5-opus-20251124",<br/>"deepseek/deepseek-r1-0528:free"<br/>] |
|
||||
| `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [<br/>"openai",<br/>"anthropic",<br/>"deepseek"<br/>] |
|
||||
| `content_filter_builtins` | List[[components.ContentFilterBuiltinEntryInput](../../components/contentfilterbuiltinentryinput.md)] | :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. | [<br/>{<br/>"action": "block",<br/>"slug": "regex-prompt-injection"<br/>}<br/>] |
|
||||
| `content_filters` | List[[components.ContentFilterEntry](../../components/contentfilterentry.md)] | :heavy_minus_sign: | Custom regex content filters to apply to request messages | [<br/>{<br/>"action": "redact",<br/>"label": "[API_KEY]",<br/>"pattern": "\\b(sk-[a-zA-Z0-9]{48})\\b"<br/>}<br/>] |
|
||||
| `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. | [<br/>\{<br/>"action": "block",<br/>"slug": "regex-prompt-injection"<br/>}<br/>] |
|
||||
| `content_filters` | List[[components.ContentFilterEntry](../../components/contentfilterentry.mdx)] | :heavy_minus_sign: | Custom regex content filters to apply to request messages | [<br/>\{<br/>"action": "redact",<br/>"label": "[API_KEY]",<br/>"pattern": "\\b(sk-[a-zA-Z0-9]\{48})\\b"<br/>}<br/>] |
|
||||
| `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.<br/><br/>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 |
|
||||
@@ -123,13 +124,13 @@ with OpenRouter(
|
||||
| `ignored_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers to exclude from routing (slug or canonical_slug accepted) | [<br/>"openai/gpt-4o-mini"<br/>] |
|
||||
| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [<br/>"azure"<br/>] |
|
||||
| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 50 |
|
||||
| `reset_interval` | [OptionalNullable[components.GuardrailInterval]](../../components/guardrailinterval.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
|
||||
| `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.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
|
||||
### Response
|
||||
|
||||
**[components.CreateGuardrailResponse](../../components/createguardrailresponse.md)**
|
||||
**[components.CreateGuardrailResponse](../../components/createguardrailresponse.mdx)**
|
||||
|
||||
### Errors
|
||||
|
||||
@@ -147,7 +148,6 @@ Delete an existing guardrail. [Management key](/docs/guides/overview/auth/manage
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="deleteGuardrail" method="delete" path="/guardrails/{id}" -->
|
||||
```python
|
||||
from openrouter import OpenRouter
|
||||
import os
|
||||
@@ -175,11 +175,11 @@ with OpenRouter(
|
||||
| `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.<br/>This is used to track API usage per application.<br/> | |
|
||||
| `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.<br/> | |
|
||||
| `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.<br/> | |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
|
||||
### Response
|
||||
|
||||
**[components.DeleteGuardrailResponse](../../components/deleteguardrailresponse.md)**
|
||||
**[components.DeleteGuardrailResponse](../../components/deleteguardrailresponse.mdx)**
|
||||
|
||||
### Errors
|
||||
|
||||
@@ -196,7 +196,6 @@ Get a single guardrail by ID. [Management key](/docs/guides/overview/auth/manage
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getGuardrail" method="get" path="/guardrails/{id}" -->
|
||||
```python
|
||||
from openrouter import OpenRouter
|
||||
import os
|
||||
@@ -224,11 +223,11 @@ with OpenRouter(
|
||||
| `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.<br/>This is used to track API usage per application.<br/> | |
|
||||
| `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.<br/> | |
|
||||
| `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.<br/> | |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
|
||||
### Response
|
||||
|
||||
**[components.GetGuardrailResponse](../../components/getguardrailresponse.md)**
|
||||
**[components.GetGuardrailResponse](../../components/getguardrailresponse.mdx)**
|
||||
|
||||
### Errors
|
||||
|
||||
@@ -245,7 +244,6 @@ Update an existing guardrail. Collection fields use replace semantics: send the
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="updateGuardrail" method="patch" path="/guardrails/{id}" -->
|
||||
```python
|
||||
from openrouter import OpenRouter
|
||||
import os
|
||||
@@ -275,8 +273,8 @@ with OpenRouter(
|
||||
| `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.<br/> | |
|
||||
| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [<br/>"openai/gpt-5.2"<br/>] |
|
||||
| `allowed_providers` | List[*str*] | :heavy_minus_sign: | New list of allowed provider IDs | [<br/>"openai",<br/>"anthropic",<br/>"deepseek"<br/>] |
|
||||
| `content_filter_builtins` | List[[components.ContentFilterBuiltinEntryInput](../../components/contentfilterbuiltinentryinput.md)] | :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. | [<br/>{<br/>"action": "block",<br/>"slug": "regex-prompt-injection"<br/>}<br/>] |
|
||||
| `content_filters` | List[[components.ContentFilterEntry](../../components/contentfilterentry.md)] | :heavy_minus_sign: | Custom regex content filters to apply. Set to null to remove. | <nil> |
|
||||
| `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. | [<br/>\{<br/>"action": "block",<br/>"slug": "regex-prompt-injection"<br/>}<br/>] |
|
||||
| `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.<br/><br/>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 |
|
||||
@@ -287,12 +285,12 @@ with OpenRouter(
|
||||
| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [<br/>"azure"<br/>] |
|
||||
| `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.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
| `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
|
||||
|
||||
**[components.UpdateGuardrailResponse](../../components/updateguardrailresponse.md)**
|
||||
**[components.UpdateGuardrailResponse](../../components/updateguardrailresponse.mdx)**
|
||||
|
||||
### Errors
|
||||
|
||||
@@ -310,7 +308,6 @@ List all API key assignments for a specific guardrail. [Management key](/docs/gu
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="listGuardrailKeyAssignments" method="get" path="/guardrails/{id}/assignments/keys" -->
|
||||
```python
|
||||
from openrouter import OpenRouter
|
||||
import os
|
||||
@@ -342,11 +339,11 @@ with OpenRouter(
|
||||
| `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.<br/> | |
|
||||
| `offset` | *Optional[int]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
|
||||
| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.ListGuardrailKeyAssignmentsResponse](../../operations/listguardrailkeyassignmentsresponse.md)**
|
||||
**[operations.ListGuardrailKeyAssignmentsResponse](../../operations/listguardrailkeyassignmentsresponse.mdx)**
|
||||
|
||||
### Errors
|
||||
|
||||
@@ -363,7 +360,6 @@ Assign multiple API keys to a specific guardrail. A key may hold at most one gua
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="bulkAssignKeysToGuardrail" method="post" path="/guardrails/{id}/assignments/keys" -->
|
||||
```python
|
||||
from openrouter import OpenRouter
|
||||
import os
|
||||
@@ -394,11 +390,11 @@ with OpenRouter(
|
||||
| `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.<br/>This is used to track API usage per application.<br/> | |
|
||||
| `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.<br/> | |
|
||||
| `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.<br/> | |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
|
||||
### Response
|
||||
|
||||
**[components.BulkAssignKeysResponse](../../components/bulkassignkeysresponse.md)**
|
||||
**[components.BulkAssignKeysResponse](../../components/bulkassignkeysresponse.mdx)**
|
||||
|
||||
### Errors
|
||||
|
||||
@@ -416,7 +412,6 @@ Unassign multiple API keys from a specific guardrail. [Management key](/docs/gui
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="bulkUnassignKeysFromGuardrail" method="post" path="/guardrails/{id}/assignments/keys/remove" -->
|
||||
```python
|
||||
from openrouter import OpenRouter
|
||||
import os
|
||||
@@ -447,11 +442,11 @@ with OpenRouter(
|
||||
| `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.<br/>This is used to track API usage per application.<br/> | |
|
||||
| `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.<br/> | |
|
||||
| `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.<br/> | |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
|
||||
### Response
|
||||
|
||||
**[components.BulkUnassignKeysResponse](../../components/bulkunassignkeysresponse.md)**
|
||||
**[components.BulkUnassignKeysResponse](../../components/bulkunassignkeysresponse.mdx)**
|
||||
|
||||
### Errors
|
||||
|
||||
@@ -469,7 +464,6 @@ List all organization member assignments for a specific guardrail. [Management k
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="listGuardrailMemberAssignments" method="get" path="/guardrails/{id}/assignments/members" -->
|
||||
```python
|
||||
from openrouter import OpenRouter
|
||||
import os
|
||||
@@ -501,11 +495,11 @@ with OpenRouter(
|
||||
| `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.<br/> | |
|
||||
| `offset` | *Optional[int]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
|
||||
| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.ListGuardrailMemberAssignmentsResponse](../../operations/listguardrailmemberassignmentsresponse.md)**
|
||||
**[operations.ListGuardrailMemberAssignmentsResponse](../../operations/listguardrailmemberassignmentsresponse.mdx)**
|
||||
|
||||
### Errors
|
||||
|
||||
@@ -522,7 +516,6 @@ Assign multiple organization members to a specific guardrail. [Management key](/
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="bulkAssignMembersToGuardrail" method="post" path="/guardrails/{id}/assignments/members" -->
|
||||
```python
|
||||
from openrouter import OpenRouter
|
||||
import os
|
||||
@@ -554,11 +547,11 @@ with OpenRouter(
|
||||
| `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.<br/>This is used to track API usage per application.<br/> | |
|
||||
| `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.<br/> | |
|
||||
| `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.<br/> | |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
|
||||
### Response
|
||||
|
||||
**[components.BulkAssignMembersResponse](../../components/bulkassignmembersresponse.md)**
|
||||
**[components.BulkAssignMembersResponse](../../components/bulkassignmembersresponse.mdx)**
|
||||
|
||||
### Errors
|
||||
|
||||
@@ -576,7 +569,6 @@ Unassign multiple organization members from a specific guardrail. [Management ke
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="bulkUnassignMembersFromGuardrail" method="post" path="/guardrails/{id}/assignments/members/remove" -->
|
||||
```python
|
||||
from openrouter import OpenRouter
|
||||
import os
|
||||
@@ -608,11 +600,11 @@ with OpenRouter(
|
||||
| `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.<br/>This is used to track API usage per application.<br/> | |
|
||||
| `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.<br/> | |
|
||||
| `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.<br/> | |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
|
||||
### Response
|
||||
|
||||
**[components.BulkUnassignMembersResponse](../../components/bulkunassignmembersresponse.md)**
|
||||
**[components.BulkUnassignMembersResponse](../../components/bulkunassignmembersresponse.mdx)**
|
||||
|
||||
### Errors
|
||||
|
||||
@@ -630,7 +622,6 @@ List all API key guardrail assignments for the authenticated user. [Management k
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="listKeyAssignments" method="get" path="/guardrails/assignments/keys" -->
|
||||
```python
|
||||
from openrouter import OpenRouter
|
||||
import os
|
||||
@@ -661,11 +652,11 @@ with OpenRouter(
|
||||
| `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.<br/> | |
|
||||
| `offset` | *Optional[int]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
|
||||
| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.ListKeyAssignmentsResponse](../../operations/listkeyassignmentsresponse.md)**
|
||||
**[operations.ListKeyAssignmentsResponse](../../operations/listkeyassignmentsresponse.mdx)**
|
||||
|
||||
### Errors
|
||||
|
||||
@@ -681,7 +672,6 @@ List all organization member guardrail assignments for the authenticated user. [
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="listMemberAssignments" method="get" path="/guardrails/assignments/members" -->
|
||||
```python
|
||||
from openrouter import OpenRouter
|
||||
import os
|
||||
@@ -712,11 +702,11 @@ with OpenRouter(
|
||||
| `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.<br/> | |
|
||||
| `offset` | *Optional[int]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
|
||||
| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.ListMemberAssignmentsResponse](../../operations/listmemberassignmentsresponse.md)**
|
||||
**[operations.ListMemberAssignmentsResponse](../../operations/listmemberassignmentsresponse.mdx)**
|
||||
|
||||
### Errors
|
||||
|
||||
Reference in New Issue
Block a user