Skip to content
Fourohtwo

One rate limiter shared by every agent in your fleet

agents.writerslogic.com/api/v1/token-bucket

One rate limiter shared by every agent in your fleet. take(cost) atomically spends tokens if available and returns allowed plus remaining, or refuses with retryAfterMs until enough tokens refill. capacity and refillPerSecond are fixed when the bucket is first used; a call with different settings is refused so two fleets cannot silently disagree. Use a requestId so a retried take is not charged twi

BaseAnswering
POSThttps://agents.writerslogic.com/api/v1/token-bucket

Uptime100% of 3 checks in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://agents.writerslogic.com/api/v1/token-bucket", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"op":"take","cost":1,"bucket":"github:search","capacity":30,"requestId":"w3-search-0017","refillPerSecond":0.5}),
});
console.log(await res.json());

Example input

{
  "op": "take",
  "cost": 1,
  "bucket": "github:search",
  "capacity": 30,
  "requestId": "w3-search-0017",
  "refillPerSecond": 0.5
}