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
      • GETGet current API key
      • GETList API keys
      • POSTCreate a new API key
      • GETGet a single API key
      • DELDelete an API key
      • PATCHUpdate an API key
LogoLogo
ModelsChatRankingsDocs
API ReferenceAPI Keys

Delete an API key

DELETE
https://openrouter.ai/api/v1/keys/:hash
DELETE
/api/v1/keys/:hash
$curl -X DELETE https://openrouter.ai/api/v1/keys/f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{}'
1{
2 "deleted": true
3}

Delete an existing API key. Management key required.

Was this page helpful?
Previous

Update an API key

Next
Built with

Authentication

AuthorizationBearer
API key as bearer token in Authorization header

Path parameters

hashstringRequired
The hash identifier of the API key to delete

Response

API key deleted successfully
deletedtrue
Confirmation that the API key was deleted

Errors

401
Unauthorized Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error