# Agent Rest Stop – UnitScale Decimal Converter

> Agent Rest Stop – UnitScale Decimal Converter is a paid API for AI agents from agent-gas-station.agent-gas-station.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-31).

Converts an integer amount from one decimal unit to another (e.g. wei to ether, satoshis to BTC)

## Facts

- Endpoint: POST https://agent-gas-station.agent-gas-station.workers.dev/v1/UnitScale?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-rest-stop-unitscale-decimal-converter-158dc75c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_F8twed9R1Yxzr2g18sXWT

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 agent-rest-stop-unitscale-decimal-converter-158dc75c -d '<json body>'
```

Example prompt: Convert 1500000 from 6 decimals to 18 decimals — I need the scaled integer result.

## When to prefer this

Use this endpoint when you need to scale a raw integer token or currency amount between decimal precisions — for example when bridging between blockchain token units (wei/gwei/ether), normalizing amounts across tokens with different decimal places, or converting a raw contract value to a human-readable display unit. Prefer this over manual arithmetic when precision matters and the amount is represented as a string to avoid floating-point errors.

## Known failure modes

- Non-numeric or malformed 'amount' string causes a parsing error
- Negative or non-integer decimal values for from_decimals or to_decimals may be rejected
- Very large integer amounts beyond safe integer range may cause precision loss
- Missing required fields returns a 400-level error
- Network or worker timeout on the Cloudflare edge

## How this service works

Integer amount in another decimal unit.

## Output

A scaled integer amount representing the input value redenominated from the source decimal precision to the target decimal precision, returned as a string or numeric value suitable for further computation or display.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "amount": {
   "type": "string"
  },
  "to_decimals": {
   "type": "string"
  },
  "from_decimals": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-rest-stop-unitscale-decimal-converter-158dc75c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-gas-station.agent-gas-station.workers.dev](https://www.zero.xyz/host/agent-gas-station.agent-gas-station.workers.dev/llms.txt)
