InputPOST /api/v1/x402/gas-cost-usd
{
"gas_used": 21000,
"gas_price_wei": "1000000000",
"eth_usd": 3000
}
Local chain primitives · chain-primitives-local
Estimate gas cost in USD given used gas, price, and ETH/USD. Call when operator reports that need approximate dollar gas spend. Returns usd cost estimate (caller supplies eth price) as deterministic JSON for $0.001 USDC via x402 on Base. First-party local math only—no RPC, live market feed, API keys, storage, or mediagen. Advisory only; the caller owns capital, risk, and production controls.
One-command purchase
No account or API key. AgentCash reads the 402 challenge, pays no more than the declared cap, retries the request and returns the result.
npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/gas-cost-usd -m POST -H 'x-delx-source: product-page' --max-amount 0.001 -b '{"gas_used":21000,"gas_price_wei":"1000000000","eth_usd":3000}'
{
"gas_used": 21000,
"gas_price_wei": "1000000000",
"eth_usd": 3000
}
{
"schema": "delx/util-gas-cost-usd/v1",
"gas_used": 21000,
"cost_eth": 0.000021,
"eth_usd": 3000,
"cost_usd": 0.063
}
Machine-readable evidence