# TokenGuard Gas Price API

> TokenGuard Gas Price API is a paid API for AI agents from eltociear-tokenguard.hf.space, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Returns current gas price in gwei and a cost-level label (e.g. 'cheap') for a specified blockchain network

## Facts

- Endpoint: POST https://eltociear-tokenguard.hf.space/gas
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tokenguard-gas-price-api-064c3097
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_PnqAxPMa7yOCEchesWLWd

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 tokenguard-gas-price-api-064c3097 -d '<json body>'
```

Example prompt: What's the current gas price on Base right now — is it cheap or expensive?

## When to prefer this

Use this endpoint when an agent needs a quick, inexpensive ($0.005) real-time gas price check for one of the six supported chains (Base, Ethereum, Arbitrum, Optimism, Polygon, BSC) before executing a transaction or advising a user on timing. Prefer this over full node RPC calls when simplicity and micropayment-based access are acceptable.

## Known failure modes

- Invalid chain value not in enum returns validation error
- Network unavailability on the queried chain may return stale or error response
- Missing required 'input' wrapper in request body causes schema validation failure
- HuggingFace Spaces cold-start delay may cause timeout on first call

## How this service works

Current gas price + base fee for a chain, with an ERC20-transfer cost estimate.

## Output

A JSON object containing the queried chain name, a qualitative gas level label (e.g. 'cheap'), and the current gas price expressed in gwei (e.g. 0.006).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "chain": {
   "enum": [
    "base",
    "ethereum",
    "arbitrum",
    "optimism",
    "polygon",
    "bsc"
   ],
   "type": "string",
   "description": "Chain (default base)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "chain": "base",
  "level": "cheap",
  "gas_price_gwei": 0.006
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tokenguard-gas-price-api-064c3097/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from eltociear-tokenguard.hf.space](https://www.zero.xyz/host/eltociear-tokenguard.hf.space/llms.txt)
