Aller au contenu
GET /v1/meta

Spec

Essayez-le en direct

10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.

En-têtes personnalisés (facultatif)
api.oanor.com/bitwise-api

Ça marche. Récupérez une clé API et utilisez-la dans votre projet.

Obtenez une clé API

Extraits de code

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_..."}
)

Exemple de réponse

Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.

{
    "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
}