Check rate limits

Check current rate limit status for the given dimensions without consuming a request.

This endpoint allows you to query rate limit status without actually counting against the limit. Useful for:

  • Pre-flight checks before processing requests
  • Displaying rate limit status to users
  • Monitoring rate limit consumption

Dimension Matching: Rate limits are matched based on dimension filters. Pass dimensions like:

  • customer_id: Filter by customer
  • event_type: Filter by event type
  • model: Filter by model
  • provider: Filter by provider
  • Any custom dimension from event properties
POST
/rate-limits/check
AuthorizationBearer <token>

Project API key

In: header

Request Body

application/json

[key: string]?unknown

Response Body

application/json

application/json

curl -X POST "https://api.limitry.com/v1/rate-limits/check" \  -H "Content-Type: application/json" \  -d '{    "property1": null,    "property2": null  }'
{
  "allowed": true,
  "rateLimits": [
    {
      "id": "rl_abc123",
      "name": "API Rate Limit",
      "window": "1h",
      "limit": 1000,
      "remaining": 847,
      "reset": 1705312800,
      "exceeded": false
    }
  ]
}
{
  "error": "Invalid or missing API key"
}