Skip to main content
POST
/
limits
/
check
JavaScript
import Limitry from '@limitry/sdk';

const client = new Limitry({
  apiKey: process.env['LIMITRY_API_KEY'], // This is the default and can be omitted
});

const response = await client.limits.check();

console.log(response.allowed);
{
  "allowed": true,
  "limits": [
    {
      "id": "lmt_abc123",
      "name": "Daily Token Limit",
      "meterId": "mtr_total_tokens",
      "period": "day",
      "limit": 100000,
      "used": 45230,
      "remaining": 54770,
      "exceeded": false,
      "reset": 1704153600
    }
  ]
}

Authorizations

Authorization
string
header
required

API Key or Personal Access Token (PAT). When using PAT, include X-Project header.

Body

application/json
customerId
string

Customer ID to check limits for

dimensions
object

Key-value pairs for limit matching (e.g., {"team_id": "eng"})

Response

Limits check result

allowed
boolean
required

Whether all limits passed

limits
object[]
required

Status of all matching limits