# agent402.tools Number Formatter

> agent402.tools Number Formatter is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Formats a number with thousands separators, fixed decimal places, optional currency symbol, or compact notation (e.g. 1.2K, 3.4M).

## Facts

- Endpoint: POST https://agent402.tools/api/number-format
- 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-tools-number-formatter-99ebba4b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1rBsfmEqQMFP1EU1Q0_Os

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-tools-number-formatter-99ebba4b -d '<json body>'
```

Example prompt: Format the number 1482300.5 with two decimal places and USD currency — and also give me the compact version like 1.5M.

## When to prefer this

Use this endpoint when you need to render a raw number into a human-readable display string — especially for financial figures needing currency symbols, large numbers needing compact notation, or any value needing consistent decimal formatting for UI display or reports.

## Known failure modes

- Missing or non-numeric value field returns validation error
- Unrecognized currency ISO code may produce unexpected output
- Very large or very small floating-point values may lose precision
- Invalid decimals value (negative or non-integer) may cause error

## How this service works

Format a number: thousands separators, fixed decimals, optional currency, or compact (1.2K / 3.4M).

## Output

Returns a formatted string representation of the input number, applying thousands separators, fixed decimal precision, an optional currency prefix (e.g. $1,482,300.50), and/or compact notation (e.g. 1.5M).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "value": {
   "type": "number"
  },
  "compact": {
   "type": "boolean"
  },
  "currency": {
   "type": "string",
   "description": "ISO code e.g. USD"
  },
  "decimals": {
   "type": "number"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": "1,234,567.89"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-number-formatter-99ebba4b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
