Vai al contenuto
GET /v1/meta

Spec

Provalo dal vivo

10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.

Intestazioni personalizzate (facoltative)
api.oanor.com/bitwise-api

Funziona. Prendi una chiave API e usala nel tuo progetto.

Ottieni una chiave API

Frammenti di codice

curl "https://api.oanor.com/bitwise-api/v1/meta" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/bitwise-api/v1/meta", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/bitwise-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/bitwise-api/v1/meta",
    headers={"x-oanor-key": "oanor_test_..."}
)

Risposta di esempio

Una risposta reale di questo endpoint, acquisita dall'ultimo health check.

{
    "data": {
        "name": "Bitwise API",
        "notes": "All operations are masked to the chosen width; negative inputs are folded by two's complement. shr is logical, sar is arithmetic. Nothing is stored.",
        "version": "v1",
        "endpoints": [
            {
                "path": "/v1/inspect",
                "params": {
                    "value": "an integer (dec, 0x, 0b, 0o)",
                    "width": "8|16|32|64 (default 32)"
                },
                "returns": "representations, popcount, parity, zero counts, reversed and byte-swapped"
            },
            {
                "path": "/v1/ops",
                "params": {
                    "a": "operand",
                    "b": "second operand (or shift/rotate amount)",
                    "op": "and|or|xor|nand|nor|xnor|not|shl|shr|sar|rol|ror",
                    "width": "8|16|32|64"
                },
                "returns": "the result in all representations"
            },
            {
                "path": "/v1/bit",
                "params": {
                    "index": "bit index 0..width-1",
                    "value": "an integer",
                    "width": "8|16|32|64",
                    "action": "set|clear|toggle|test"
                },
                "returns": "the bit value and the resulting integer"
            },
            {
                "path": "/v1/meta",
                "params": [],
                "returns": "this document"
            }
        ],
        "description": "Bit-level integer maths as an API, at 8-, 16-, 32- or 64-bit width with exact big-integer arithmetic. The inspect endpoint takes a number (decimal, 0x hex, 0b binary or 0o octal) and returns its decimal, signed (two's-complement), hex, binary and octal forms, plus the population count (Hamming weight), parity, leading and trailing zero counts, whether it is a power of two, its bit-reversed value and its byte-swapped (endianness) value. The ops endpoint performs a bitwise operation — AND, OR, XOR, NAND, NOR, XNOR, NOT, logical and arithmetic shifts (shl, shr, sar) and rotations (rol, ror) — masked to the chosen width. The bit endpoint sets, clears, toggles or tests an individual bit by index. Everything is computed locally and deterministically, so it is instant and private. Ideal for embedded and systems programming, protocol and flag handling, graphics and hashing, emulators, and teaching binary. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 4 endpoints. This is bit manipulation; for base 2-36 conversion use a base-convert API and for IEEE-754 float bits use a floating-point API."
    },
    "meta": {
        "timestamp": "2026-06-03T17:42:10.343Z",
        "request_id": "7be96532-132b-4a45-9f02-db4a6dff5216"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}