For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
ModelsChatRankingsDocs
DocsAPI ReferenceClient SDKsAgent SDKCookbookChangelog
DocsAPI ReferenceClient SDKsAgent SDKCookbookChangelog
  • API Guides
    • Overview
    • Streaming
    • Embeddings
    • Limits
    • Authentication
    • Parameters
    • Errors and Debugging
  • API Reference
      • GETList BYOK provider credentials
      • POSTCreate a BYOK provider credential
      • GETGet a BYOK provider credential
      • DELDelete a BYOK provider credential
      • PATCHUpdate a BYOK provider credential
LogoLogo
ModelsChatRankingsDocs
API ReferenceByok

Delete a BYOK provider credential

DELETE
https://openrouter.ai/api/v1/byok/:id
DELETE
/api/v1/byok/:id
$curl -X DELETE https://openrouter.ai/api/v1/byok/11111111-2222-3333-4444-555555555555 \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{}'
1{
2 "deleted": true
3}

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 required.

Was this page helpful?
Previous

Update a BYOK provider credential

Next
Built with

Authentication

AuthorizationBearer
API key as bearer token in Authorization header

Path parameters

idstringRequiredformat: "uuid"

The BYOK credential ID (UUID).

Response

BYOK credential deleted successfully
deletedtrue
Confirmation that the BYOK credential was deleted.

Errors

401
Unauthorized Error
404
Not Found Error
500
Internal Server Error