# Base L2 Execution Fee Calculator

> Base L2 Execution Fee Calculator is a paid API for AI agents from signalharness.ai, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Calculates the L2 execution fee for a transaction on the Base network given gas parameters, returning effective gas price, execution fee, and OP Stack fee model details.

## Facts

- Endpoint: POST https://signalharness.ai/api/agent/services/base_l2_execution_fee_calculate/invoke
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-l2-execution-fee-calculator-b72d2e84
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lEbvHabaXsYCq_ItCqa7t

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability base-l2-execution-fee-calculator-b72d2e84 -d '<json body>'
```

Example prompt: Calculate the L2 execution fee on Base mainnet for a standard ETH transfer using 21000 gas, with a max fee per gas of 105 wei and max priority fee of 0 wei — I need the total execution fee and effective gas price breakdown.

## When to prefer this

Choose this endpoint when you need a precise, auditable calculation of the L2 execution fee component on Base (chain IDs 8453 or 84532) using OP Stack fee model semantics. It is ideal when you already have gas parameters (gas limit, max fee per gas, max priority fee) and need the fee computed without submitting a transaction. Note it explicitly excludes L1 data and operator fees, so use it when you want only the L2 execution component or will supply L1/operator fees separately. Prefer this over on-chain RPC estimation when you need deterministic, off-chain fee analysis with detailed breakdowns.

## Known failure modes

- Invalid or malformed request_json input returns an error
- Gas parameters outside acceptable range may produce warnings or errors
- Missing required gas fields in the input JSON cause computation failure
- Unsupported chain ID returns a network context mismatch error
- Malformed JSON string (not a valid JSON object) causes parse failure

## How this service works

Explore 330 pay-per-call x402 API services and 27 agent-native digital products, with Base USDC pricing, secure Polar checkout, and free discovery.

## Output

Returns a JSON object containing the calculated execution fee in wei, effective gas price, base fee per gas, max fee per gas, realized priority fee per gas, cap headroom, the analysis mode (evm_fee), network context (accepted chain IDs 8453/84532, OP Stack fee model), and any warnings about excluded fee components such as L1 data fees or operator fees. Also includes a service receipt with payment details and a SHA256 hash of the result.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "request_json": {
   "type": "string",
   "maxLength": 65536,
   "minLength": 2
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "replay": false,
  "result": {
   "warnings": [
    "Excludes L1 data and operator fees unless separately supplied."
   ],
   "service_id": "base_l2_execution_fee_calculate",
   "analysis_json": "{\"base_fee_per_gas\":\"0\",\"cap_headroom\":\"105\",\"effective_gas_price\":\"105\",\"execution_fee\":\"2205000\",\"gas\":\"21000\",\"max_fee_per_gas\":\"105\",\"max_priority_fee_per_gas\":\"0\",\"mode\":\"evm_fee\",\"network_context\":{\"accepted_chain_ids\":[\"8453\",\"84532\"],\"deposit_transaction_type\":\"0x7e\",\"fee_model\":\"L2 execution plus caller-supplied L1 data/operator components\",\"protocol_family\":\"OP Stack\"},\"realized_priority_fee_per_gas\":\"105\"}",
   "evidence_scope": "caller_supplied_data",
   "analyzed_network": "base"
  },
  "status": "succeeded",
  "receipt": {
   "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
   "usage": [],
   "status": "succeeded",
   "network": "eip155:8453",
   "artifacts": [],
   "endedAtMs": 0,
   "latencyMs": 0,
   "paymentId": "example-payment",
   "receiptId": "example-receipt",
   "requestId": "example-request",
   "serviceId": "base_l2_execution_fee_calculate",
   "executionId": "example-execution",
   "startedAtMs": 0,
   "amountAtomic": "5000",
   "resultSha256": "4af4378aea225fc6b630f0ab595847f3842afb618f8e56e4b07b6d1c56ad27d7",
   "serviceVersion": "1.0.0",
   "settlementReference": "0x0000000000000000000000000000000000000000000000000000000000000000"
  },
  "artifacts": [],
  "requestId": "example-request",
  "executionId": "example-execution"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-l2-execution-fee-calculator-b72d2e84/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from signalharness.ai](https://www.zero.xyz/host/signalharness.ai/llms.txt)
