# Delx Commerce Gas Cost Wei Calculator

> Delx Commerce Gas Cost Wei 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 total gas cost in wei given gas used and gas price per unit

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/gas-cost-wei?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-wei-calculator-a4e30ebc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_cyyv26jGK7_2q_5a7hse7

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-wei-calculator-a4e30ebc -d '<json body>'
```

Example prompt: What's the total gas cost in wei if a transaction used 21000 gas units at a gas price of 1000000000 wei?

## When to prefer this

Use this endpoint when you need a quick, verifiable, pay-per-call computation of EVM gas costs in wei without building the multiplication logic yourself. Ideal for AI agents that need deterministic gas fee figures before submitting transactions or for cost logging and analytics pipelines. Prefer this over manual computation when you want a canonical schema-versioned response (delx/util-gas-cost-wei/v1) that is auditable and consistent across calls.

## Known failure modes

- Missing required field (gas_used or gas_price_wei) returns an error
- Non-integer gas_used or non-numeric gas_price_wei string causes a validation error
- Payment failure via x402 protocol results in 402 Payment Required response
- Overflow for extremely large gas values may produce unexpected results

## 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 schema identifier 'delx/util-gas-cost-wei/v1', the computed total cost in wei as a string (cost_wei = gas_used × gas_price_wei), along with the echoed inputs gas_used and gas_price_wei.

## 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-wei/v1",
  "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-wei-calculator-a4e30ebc/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)
