Python
Default
from portkey_ai import Portkey# Initialize the Portkey clientportkey = Portkey( api_key="PORTKEY_API_KEY",)# Get a specific providerprovider = portkey.providers.retrieve( slug="PROVIDER_SLUG", workspace_id="")print(provider)
{ "name": "Open AI Workspace", "integration_id": "<string>", "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>", "rate_limits": [ { "type": "requests", "unit": "rpd", "value": 123 } ], "expires_at": "2023-11-07T05:31:56Z", "object": "provider" }
Provider slug
optional, needed when using organisation admin keys
Successful response
"Open AI Workspace"
"randomness"
active
exhausted
expired
Show child attributes
Credit Limit. Used for tracking usage
x >= 1
Type of credit limit
cost
tokens
Alert Threshold. Used for alerting when usage reaches more than this
Reset the usage periodically.
monthly
weekly
{ "credit_limit": 10, "periodic_reset": "monthly", "alert_threshold": 8}
0
requests
rpd
rph
rpm
provider
Was this page helpful?