from portkey_ai import Portkey
# Initialize the Portkey client
portkey = Portkey(
api_key="PORTKEY_API_KEY",
)
# Get a specific virtual key
virtual_key = portkey.virtual_keys.retrieve(
slug='VIRTUAL_KEY_SLUG'
)
print(virtual_key)
{
"name": "Open AI Workspace",
"note": "randomness",
"status": "active",
"usage_limits": {
"credit_limit": 10,
"periodic_reset": "monthly",
"alert_threshold": 8
},
"reset_usage": 0,
"created_at": "2023-11-07T05:31:56Z",
"slug": "<string>",
"model_config": {},
"rate_limits": [
{
"type": "requests",
"unit": "rpm",
"value": 123
}
],
"expires_at": "2023-11-07T05:31:56Z",
"object": "virtual-key"
}
from portkey_ai import Portkey
# Initialize the Portkey client
portkey = Portkey(
api_key="PORTKEY_API_KEY",
)
# Get a specific virtual key
virtual_key = portkey.virtual_keys.retrieve(
slug='VIRTUAL_KEY_SLUG'
)
print(virtual_key)
{
"name": "Open AI Workspace",
"note": "randomness",
"status": "active",
"usage_limits": {
"credit_limit": 10,
"periodic_reset": "monthly",
"alert_threshold": 8
},
"reset_usage": 0,
"created_at": "2023-11-07T05:31:56Z",
"slug": "<string>",
"model_config": {},
"rate_limits": [
{
"type": "requests",
"unit": "rpm",
"value": 123
}
],
"expires_at": "2023-11-07T05:31:56Z",
"object": "virtual-key"
}
Successful response
The response is of type object
.
Was this page helpful?