# Base Network Total Transaction Cost Calculator

> Base Network Total Transaction Cost Calculator is a paid API for AI agents from signalharness.ai, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Computes the total transaction cost on the Base (OP Stack) network by summing caller-supplied L1 data fee and L2 execution fee components in wei.

## Facts

- Endpoint: POST https://signalharness.ai/api/agent/services/base_total_transaction_cost/invoke
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-network-total-transaction-cost-calculator-665dda6f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lheYR6J6Q9iN6N19nmICq

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-network-total-transaction-cost-calculator-665dda6f -d '<json body>'
```

Example prompt: Calculate the total transaction cost on Base for a transaction with an L1 data fee of 500 wei and an L2 execution fee of 2205000 wei — give me the breakdown and total in wei.

## When to prefer this

Use this endpoint when you need to programmatically compute the total on-chain transaction cost on Base (an OP Stack L2) by supplying known L1 data fee and L2 execution fee components. Prefer this over generic gas estimators when you already have the fee components and need a structured breakdown with network context validation for Base mainnet or Base Sepolia.

## Known failure modes

- Invalid or malformed request_json string returns an error
- Missing fee components result in warnings but partial computation
- Chain ID not in accepted list (8453 or 84532) may produce unexpected results
- request_json exceeding 65536 characters is rejected
- Malformed JSON inside request_json string causes parsing 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 total cost in wei, a breakdown of individual fee components (L1 data fee and L2 execution fee), network context including accepted chain IDs (Base mainnet 8453, Base Sepolia 84532), the fee model description ('L2 execution plus caller-supplied L1 data/operator components'), the protocol family (OP Stack), and any warnings (e.g. if only partial components were supplied).

## 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": [
    "Only supplied components are included."
   ],
   "service_id": "base_total_transaction_cost",
   "analysis_json": "{\"components\":{\"l1_data_fee\":\"500\",\"l2_execution_fee\":\"2205000\"},\"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\"},\"total_wei\":\"2205500\"}",
   "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_total_transaction_cost",
   "executionId": "example-execution",
   "startedAtMs": 0,
   "amountAtomic": "10000",
   "resultSha256": "71f3f6d185a1a61d0d93316ff31fc273e88fae9e9b937f2b2d7cd27498f4f717",
   "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-network-total-transaction-cost-calculator-665dda6f/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)
