# skills.onesource.io Gas Estimator

> skills.onesource.io Gas Estimator is a paid API for AI agents from skills.onesource.io, paid per call via x402, $0.004000/call, status unknown (last checked 2026-09-13).

Estimates the gas a transaction will consume on Ethereum via eth_estimateGas before it is signed or broadcast

## Facts

- Endpoint: POST https://skills.onesource.io/api/chain/estimate-gas
- Price: $0.004000/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/skills-onesource-io-1296d0a9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_chacDRTtJAHhD0ylfAlxQ

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 skills-onesource-io-1296d0a9 -d '<json body>'
```

Example prompt: Before I sign this transaction, estimate how much gas it will consume — it's a call to contract 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 from my wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 with calldata 0xa9059cbb000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa9604500000000000000000000000000000000000000000000000000000000000f4240 and value 0x0.

## When to prefer this

Use this endpoint when you need a quick, accurate gas estimate for an Ethereum transaction before signing — especially before sending ETH, calling smart contracts, or performing ERC20 transfers. Prefer it over static gas limits when you want to avoid overpaying or out-of-gas failures.

## Known failure modes

- Transaction would revert on-chain: estimateGas returns an error indicating execution failure
- Invalid hex address or data format: returns 400 validation error
- Missing required 'to' or 'data' fields for contract calls: incomplete response or error
- Network or RPC unavailability: returns 5xx or timeout
- Insufficient balance for 'from' address causes simulation failure

## How this service works

Estimate the gas a transaction will consume via eth_estimateGas before signing it

## Output

Returns the estimated number of gas units the transaction will consume, computed via eth_estimateGas against the live Ethereum RPC — useful for setting gas limits before signing.

## Example request

```json
{
 "to": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
 "from": "0x0000000000000000000000000000000000000001",
 "value": "0x0"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "to": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]{40}$"
  },
  "data": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]+$"
  },
  "from": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]{40}$"
  },
  "value": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]+$"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "data",
  "meta"
 ],
 "properties": {
  "data": {
   "type": "object",
   "required": [
    "gas"
   ],
   "properties": {
    "gas": {
     "type": "string"
    }
   }
  },
  "meta": {
   "type": "object",
   "required": [
    "endpoint",
    "request_id"
   ],
   "properties": {
    "endpoint": {
     "type": "string"
    },
    "request_id": {
     "type": "string"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/skills-onesource-io-1296d0a9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from skills.onesource.io](https://www.zero.xyz/host/skills.onesource.io/llms.txt)
