Unkey · Schema

KeysVerifyKeyCredits

Controls credit consumption for usage-based billing and quota enforcement. Omitting this field uses the default cost of 1 credit per verification. Credits provide globally consistent usage tracking, essential for paid APIs with strict quotas.

API KeysRate LimitingAuthenticationDeveloper PlatformAccess ControlIdentityAnalytics

Properties

Name Type Description
cost integer Sets how many credits to deduct for this verification request. Use 0 for read-only operations or free tier access, higher values for premium features. Credits are deducted after all security checks pa
View JSON Schema on GitHub

JSON Schema

unkey-keysverifykeycredits-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/KeysVerifyKeyCredits",
  "title": "KeysVerifyKeyCredits",
  "type": "object",
  "required": [
    "cost"
  ],
  "properties": {
    "cost": {
      "type": "integer",
      "format": "int64",
      "minimum": 0,
      "maximum": 1000000000000,
      "description": "Sets how many credits to deduct for this verification request.\nUse 0 for read-only operations or free tier access, higher values for premium features.\nCredits are deducted after all security checks pass.\nEssential for implementing usage-based pricing with different operation costs.\n",
      "example": 5
    }
  },
  "additionalProperties": false,
  "description": "Controls credit consumption for usage-based billing and quota enforcement.\nOmitting this field uses the default cost of 1 credit per verification.\nCredits provide globally consistent usage tracking, essential for paid APIs with strict quotas.\n"
}