Configs
Retrieve Config
Control Plane
- Configs
- Virtual Keys
- API Keys
- Analytics [BETA]
- Users
- User Invites
- Workspaces
- Workspace Members
Data Plane
- Feedback
- Guardrails
- Logs
OpenAPI
Retrieve Config
GET
/
configs
/
{slug}
from portkey_ai import Portkey
# Initialize the Portkey client
portkey = Portkey(
api_key="PORTKEY_API_KEY",
)
# Retrieve the configuration
config = portkey.configs.retrieve(
slug='CONFIG_SLUG'
)
print(config)
{
"success": true,
"data": {
"config": {
"retry": {
"attempts": 5,
"on_status_codes": [
429,
529
]
},
"cache": {
"mode": "simple",
"max_age": 3600
},
"strategy": {
"mode": "fallback"
},
"targets": [
{
"provider": "openai",
"virtual_key": "main-258f4d"
},
{
"provider": "azure-openai",
"virtual_key": "azure-test-4110dd"
}
]
}
}
}
Authorizations
Path Parameters
Response
200 - application/json
Config details
Was this page helpful?
from portkey_ai import Portkey
# Initialize the Portkey client
portkey = Portkey(
api_key="PORTKEY_API_KEY",
)
# Retrieve the configuration
config = portkey.configs.retrieve(
slug='CONFIG_SLUG'
)
print(config)
{
"success": true,
"data": {
"config": {
"retry": {
"attempts": 5,
"on_status_codes": [
429,
529
]
},
"cache": {
"mode": "simple",
"max_age": 3600
},
"strategy": {
"mode": "fallback"
},
"targets": [
{
"provider": "openai",
"virtual_key": "main-258f4d"
},
{
"provider": "azure-openai",
"virtual_key": "azure-test-4110dd"
}
]
}
}
}