# PayAI Gas Price Oracle

> PayAI Gas Price Oracle is a paid API for AI agents from meryol-payai.hf.space, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-11).

Returns a live gas snapshot for Ethereum-compatible chains including base fee, p50/p90 priority fees in gwei, and USD cost estimates for common transaction types using real-time ETH/USD pricing.

## Facts

- Endpoint: GET https://meryol-payai.hf.space/gas/now/:chain?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/meryol-payai-hf-space-d2bf1a29
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1bFnbCP0Zt79carh0u_v5

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 meryol-payai-hf-space-d2bf1a29
```

Example prompt: What are the current gas fees on Arbitrum — give me the base fee, p50 and p90 priority fees in gwei, and how much a swap would cost in USD right now?

## When to prefer this

Use this endpoint when you need a live, actionable gas snapshot with USD cost context for a specific EVM chain (Ethereum, Base, Arbitrum, or Optimism) — especially when deciding whether to submit a transaction or sizing a gas budget. Prefer over static gas trackers when you need per-tx-type USD cost breakdowns and real-time ETH price folded in.

## Known failure modes

- Unsupported chain value returns a 400 or validation error
- CoinGecko rate unavailable causes USD cost computation to fail
- RPC node for the target chain is down or rate-limited, returning stale or empty data
- Network congestion causes eth_feeHistory to return incomplete blocks

## How this service works

Pre-broadcast gas check: base fee + p50/p90 priority fee in gwei from eth_feeHistory, plus USD cost per common tx type (native transfer, ERC-20 transfer, swap) at live ETH/USD. Size gas budgets or postpone txs under congestion. Never returns null costs — degraded upstreams are a free 502, not a paid empty answer. Chains: ethereum, base, arbitrum, optimism.

## Output

Returns a live gas snapshot including the current base fee in gwei, p50 and p90 priority fee estimates from eth_feeHistory, and USD cost estimates for native transfers, ERC-20 transfers, and swaps, with ETH/USD rate from CoinGecko folded in.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "pathParams": {
   "chain": "ethereum"
  },
  "queryParams": {}
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object",
     "required": [
      "chain"
     ],
     "properties": {
      "chain": {
       "enum": [
        "ethereum",
        "base",
        "arbitrum",
        "optimism"
       ],
       "type": "string"
      }
     }
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "base_fee_gwei",
      "cost_usd"
     ]
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/meryol-payai-hf-space-d2bf1a29/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from meryol-payai.hf.space](https://www.zero.xyz/host/meryol-payai.hf.space/llms.txt)
