# Delx Commerce Gas Cost ETH Calculator

> Delx Commerce Gas Cost ETH Calculator is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-01).

Computes the ETH and wei cost of an Ethereum transaction given gas used and gas price in wei

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/gas-cost-eth?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-gas-cost-eth-calculator-2107651c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_alqze1Tg1teF_n91w4XhM

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 delx-commerce-gas-cost-eth-calculator-2107651c -d '<json body>'
```

Example prompt: Calculate the ETH cost for a transaction that used 21000 gas at a gas price of 1000000000 wei.

## When to prefer this

Use this endpoint when you need a precise, on-demand computation of Ethereum transaction gas costs in ETH and wei without setting up local arithmetic — particularly useful inside agent workflows that need to display, log, or compare transaction fees without writing custom BigInt math. Ideal for pay-per-use agent pipelines where no API key or signup is required.

## Known failure modes

- Missing required fields (gas_used or gas_price_wei) returns an error response
- Non-integer gas_used or non-string gas_price_wei may cause validation errors
- Extremely large values for gas_price_wei could cause overflow or precision issues
- Payment failure via x402 USDC protocol results in 402 response before computation occurs

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

Returns a JSON object with the schema identifier 'delx/util-gas-cost-eth/v1', the transaction cost expressed in ETH as a decimal (cost_eth), the cost in wei as a string (cost_wei), and echoes back the input gas_used and gas_price_wei for verification.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "gas_used": {
   "type": "integer",
   "description": "Input field: gas used."
  },
  "gas_price_wei": {
   "type": "string",
   "description": "Input field: gas price wei."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "schema": "delx/util-gas-cost-eth/v1",
  "cost_eth": 0.000021,
  "cost_wei": "21000000000000",
  "gas_used": 21000,
  "gas_price_wei": "1000000000"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-gas-cost-eth-calculator-2107651c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
