{"uid":"cap_cyyv26jGK7_2q_5a7hse7","slug":"delx-commerce-gas-cost-wei-calculator-a4e30ebc","name":"Delx Commerce Gas Cost Wei Calculator","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/gas-cost-wei?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"gas_used":{"type":"integer","description":"Input field: gas used."},"gas_price_wei":{"type":"string","description":"Input field: gas price wei."}}},"responseSchema":{"type":"json","example":{"schema":"delx/util-gas-cost-wei/v1","cost_wei":"21000000000000","gas_used":21000,"gas_price_wei":"1000000000"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_S2Zr8urtw4vhXo_umPuBD","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the total gas cost in wei given gas used and gas price per unit","exampleAgentPrompt":"What's the total gas cost in wei if a transaction used 21000 gas units at a gas price of 1000000000 wei?","exampleUseCases":[{"title":"Pre-flight transaction cost check","prompt":"Before I submit this Ethereum transfer, tell me the total gas cost in wei — it's going to use 21000 gas at a price of 1500000000 wei per unit."},{"title":"Smart contract call fee estimation","prompt":"My smart contract call used 85000 gas units and the current gas price is 2000000000 wei. What's the total cost in wei?"},{"title":"Gas cost logging for agent analytics","prompt":"Log the gas cost for the last transaction: 45000 gas used at 1200000000 wei per gas — give me the total cost in wei so I can record it."}],"resultDescription":"Returns a JSON object with schema identifier 'delx/util-gas-cost-wei/v1', the computed total cost in wei as a string (cost_wei = gas_used × gas_price_wei), along with the echoed inputs gas_used and gas_price_wei.","failureModes":["Missing required field (gas_used or gas_price_wei) returns an error","Non-integer gas_used or non-numeric gas_price_wei string causes a validation error","Payment failure via x402 protocol results in 402 Payment Required response","Overflow for extremely large gas values may produce unexpected results"],"whenToPreferThis":"Use this endpoint when you need a quick, verifiable, pay-per-call computation of EVM gas costs in wei without building the multiplication logic yourself. Ideal for AI agents that need deterministic gas fee figures before submitting transactions or for cost logging and analytics pipelines. Prefer this over manual computation when you want a canonical schema-versioned response (delx/util-gas-cost-wei/v1) that is auditable and consistent across calls.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:47.041Z","isFirstParty":false,"canonicalSlug":"delx-commerce-gas-cost-wei-calculator-a4e30ebc"}