# Duo Data Utilities – Radix/Base Converter

> Duo Data Utilities – Radix/Base Converter is a paid API for AI agents from api.duoleads.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-10-02).

Converts an integer from any numeric base (2–36) to any other base with arbitrary precision, returning the result, decimal value, bit length, and digit count.

## Facts

- Endpoint: GET https://api.duoleads.com/v1/num/radix?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/duo-data-utilities-radix-base-converter-453c73bd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jVpJMwvaeI9JQni6hP24g

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 duo-data-utilities-radix-base-converter-453c73bd
```

Example prompt: Convert the hex number 0xDEADBEEF to binary for me, showing the result in uppercase digits.

## When to prefer this

Choose this endpoint when you need exact, arbitrary-precision base conversion beyond JavaScript's 2^53 integer limit, support for any base from 2 to 36, prefix auto-detection (0x, 0b, 0o), and validated digit checking. Prefer it over client-side parseInt/toString when dealing with large integers, cryptographic values, or when you need bit-length metadata alongside the conversion result.

## Known failure modes

- Invalid digit for the specified source base — returns an error indicating which character failed validation
- Source or target base out of range (must be 2–36) — returns a validation error
- Value string exceeds maximum length of 1024 characters
- Unrecognized prefix when using auto-detect mode — returns a parsing error
- Missing required `value` query parameter — returns a 400-level error

## How this service works

Convert an integer between any two numeric bases from 2 to 36, with arbitrary precision so values far beyond 2^53 are exact. Accepts an optional sign and common prefixes (0x, 0b, 0o), validates every digit against the source base, and returns the value in the target base, in decimal, and as its bit length and digit count.

## Output

A JSON object containing: the converted value in the target base (`result`), the decimal representation (`decimal`), the source base (`from`), the target base (`to`), bit length (`bit_length`), digit count (`digits`), whether the value is negative (`negative`), and an `exact` flag confirming arbitrary-precision accuracy. Also includes metadata: request ID, computation timestamp, price, and a disclaimer.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "value"
     ],
     "properties": {
      "to": {
       "type": "string",
       "default": "10",
       "pattern": "^[+-]?\\d+$",
       "maxLength": 64,
       "description": "Target base 2-36, default 10."
      },
      "case": {
       "enum": [
        "lower",
        "upper"
       ],
       "type": "string",
       "default": "lower",
       "maxLength": 64,
       "description": "Digit case for bases above 10: lower (default) or upper."
      },
      "from": {
       "type": "string",
       "default": "auto",
       "maxLength": 8,
       "description": "Source base 2-36, or auto (default) to read a 0x/0b/0o prefix."
      },
      "value": {
       "type": "string",
       "maxLength": 1024,
       "description": "Integer to convert; optional sign and 0x/0b/0o prefix."
      },
      "prefix": {
       "enum": [
        "true",
        "false"
       ],
       "type": "string",
       "default": "false",
       "maxLength": 64,
       "description": "Emit 0x/0b/0o where conventional. Default false."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "ok",
      "route",
      "version",
      "data",
      "meta"
     ],
     "properties": {
      "ok": {
       "const": true
      },
      "data": {
       "type": "object",
       "required": [
        "result",
        "decimal",
        "from",
        "to",
        "negative",
        "digits",
        "bit_length",
        "exact"
       ],
       "properties": {
        "to": {
         "type": "integer"
        },
        "from": {
         "type": "integer"
        },
        "exact": {
         "type": "boolean"
        },
        "digits": {
         "type": "integer"
        },
        "result": {
         "type": "string"
        },
        "decimal": {
         "type": "string"
        },
        "negative": {
         "type": "boolean"
  
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "data": {
   "to": 10,
   "from": 16,
   "exact": true,
   "digits": 10,
   "result": "3735928559",
   "decimal": "3735928559",
   "negative": false,
   "bit_length": 32
  },
  "meta": {
   "price_usd": "0.05",
   "disclaimer": "Factual output of a deterministic computation over public data. Provided as is, with no warranty of accuracy, completeness or availability. Not investment, financial, legal, tax, medical or any other professional advice, and not a recommendation. Verify before relying on it. Terms: https://api.duoleads.com/terms",
   "request_id": "01K6B7Q4ZC8H3F2M9WXR5TYN0D",
   "computed_at": "2026-09-28T12:00:00.000Z",
   "deterministic": true
  },
  "route": "/v1/num/radix",
  "version": "1.0.0"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/duo-data-utilities-radix-base-converter-453c73bd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.duoleads.com](https://www.zero.xyz/host/api.duoleads.com/llms.txt)
