Last updated 10 months ago
Was this helpful?
from portkey_ai import Portkey # Initialize the Portkey client portkey = Portkey( api_key="PORTKEY_API_KEY", ) # List virtual keys virtual_keys = portkey.virtual_keys.list() print(virtual_keys)
Successful response
{ "object": "list", "total": 1, "data": [ { "name": "Open AI Workspace", "note": "randomness", "status": "active", "usage_limits": { "credit_limit": 10, "periodic_reset": "monthly", "alert_threshold": 8 }, "reset_usage": 0, "created_at": "2025-04-24T06:15:04.899Z", "slug": "text", "model_config": {}, "rate_limits": [ { "type": "requests", "unit": "rpm", "value": 1 } ], "object": "virtual-key" } ] }