{
  "format": "delx/intent-card/v1",
  "id": "gas-cost-wei-api",
  "intent": "Gas Cost in Wei for an agent workflow",
  "title": "Gas Cost in Wei API for agents",
  "description": "Compute gas_used × gas_price as total gas cost in wei. Call when estimating tx cost from known used gas and price without a node. Returns gas cost wei string 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.",
  "keywords": [
    "Gas Cost in Wei API",
    "Gas Cost in Wei for agents",
    "pay per result API",
    "x402 API",
    "no API key"
  ],
  "updated_at": "2026-08-23",
  "canonical_url": "https://commerce.delx.ai/intents/gas-cost-wei-api",
  "machine_url": "https://commerce.delx.ai/intents/gas-cost-wei-api.json",
  "recommendation": {
    "tool_name": "util_gas_cost_wei",
    "service_name": "Gas Cost in Wei",
    "method": "POST",
    "resource": "https://api.delx.ai/api/v1/x402/gas-cost-wei",
    "price_usdc": "0.001",
    "payment_protocols": [
      "x402",
      "mpp"
    ],
    "input_schema": {
      "type": "object",
      "properties": {
        "gas_used": {
          "description": "Input field: gas used.",
          "type": "integer"
        },
        "gas_price_wei": {
          "description": "Input field: gas price wei.",
          "type": "string"
        }
      },
      "required": [
        "gas_used",
        "gas_price_wei"
      ],
      "additionalProperties": true
    },
    "example_input": {
      "gas_used": 21000,
      "gas_price_wei": "1000000000"
    },
    "example_output": {
      "schema": "delx/util-gas-cost-wei/v1",
      "gas_used": 21000,
      "gas_price_wei": "1000000000",
      "cost_wei": "21000000000000"
    },
    "agentcash": {
      "buy": "npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/gas-cost-wei -m POST -H 'x-delx-source: intent-card-gas-cost-wei-api' --max-amount 0.001 -b '{\"gas_used\":21000,\"gas_price_wei\":\"1000000000\"}'",
      "max_amount_usdc": "0.001"
    }
  },
  "attribution": {
    "header": "x-delx-source",
    "value": "intent-card-gas-cost-wei-api"
  },
  "evidence": {
    "paid_openapi": "https://api.delx.ai/openapi.x402.json",
    "governed_portfolio": "https://api.delx.ai/x402-portfolio.json",
    "live_contract": "https://api.delx.ai/api/v1/x402/gas-cost-wei"
  }
}
