# agent402.tools Base Converter

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

Converts an integer string between any two number bases (radix 2–36) using arbitrary-precision BigInt arithmetic.

## Facts

- Endpoint: POST https://agent402.tools/api/base-convert
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-base-converter-5e9ffea2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fQfQobV5kVO0ndfuArV9P

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-base-converter-5e9ffea2 -d '<json body>'
```

Example prompt: Convert the binary number 11111111 to hexadecimal — treat the input as base 2 and give me the result in base 16.

## When to prefer this

Use this endpoint when you need precise, arbitrary-precision number base conversion between any radix 2–36, especially for large integers that exceed native language integer limits. Prefer it over client-side code when the agent doesn't have a reliable math library available.

## Known failure modes

- Invalid 'from' or 'to' base outside 2–36 range returns an error
- Non-numeric or invalid characters for the specified source base cause a parse error
- Missing required fields (value, from, to) result in a validation error
- Payment failure or missing x402 header returns 402 Payment Required

## How this service works

Convert an integer between number bases (radix 2-36), e.g. binary↔hex↔decimal. Arbitrary size via BigInt.

## Output

Returns the input integer string converted and expressed in the target base as a string, supporting arbitrarily large integers via BigInt.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "to": {
   "type": "number",
   "description": "2-36"
  },
  "from": {
   "type": "number",
   "description": "2-36"
  },
  "value": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": "11111111"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-base-converter-5e9ffea2/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)
