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

x-portkey-api-key
string
header
required

Path Parameters

slug
string
required

Response

200 - application/json
Config details
success
boolean
data
object