🚀 Introducing Agent Gateway — governance, observability, and control for your AI agents.  Register for live webinar ↗
curl --request PUT \
--url https://api.portkey.ai/v1/policies/usage-limits/{policyUsageLimitsId} \
--header 'Content-Type: application/json' \
--header 'x-portkey-api-key: <api-key>' \
--data '
{
"credit_limit": 2000,
"alert_threshold": 1500,
"reset_usage_for_value": "api-key-123"
}
'{}Update an existing usage limits policy.
curl --request PUT \
--url https://api.portkey.ai/v1/policies/usage-limits/{policyUsageLimitsId} \
--header 'Content-Type: application/json' \
--header 'x-portkey-api-key: <api-key>' \
--data '
{
"credit_limit": 2000,
"alert_threshold": 1500,
"reset_usage_for_value": "api-key-123"
}
'{}Documentation Index
Fetch the complete documentation index at: https://docs.portkey.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Usage limits policy UUID
Policy name
255Maximum usage allowed
x >= 0Threshold at which to send alerts. Must be less than credit_limit.
x >= 0Reset period. Set to null to remove periodic reset.
monthly, weekly Reset usage for a specific value key (e.g., API key). This will reset the usage counter for that key to 0.
OK
The response is of type object.
Was this page helpful?