Skip to content
Fourohtwo

Pre-execution decision for a metered search or browse tool call

api.agent-preflight.com/v0.2/preflight/tool-call

Pre-execution decision for a metered search or browse tool call. Evaluates the proposal; does not execute the external tool.

BaseAnswering
POSThttps://api.agent-preflight.com/v0.2/preflight/tool-call

Uptime100% of 4 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://api.agent-preflight.com/v0.2/preflight/tool-call", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"budget":{"maxToolCallsRemaining":4,"remainingUsd":0.08,"reservedUsd":0.02},"history":[],"runId":"settlement-check-01","stepId":"paid-call-01","task":{"goalHash":"settlement-verification"},"tool":{"estimatedExternalCostUsd":0.01,"estimatedModelCostUsd":0.002,"operation":"web_search","provider":"search","request":{"max_results":5,"query":"Acme Corp Series B funding"}}}),
});
console.log(await res.json());

Example input

{
  "budget": {
    "maxToolCallsRemaining": 4,
    "remainingUsd": 0.08,
    "reservedUsd": 0.02
  },
  "history": [],
  "runId": "settlement-check-01",
  "stepId": "paid-call-01",
  "task": {
    "goalHash": "settlement-verification"
  },
  "tool": {
    "estimatedExternalCostUsd": 0.01,
    "estimatedModelCostUsd": 0.002,
    "operation": "web_search",
    "provider": "search",
    "request": {
      "max_results": 5,
      "query": "Acme Corp Series B funding"
    }
  }
}