80trust / 100

Calculators Fuel Cost Calculator

by AgentTools in Company & people data

x402 APIPassing, checked 3 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://agentstoolshub.com/api/v1/calculators/fuel-cost-calculator

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
155 ms typical, 271 ms slowest 5%
Last check
3 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://agentstoolshub.com/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%2Fagentstoolshub.com%2Fapi%2Fv1%2Fcalculators%2Ffuel-cost-calculator
const res = await pay("https://agentstoolshub.com/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
3 h agoPassed402171 ms$0.002
7 h agoPassed402148 ms$0.002
10 h agoPassed402148 ms$0.002
14 h agoPassed402184 ms$0.002
18 h agoPassed402155 ms$0.002
21 h agoPassed402154 ms$0.002
25 h agoPassed402133 ms$0.002
28 h agoPassed402271 ms$0.002
33 h agoPassed402320 ms$0.002