🚀 Introducing Agent Gateway — governance, observability, and control for your AI agents.  Register for live webinar ↗
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){}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){}Documentation Index
Fetch the complete documentation index at: https://docs.portkey.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Show child attributes
Show child attributes
{
"credit_limit": 10,
"periodic_reset": "monthly",
"alert_threshold": 8
}Dynamically resolve secrets from secret references at runtime. Valid target_field values are "key" or "model_config." (e.g. "model_config.awsSecretAccessKey"). Each target_field must be unique.
Show child attributes
Successful response
The response is of type object.
Was this page helpful?