Skip to content
HALOWERK

Denkwerk

shared rate limiter

Namespaced token buckets with capacity and refill rate defined by the caller. "take" removes n tokens if available and otherwise returns the exact retry-after time; "peek" shows the current level; "reset" refills the bucket. Bucket state is computed lazily from timestamps, so no background job is needed. The namespace is claimed with a secret on first use.

POST https://denk.halowerk.com/v1/shared-rate-limiter

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
namespacestringYesYour namespace; claimed by the first call with its secret.
secretstringYesSecret for the namespace (stored only as HMAC).
actionstringYes
bucketstringYes
capacitynumberYes
refill_per_secondnumberYes
tokensnumberNo
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "namespace",
    "secret",
    "action",
    "bucket",
    "capacity",
    "refill_per_second"
  ],
  "properties": {
    "namespace": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{3,64}$",
      "description": "Your namespace; claimed by the first call with its secret."
    },
    "secret": {
      "type": "string",
      "minLength": 16,
      "maxLength": 200,
      "description": "Secret for the namespace (stored only as HMAC)."
    },
    "action": {
      "type": "string",
      "enum": [
        "take",
        "peek",
        "reset"
      ]
    },
    "bucket": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "capacity": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1000000
    },
    "refill_per_second": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1000000
    },
    "tokens": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1000000,
      "default": 1
    }
  }
}

Open original schema

Published input example

{
  "namespace": "my-agents",
  "secret": "halowerk-public-catalogue-coordination-v1",
  "action": "take",
  "bucket": "openai",
  "capacity": 60,
  "refill_per_second": 1
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub โ†’