curl --request POST \
--url https://api.portkey.ai/v1/policies/rate-limits \
--header 'Content-Type: application/json' \
--header 'x-portkey-api-key: <api-key>' \
--data '
{
"name": "100 RPM per API Key",
"conditions": [
{
"key": "workspace_id",
"value": "workspace-123"
}
],
"group_by": [
{
"key": "api_key"
}
],
"type": "requests",
"unit": "rpm",
"value": 100
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"object": "policy_usage_limits"
}Create Rate Limits Policy
POST
https://api.portkey.ai/v1
/
policies
/
rate-limits
curl --request POST \
--url https://api.portkey.ai/v1/policies/rate-limits \
--header 'Content-Type: application/json' \
--header 'x-portkey-api-key: <api-key>' \
--data '
{
"name": "100 RPM per API Key",
"conditions": [
{
"key": "workspace_id",
"value": "workspace-123"
}
],
"group_by": [
{
"key": "api_key"
}
],
"type": "requests",
"unit": "rpm",
"value": 100
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"object": "policy_usage_limits"
}Portkey is now PRISMA AIRS AI Gateway. See it in action.
Contact Us
Body
application/json
Last modified on August 6, 2026
Was this page helpful?

