API Reference
Virtual Keys
Prompts
- POSTCreate Prompt
- GETList Prompts
- GETRetrieve Prompt
- PUTUpdate Prompt
- DELDelete Prompt
- PUTPublish Prompt
- GETList Prompt Versions
- GETRetrieve Prompt Version
- PUTUpdate Prompt Version
- Prompt Partials
- Prompt Labels
- Prompt Collections
API Keys
Analytics [BETA]
- Summary
- Groups Paginated Data
- Graphs - Time Series Data
User Invites
Workspaces
Workspace Members
Audit Logs
OpenAPI
Retrieve Virtual Key
GET
/
virtual-keys
/
{slug}
Copy
Ask AI
from portkey_ai import Portkey
# Initialize the Portkey client
portkey = Portkey()
# Get a specific virtual key
virtual_key = portkey.virtual_keys.retrieve(
slug='VIRTUAL_KEY_SLUG'
)
print(virtual_key)
Copy
Ask AI
{
"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"
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
Response
200
application/json
Successful response
The response is of type object
.
Was this page helpful?
Copy
Ask AI
from portkey_ai import Portkey
# Initialize the Portkey client
portkey = Portkey()
# Get a specific virtual key
virtual_key = portkey.virtual_keys.retrieve(
slug='VIRTUAL_KEY_SLUG'
)
print(virtual_key)
Copy
Ask AI
{
"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"
}
Assistant
Responses are generated using AI and may contain mistakes.