Skip to content
Fourohtwo

Cost-to-Complete Estimate

www.omenz.org/api/tollbooth/v1/cost-estimate

Cost-to-Complete Estimate: what will this agent job cost BEFORE it starts? Give the steps (model, input/output tokens, runs, retry rate) with your model prices, and paid tool calls (price, or an x402 URL we quote live without paying). Get the total, a realistic range, the biggest cost, budget fit, value multiple, and how much routing named steps to a cheaper model saves. Deterministic arithmetic.

BaseAnswering
POSThttps://www.omenz.org/api/tollbooth/v1/cost-estimate

Uptime100% of 1 check 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://www.omenz.org/api/tollbooth/v1/cost-estimate", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"job":{"alternatives":{"extract":"small"},"budget_usd":30,"models":{"big":{"input_per_mtok_usd":8,"output_per_mtok_usd":40},"small":{"input_per_mtok_usd":0.5,"output_per_mtok_usd":3}},"steps":[{"input_tokens":1000000,"model":"big","name":"extract","output_tokens":50000,"retry_rate":0.1,"runs":2}],"tools":[{"calls":10,"name":"facts","x402_url":"https://www.omenz.org/api/tollbooth/v1/local-facts?ur),
});
console.log(await res.json());

Example input

{"job":{"alternatives":{"extract":"small"},"budget_usd":30,"models":{"big":{"input_per_mtok_usd":8,"output_per_mtok_usd":40},"small":{"input_per_mtok_usd":0.5,"output_per_mtok_usd":3}},"steps":[{"input_tokens":1000000,"model":"big","name":"extract","output_tokens":50000,"retry_rate":0.1,"runs":2}],"tools":[{"calls":10,"name":"facts","x402_url":"https://www.omenz.org/api/tollbooth/v1/local-facts?ur