from portkey_ai import Portkey
# Initialize the Portkey client
portkey = Portkey(
api_key="PORTKEY_API_KEY",
)
# Delete a specific virtual key
result = portkey.virtual_keys.delete(
slug='VIRTUAL_KEY_SLUG'
)
print(result)
{}{
"success": false,
"data": {
"message": "Unauthorised Request"
}
}Delete Virtual Key
DELETE
/
virtual-keys
/
{slug}
from portkey_ai import Portkey
# Initialize the Portkey client
portkey = Portkey(
api_key="PORTKEY_API_KEY",
)
# Delete a specific virtual key
result = portkey.virtual_keys.delete(
slug='VIRTUAL_KEY_SLUG'
)
print(result)
{}{
"success": false,
"data": {
"message": "Unauthorised Request"
}
}Last modified on February 14, 2026
Was this page helpful?

