{"slug":"denk-halowerk-com-v1-shared-rate-limiter-5d5e9e","title":"Shared token-bucket rate limiter for several agents calling the same API","host":"denk.halowerk.com","method":"POST","resource":"https://denk.halowerk.com/v1/shared-rate-limiter","category":"market","description":"Shared token-bucket rate limiter for several agents calling the same API: take tokens and get allowed/denied with retry-after. 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\" s","price_listed":0.002,"price_asked":0.002,"state":"answering","state_label":"Answering","checks_7d":4,"answered_7d":4,"latency_ms_median":910,"reported_calls_30d":1,"reported_payers_30d":1,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"action":"take","bucket":"openai","capacity":60,"namespace":"my-agents","refill_per_second":1,"secret":"a-long-random-secret-123"},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"additionalProperties":false,"properties":{"action":{"enum":["take","peek","reset"],"type":"string"},"bucket":{"maxLength":200,"minLength":1,"type":"string"},"capacity":{"exclusiveMinimum":0,"maximum":1000000,"type":"number"},"namespace":{"description":"Your namespace; claimed by the first call with its secret.","pattern":"^[A-Za-z0-9_-]{3,64}$","type":"string"},"refill_per_second":{"exclusiveMinimum":0,"maximum":1000000,"type":"number"},"secret":{"description":"Secret for the namespace (stored only as HMAC).","maxLength":200,"minLength":16,"type":"string"},"tokens":{"default":1,"exclusiveMinimum":0,"maximum":1000000,"type":"number"}},"required":["namespace","secret","action","bucket","capacity","refill_per_second"],"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-11-27","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":909,"error":null},{"day":"2026-11-26","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":874,"error":null},{"day":"2026-11-25","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":920,"error":null},{"day":"2026-11-24","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":912,"error":null}],"description_full":"Shared token-bucket rate limiter for several agents calling the same API: take tokens and get allowed/denied with retry-after. 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.","last_updated":"2026-11-24T10:20:16.896Z","schemes":["exact"]}