PUT
/
virtual-keys
/
{slug}
from portkey_ai import Portkey

# Initialize the Portkey client
portkey = Portkey(
    api_key="PORTKEY_API_KEY",
)

# Update a specific virtual key
updated_virtual_key = portkey.virtual_keys.update(
    slug='VIRTUAL_KEY_SLUG',
    name="openaiVKey",
    note="hello",
    rate_limits=[{"type": "requests", "unit": "rpm", "value": 696}]
)

print(updated_virtual_key)
{}

Authorizations

x-portkey-api-key
string
header
required

Path Parameters

slug
string
required

Body

application/json
name
string
key
string
note
string | null
deploymentConfig
object[]
usage_limits
object

Response

200
application/json
Successful response

The response is of type object.