Skip to content
GET /v1/meta

Spec

Try it live

10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.

Custom headers (optional)
api.oanor.com/numrep-api

It works. Grab an API key and use it in your project.

Get an API key

Code snippets

curl "https://api.oanor.com/numrep-api/v1/meta" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/numrep-api/v1/meta", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/numrep-api/v1/meta");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/numrep-api/v1/meta",
    headers={"x-oanor-key": "oanor_test_..."}
)

Example response

A real response from this endpoint, captured by the latest health check.

{
    "data": {
        "name": "Number Representations API",
        "notes": "Gray/balanced-ternary/factoradic are exact via big integers. A real value's continued fraction is approximate with a bounded number of terms. Nothing is stored.",
        "version": "v1",
        "endpoints": [
            {
                "path": "/v1/graycode",
                "params": {
                    "n": "a non-negative integer to encode",
                    "gray": "or a Gray-code binary string to decode"
                },
                "returns": "the Gray code and the plain binary/decimal"
            },
            {
                "path": "/v1/balanced-ternary",
                "params": {
                    "n": "an integer to encode",
                    "bt": "or a balanced-ternary string (1,0,T) to decode"
                },
                "returns": "the balanced-ternary form (T = -1)"
            },
            {
                "path": "/v1/factoradic",
                "params": {
                    "n": "a non-negative integer to encode",
                    "factoradic": "or a factoradic digit string to decode"
                },
                "returns": "the factorial-base form"
            },
            {
                "path": "/v1/continued-fraction",
                "params": {
                    "terms": "[a0,a1,...] to rebuild",
                    "value": "a real number",
                    "fraction": "p/q",
                    "numerator": "& denominator"
                },
                "returns": "the continued-fraction terms and convergents"
            },
            {
                "path": "/v1/meta",
                "params": [],
                "returns": "this document"
            }
        ],
        "description": "Convert integers and numbers into the special number representations that ordinary base conversion leaves out — and back again. The graycode endpoint converts between an integer and its reflected binary Gray code (where consecutive values differ by exactly one bit — used in rotary encoders, Karnaugh maps and error reduction). The balanced-ternary endpoint converts between an integer and balanced ternary, the base-3 system with digits −1, 0 and +1 (written T, 0, 1) that needs no separate sign. The factoradic endpoint converts between an integer and the factorial number system (mixed radix 1,2,3,…), the basis of permutation ranking and Lehmer codes. The continued-fraction endpoint turns a fraction or a real number into its continued-fraction expansion [a0; a1, a2, …] and lists the convergents — the best rational approximations — and can rebuild the value from the terms. All integer maths is exact via big integers. Everything is computed locally and deterministically, so it is instant and private. Ideal for computer-science teaching, combinatorics and permutation ranking, error-correcting and encoder design, rational approximation, and recreational maths. Pure local computation — no key, no thir
…