r"""Delete a BYOK provider credential Delete (soft-delete) a bring-your-own-key (BYOK) provider credential by its `id`. The encrypted key material is wiped and the record is marked as deleted. [Management key](/docs/guides/overview/auth/management-api-keys) required. :param id: The
(
self,
*,
id: str,
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None,
)
| 811 | raise errors.OpenRouterDefaultError("Unexpected response received", http_res) |
| 812 | |
| 813 | async def delete_async( |
| 814 | self, |
| 815 | *, |
| 816 | id: str, |
| 817 | http_referer: Optional[str] = None, |
| 818 | x_open_router_title: Optional[str] = None, |
| 819 | x_open_router_categories: Optional[str] = None, |
| 820 | retries: OptionalNullable[utils.RetryConfig] = UNSET, |
| 821 | server_url: Optional[str] = None, |
| 822 | timeout_ms: Optional[int] = None, |
| 823 | http_headers: Optional[Mapping[str, str]] = None, |
| 824 | ) -> components.DeleteBYOKKeyResponse: |
| 825 | r"""Delete a BYOK provider credential |
| 826 | |
| 827 | Delete (soft-delete) a bring-your-own-key (BYOK) provider credential by its `id`. The encrypted key material is wiped and the record is marked as deleted. [Management key](/docs/guides/overview/auth/management-api-keys) required. |
| 828 | |
| 829 | :param id: The BYOK credential ID (UUID). |
| 830 | :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. |
| 831 | This is used to track API usage per application. |
| 832 | |
| 833 | :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. |
| 834 | |
| 835 | :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. |
| 836 | |
| 837 | :param retries: Override the default retry configuration for this method |
| 838 | :param server_url: Override the default server URL for this method |
| 839 | :param timeout_ms: Override the default request timeout configuration for this method in milliseconds |
| 840 | :param http_headers: Additional headers to set or replace on requests. |
| 841 | """ |
| 842 | base_url = None |
| 843 | url_variables = None |
| 844 | if timeout_ms is None: |
| 845 | timeout_ms = self.sdk_configuration.timeout_ms |
| 846 | |
| 847 | if server_url is not None: |
| 848 | base_url = server_url |
| 849 | else: |
| 850 | base_url = self._get_url(base_url, url_variables) |
| 851 | |
| 852 | request = operations.DeleteBYOKKeyRequest( |
| 853 | http_referer=http_referer, |
| 854 | x_open_router_title=x_open_router_title, |
| 855 | x_open_router_categories=x_open_router_categories, |
| 856 | id=id, |
| 857 | ) |
| 858 | |
| 859 | req = self._build_request_async( |
| 860 | method="DELETE", |
| 861 | path="/byok/{id}", |
| 862 | base_url=base_url, |
| 863 | url_variables=url_variables, |
| 864 | request=request, |
| 865 | request_body_required=False, |
| 866 | request_has_path_params=True, |
| 867 | request_has_query_params=True, |
| 868 | user_agent_header="user-agent", |
| 869 | accept_header_value="application/json", |
| 870 | http_headers=http_headers, |
nothing calls this directly
no test coverage detected