r"""List BYOK provider credentials List the bring-your-own-key (BYOK) provider credentials for the authenticated entity's default workspace. Use the `workspace_id` query parameter to scope the result to a different workspace, or the `provider` query parameter to filter by upstream provider.
(
self,
*,
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
offset: Optional[int] = None,
limit: Optional[int] = None,
workspace_id: Optional[str] = None,
provider: Optional[operations.Provider] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None,
)
| 14 | r"""BYOK endpoints""" |
| 15 | |
| 16 | def list( |
| 17 | self, |
| 18 | *, |
| 19 | http_referer: Optional[str] = None, |
| 20 | x_open_router_title: Optional[str] = None, |
| 21 | x_open_router_categories: Optional[str] = None, |
| 22 | offset: Optional[int] = None, |
| 23 | limit: Optional[int] = None, |
| 24 | workspace_id: Optional[str] = None, |
| 25 | provider: Optional[operations.Provider] = None, |
| 26 | retries: OptionalNullable[utils.RetryConfig] = UNSET, |
| 27 | server_url: Optional[str] = None, |
| 28 | timeout_ms: Optional[int] = None, |
| 29 | http_headers: Optional[Mapping[str, str]] = None, |
| 30 | ) -> Optional[operations.ListBYOKKeysResponse]: |
| 31 | r"""List BYOK provider credentials |
| 32 | |
| 33 | List the bring-your-own-key (BYOK) provider credentials for the authenticated entity's default workspace. Use the `workspace_id` query parameter to scope the result to a different workspace, or the `provider` query parameter to filter by upstream provider. [Management key](/docs/guides/overview/auth/management-api-keys) required. |
| 34 | |
| 35 | :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. |
| 36 | This is used to track API usage per application. |
| 37 | |
| 38 | :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. |
| 39 | |
| 40 | :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. |
| 41 | |
| 42 | :param offset: Number of records to skip for pagination |
| 43 | :param limit: Maximum number of records to return (max 100) |
| 44 | :param workspace_id: Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace. |
| 45 | :param provider: Optional provider slug to filter by (e.g. `openai`, `anthropic`, `amazon-bedrock`). |
| 46 | :param retries: Override the default retry configuration for this method |
| 47 | :param server_url: Override the default server URL for this method |
| 48 | :param timeout_ms: Override the default request timeout configuration for this method in milliseconds |
| 49 | :param http_headers: Additional headers to set or replace on requests. |
| 50 | """ |
| 51 | base_url = None |
| 52 | url_variables = None |
| 53 | if timeout_ms is None: |
| 54 | timeout_ms = self.sdk_configuration.timeout_ms |
| 55 | |
| 56 | if server_url is not None: |
| 57 | base_url = server_url |
| 58 | else: |
| 59 | base_url = self._get_url(base_url, url_variables) |
| 60 | |
| 61 | request = operations.ListBYOKKeysRequest( |
| 62 | http_referer=http_referer, |
| 63 | x_open_router_title=x_open_router_title, |
| 64 | x_open_router_categories=x_open_router_categories, |
| 65 | offset=offset, |
| 66 | limit=limit, |
| 67 | workspace_id=workspace_id, |
| 68 | provider=provider, |
| 69 | ) |
| 70 | |
| 71 | req = self._build_request( |
| 72 | method="GET", |
| 73 | path="/byok", |
no test coverage detected