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)
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ai_provider_id": "<string>",
"name": "<string>",
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"last_updated_at": "2023-11-07T05:31:56Z",
"slug": "<string>",
"description": "<string>",
"object": "integration",
"masked_key": "<string>",
"configurations": {
"provider_auth_type": "apiKey",
"openai_organization": "<string>",
"openai_project": "<string>",
"oauth_token_endpoint": "<string>",
"oauth_client_id": "<string>",
"oauth_client_secret": "<string>",
"oauth_scope": "<string>",
"wif_identity_source": "configuredIdp",
"oauth_audience": "<string>",
"openai_identity_provider_id": "<string>",
"openai_service_account_id": "<string>",
"is_key_required": true
},
"global_workspace_access_settings": {
"enabled": true,
"usage_limits": [
{
"credit_limit": 10,
"periodic_reset": "monthly",
"alert_threshold": 8
}
],
"rate_limits": [
{
"type": "requests",
"unit": "rpd",
"value": 123
}
]
},
"allow_all_models": true,
"workspace_count": 123,
"secret_mappings": [
{
"target_field": "key",
"secret_reference_id": "my-aws-secret",
"secret_key": "<string>",
"value_format": "json"
}
],
"pricing_adjustments": {
"multiplier": {
"default": 0.8,
"cache_read_input_token": 0.9,
"cache_write_input_token": 0.9
}
}
}Retrieve Integration
GET
/
integrations
/
{slug}
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)
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ai_provider_id": "<string>",
"name": "<string>",
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"last_updated_at": "2023-11-07T05:31:56Z",
"slug": "<string>",
"description": "<string>",
"object": "integration",
"masked_key": "<string>",
"configurations": {
"provider_auth_type": "apiKey",
"openai_organization": "<string>",
"openai_project": "<string>",
"oauth_token_endpoint": "<string>",
"oauth_client_id": "<string>",
"oauth_client_secret": "<string>",
"oauth_scope": "<string>",
"wif_identity_source": "configuredIdp",
"oauth_audience": "<string>",
"openai_identity_provider_id": "<string>",
"openai_service_account_id": "<string>",
"is_key_required": true
},
"global_workspace_access_settings": {
"enabled": true,
"usage_limits": [
{
"credit_limit": 10,
"periodic_reset": "monthly",
"alert_threshold": 8
}
],
"rate_limits": [
{
"type": "requests",
"unit": "rpd",
"value": 123
}
]
},
"allow_all_models": true,
"workspace_count": 123,
"secret_mappings": [
{
"target_field": "key",
"secret_reference_id": "my-aws-secret",
"secret_key": "<string>",
"value_format": "json"
}
],
"pricing_adjustments": {
"multiplier": {
"default": 0.8,
"cache_read_input_token": 0.9,
"cache_write_input_token": 0.9
}
}
}Portkey is now PRISMA AIRS AI Gateway. See it in action.
Contact Us
Authorizations
Path Parameters
Response
200 - application/json
Successful response
Available options:
active, archived Available options:
integration Masked API key
Configuration for OpenAI integrations. Supports three authentication modes
selected via provider_auth_type:
- apiKey (default) – standard API-key auth; no extra fields required.
- oauthClientCredentials – Portkey obtains an access token from your IdP using the OAuth 2.0 client-credentials grant and forwards it to OpenAI.
- wif (Workload Identity Federation) – Portkey mints a subject JWT via your configured IdP and exchanges it at OpenAI's WIF token endpoint.
- OpenAI
- Anthropic
- Azure OpenAI
- AWS Bedrock
- Vertex AI
- Azure AI
- Workers AI
- AWS Sagemaker
- Hugginface
- Cortex
- Custom Base URL
Show child attributes
Show child attributes
Global workspace access configuration
Show child attributes
Show child attributes
Whether new models will be enabled by default
Number of workspaces with access to this integration
Secret reference mappings for this integration. Valid target_field values are "key" or "configurations.".
Show child attributes
Show child attributes
Per-Integration pricing adjustments applied on top of Portkey's base model pricing for cost tracking, analytics, and budget limits. Use to reflect negotiated discounts, committed-use rates, or internal markups for cost showback.
Show child attributes
Show child attributes
Example:
{
"multiplier": {
"default": 0.8,
"cache_read_input_token": 0.9,
"cache_write_input_token": 0.9
}
}
Last modified on August 3, 2026
Was this page helpful?

