29trust / 100

Calculators Fuel Cost Calculator

by AgentTools in Company & people data

x402 APIFailing, checked 2 h ago

Calculate the liters of fuel a trip needs and its total cost from distance, consumption (L/100 km) and price per liter — with optional cost splitting between passengers. Use this when an agent needs to trip fuel and cost, splitable between people.

GET https://agenttools-hub.vercel.app/api/v1/calculators/fuel-cost-calculator

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
13.3%
Response time
134 ms typical, 134 ms slowest 5%
Last check
2 h ago: Expected HTTP 402, got 308
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://agenttools-hub.vercel.app/api/v1/calculators/fuel-cost-calculator?consumption=6.5&distance=450&people=1&pricePerLiter=1.75"
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fagenttools-hub.vercel.app%2Fapi%2Fv1%2Fcalculators%2Ffuel-cost-calculator
const res = await pay("https://agenttools-hub.vercel.app/api/v1/calculators/fuel-cost-calculator?consumption=6.5&distance=450&people=1&pricePerLiter=1.75");
console.log(await res.json());

Example input

{
  "consumption": 6.5,
  "distance": 450,
  "people": 1,
  "pricePerLiter": 1.75
}

Example output

{
  "result": {
    "answer": "51.19",
    "answerLabel": "Fuel cost for 450 km",
    "details": [
      {
        "label": "Fuel needed",
        "value": "29.25 L"
      },
      {
        "label": "Distance",
        "value": "450 km"
      }
    ],
    "steps": [
      "Liters = 450 × 6.5 ÷ 100 = 29.25 L",
      "Cost = 29.25 L × 1.75 = 51.19"
    ],
    "value": 51.1875
  },
  "tool": "fuel-cost-calculator"
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
2 h agoExpected HTTP 402, got 308308265 ms-
6 h agoExpected HTTP 402, got 30830878 ms-
11 h agoExpected HTTP 402, got 30830858 ms-
15 h agoExpected HTTP 402, got 30830848 ms-
19 h agoExpected HTTP 402, got 308308125 ms-
23 h agoExpected HTTP 402, got 30830873 ms-
27 h agoExpected HTTP 402, got 30830853 ms-
31 h agoExpected HTTP 402, got 30830897 ms-
34 h agoExpected HTTP 402, got 308308145 ms-
39 h agoExpected HTTP 402, got 30830899 ms-
43 h agoExpected HTTP 402, got 308308112 ms-
47 h agoExpected HTTP 402, got 308308249 ms-
2 days agoExpected HTTP 402, got 30830894 ms-
2 days agoPassed402228 ms$0.002
2 days agoPassed402134 ms$0.002