# Agent402 UK – Ethereum Unit Converter (wei ↔ gwei ↔ ether)

> Agent402 UK – Ethereum Unit Converter (wei ↔ gwei ↔ ether) is a paid API for AI agents from agent402.co.uk, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Converts Ethereum denominations (wei, gwei, ether) between each other as precise decimal strings, avoiding floating-point drift.

## Facts

- Endpoint: POST https://agent402.co.uk/v1/utils/eth-units
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-uk-ethereum-unit-converter-wei-gwei-ether-d74f7ef2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ZNCkzU27Gy9Q9eFGkuuGV

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 agent402-uk-ethereum-unit-converter-wei-gwei-ether-d74f7ef2 -d '<json body>'
```

Example prompt: Convert 1.5 ether to wei as an exact decimal string — no floating-point approximation — using the Agent402 ETH unit converter.

## When to prefer this

Choose this endpoint when an EVM agent needs exact, float-safe denomination conversions between wei, gwei, and ether mid-task. Prefer it over JavaScript or Python native arithmetic when floating-point drift would corrupt downstream contract calls or financial calculations. Especially useful in automated pipelines where string-based precision is required.

## Known failure modes

- Invalid unit name in 'from' or 'to' (not one of wei/gwei/ether) — likely returns valid:false or error
- Amount string is not a valid number — may return valid:false
- Missing required fields — likely HTTP 400 or valid:false response
- Payment not included or insufficient — HTTP 402 response

## How this service works

Don't burn tokens on deterministic work. Go/no-go jobs first: payout preflight, text firewall (PII/secrets), budget check — then rails, calendars, finmath. x402 USDC on Base. UK + global. agent402.co.uk — not agent402.tools. $0.001–$0.002 USDC on Base. No API keys.

## Output

Returns a JSON object with a boolean 'valid' field indicating whether the conversion succeeded, and a 'result' field containing the converted amount as a precise decimal string (e.g. {"valid": true, "result": "1500000000000000000"}).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "to": {
   "type": "string",
   "description": "wei|gwei|ether"
  },
  "from": {
   "type": "string",
   "description": "wei|gwei|ether"
  },
  "amount": {
   "type": "string",
   "description": "Amount"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "valid": true,
  "result": "1500000000000000000"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-uk-ethereum-unit-converter-wei-gwei-ether-d74f7ef2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.co.uk](https://www.zero.xyz/host/agent402.co.uk/llms.txt)
