{
  "format": "delx/intent-card/v1",
  "id": "base-gas-budget-check-api",
  "intent": "check whether a Base wallet has enough gas budget before an agent payment",
  "title": "Check whether a Base wallet can afford gas before paying",
  "description": "Compare a supplied Base gas estimate, fee inputs and spending ceiling before an agent attempts a transaction. The calculation is deterministic and budget-focused; it never signs, broadcasts or moves wallet funds.",
  "keywords": [
    "Base gas budget",
    "agent wallet preflight",
    "x402 gas check",
    "Base transaction affordability",
    "USDC payment preflight"
  ],
  "updated_at": "2026-08-23",
  "canonical_url": "https://commerce.delx.ai/intents/base-gas-budget-check-api",
  "machine_url": "https://commerce.delx.ai/intents/base-gas-budget-check-api.json",
  "recommendation": {
    "tool_name": "util_base_gas_budget_check",
    "service_name": "Base Gas Budget Check",
    "method": "POST",
    "resource": "https://api.delx.ai/api/v1/x402/base-gas-budget-check",
    "price_usdc": "0.001",
    "payment_protocols": [
      "x402",
      "mpp"
    ],
    "input_schema": {
      "type": "object",
      "properties": {
        "gas_price_gwei": {
          "type": "number",
          "minimum": 0
        },
        "gas_limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 30000000
        },
        "budget_eth": {
          "type": "number",
          "minimum": 0
        },
        "eth_usd": {
          "type": "number",
          "exclusiveMinimum": 0
        }
      },
      "required": [
        "gas_price_gwei",
        "gas_limit",
        "budget_eth"
      ],
      "additionalProperties": false
    },
    "example_input": {
      "gas_price_gwei": 0.08,
      "gas_limit": 21000,
      "budget_eth": 0.00001,
      "eth_usd": 3500
    },
    "example_output": {
      "schema": "delx/util-base-gas-budget-check/v1",
      "estimated_fee_wei": "1680000000000",
      "estimated_fee_eth": "0.00000168",
      "budget_wei": "10000000000000",
      "budget_eth": "0.00001",
      "within_budget": true,
      "headroom_wei": "8320000000000",
      "headroom_eth": "0.00000832",
      "estimated_fee_usd": "0.00588"
    },
    "agentcash": {
      "buy": "npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/base-gas-budget-check -m POST -H 'x-delx-source: intent-card-base-gas-budget-check-api' --max-amount 0.001 -b '{\"gas_price_gwei\":0.08,\"gas_limit\":21000,\"budget_eth\":0.00001,\"eth_usd\":3500}'",
      "max_amount_usdc": "0.001"
    }
  },
  "attribution": {
    "header": "x-delx-source",
    "value": "intent-card-base-gas-budget-check-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/base-gas-budget-check"
  }
}
