Skip to content
Fourohtwo

Agent Cost Guard

xhagents.xyz/api/costguard/assess

Agent Cost Guard: send your own agent-config numbers (primary model, background/curator models, daily tokens, turn limit) and get a risk-ranked cost assessment back: which background work is silently running on an expensive model, what that costs in a daily range, and the specific levers that cap it. Deterministic rules, no storage, no telemetry.

BaseAnswering
POSThttps://xhagents.xyz/api/costguard/assess

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://xhagents.xyz/api/costguard/assess", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"background":[{"input_tokens":4000000,"model":"claude-opus-4-7","output_tokens":40000,"task":"background_review"}],"curator":{"enabled":true,"interval_days":7},"daily_input_tokens":12000000,"max_turns":150,"primary_model":"claude-opus-4-7"}),
});
console.log(await res.json());

Example input

{
  "background": [
    {
      "input_tokens": 4000000,
      "model": "claude-opus-4-7",
      "output_tokens": 40000,
      "task": "background_review"
    }
  ],
  "curator": {
    "enabled": true,
    "interval_days": 7
  },
  "daily_input_tokens": 12000000,
  "max_turns": 150,
  "primary_model": "claude-opus-4-7"
}