# Token Raw to Human Amount

> Token Raw to Human Amount is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Converts raw integer token units (e.g. wei, satoshi) into human-readable decimal amounts by scaling with the token's decimal places.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/token-raw-to-amount
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/token-raw-to-human-amount-91ac194f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_PbGpWk2i9PwOzdb9UrzJz

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 token-raw-to-human-amount-91ac194f -d '<json body>'
```

Example prompt: Convert a raw token amount of 1500000000 with 6 decimals into its human-readable amount — what's the actual balance I should display?

## When to prefer this

Use this endpoint when you need a quick, deterministic, pure-math conversion from raw on-chain token integers to human-readable decimals — especially in agent pipelines processing ERC20 balances, event logs, or DeFi positions, without needing any RPC connection, API key, or live data feed. Prefer this over manual calculation when you want a clean, validated JSON response with the result and provenance fields included.

## Known failure modes

- Missing or invalid 'raw' string causes a validation error
- Non-integer or negative decimals value may return an error
- Extremely large raw values may hit precision limits depending on implementation
- Payment failure via x402 if USDC balance is insufficient

## How this service works

Scale raw token units by decimals into human-readable amounts. Call when rendering balances or logs that store raw integer token units. Returns human amount plus raw and decimals as deterministic JSON for $0.001 USDC via x402 on Base. First-party local math only—no RPC, live market feed, API keys, storage, or mediagen. Advisory only; the caller owns capital, risk, and production controls.

## Output

Returns a deterministic JSON object containing the human-readable token amount (raw divided by 10^decimals), the original raw amount, and the decimals used — computed locally without any RPC call or external data source.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "raw": {
   "type": "string",
   "description": "Input field: raw."
  },
  "decimals": {
   "type": "integer",
   "description": "Input field: decimals."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "raw": "1250000",
  "amount": 1.25,
  "schema": "delx/util-token-raw-to-amount/v1",
  "decimals": 6
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/token-raw-to-human-amount-91ac194f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
