Governance
List rate limits
Returns a list of all rate limits. Use the from_memory query parameter to get data from in-memory cache.
AuthorizationBearer <token>
Bearer token authentication. Use your MPilot virtual-key JWT or admin JWT.
Virtual keys (prefixed with sk-bf-) can also be passed here.
In: header
Query Parameters
from_memory?boolean
If true, returns rate limits from in-memory cache instead of database
Default
falseResponse Body
curl -X GET "https://loading/{AI_GATEWAY_URL}/api/governance/rate-limits?from_memory=false"{
"rate_limits": [
{
"id": "string",
"token_max_limit": 0,
"token_reset_duration": "string",
"token_current_usage": 0,
"token_last_reset": "2019-08-24T14:15:22Z",
"request_max_limit": 0,
"request_reset_duration": "string",
"request_current_usage": 0,
"request_last_reset": "2019-08-24T14:15:22Z",
"config_hash": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
],
"count": 0
}{
"event_id": "string",
"type": "string",
"is_bifrost_error": true,
"status_code": 0,
"error": {
"type": "string",
"code": "string",
"message": "string",
"param": "string",
"event_id": "string"
},
"extra_fields": {
"provider": "openai",
"model_requested": "string",
"request_type": "string"
}
}