Unkey · Schema

KeysVerifyKeyRatelimit

API KeysRate LimitingAuthenticationDeveloper PlatformAccess ControlIdentityAnalytics

Properties

Name Type Description
name string References an existing ratelimit by its name. Key Ratelimits will take precedence over identifier-based limits.
cost integer Optionally override how expensive this operation is and how many tokens are deducted from the current limit.
limit integer Optionally override the maximum number of requests allowed within the specified interval.
duration integer Optionally override the duration of the rate limit window duration.
View JSON Schema on GitHub

JSON Schema

unkey-keysverifykeyratelimit-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/KeysVerifyKeyRatelimit",
  "title": "KeysVerifyKeyRatelimit",
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "minLength": 3,
      "maxLength": 255,
      "description": "References an existing ratelimit by its name. Key Ratelimits will take precedence over identifier-based limits.",
      "example": "tokens"
    },
    "cost": {
      "type": "integer",
      "minimum": 0,
      "default": 1,
      "description": "Optionally override how expensive this operation is and how many tokens are deducted from the current limit.",
      "example": 2
    },
    "limit": {
      "type": "integer",
      "minimum": 0,
      "description": "Optionally override the maximum number of requests allowed within the specified interval.",
      "example": 50
    },
    "duration": {
      "type": "integer",
      "minimum": 0,
      "description": "Optionally override the duration of the rate limit window duration.",
      "example": 600000
    }
  }
}