{"openapi":"3.1.0","info":{"title":"Entropy API","version":"1.0.0","description":"Measure the information content of text. The analyze endpoint computes the Shannon entropy in bits per symbol, the total information in bits and bytes, the maximum possible entropy for the alphabet that was actually used, and a normalized 0–1 score that says how uniform (random-looking) the distribution is — over Unicode code points or raw UTF-8 bytes. The frequency endpoint returns the full character-frequency distribution, most common symbol first, with counts and percentages, showing control characters escaped and bytes as hex. It is exact, deterministic and runs entirely locally with no network calls, so it is instant and private. Ideal for randomness and password-quality checks, estimating how compressible data is, language and classical-cipher analysis, spotting low-variety or repetitive input, and feature extraction for text classification. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This measures information content; for password-strength scoring use a password API, for number statistics use a statistics API, and for grapheme/character counts use a text-segmentation API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/entropy-api","description":"oanor gateway"}],"tags":[{"name":"Entropy"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/analyze":{"get":{"operationId":"get_v1_analyze","tags":["Entropy"],"summary":"Shannon entropy","description":"","parameters":[{"name":"text","in":"query","required":true,"description":"The text","schema":{"type":"string"},"example":"Tr0ub4dor&3"},{"name":"unit","in":"query","required":false,"description":"char (default) or byte","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"unit":"char","length":11,"normalized":0.98666,"total_bits":36.053748,"total_bytes":4.506718,"unique_symbols":10,"max_entropy_bits":3.321928,"entropy_bits_per_symbol":3.277613},"meta":{"timestamp":"2026-06-03T17:42:21.424Z","request_id":"215cabc7-0f0e-4048-99fe-2b6b5235de7d"},"status":"ok","message":"Shannon entropy","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/frequency":{"get":{"operationId":"get_v1_frequency","tags":["Entropy"],"summary":"Symbol frequency","description":"","parameters":[{"name":"text","in":"query","required":true,"description":"The text","schema":{"type":"string"},"example":"hello world"},{"name":"unit","in":"query","required":false,"description":"char (default) or byte","schema":{"type":"string"}},{"name":"top","in":"query","required":false,"description":"Keep only the N most frequent","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"unit":"char","length":11,"frequencies":[{"count":3,"symbol":"l","percent":27.272727,"codepoint":108},{"count":2,"symbol":"o","percent":18.181818,"codepoint":111},{"count":1,"symbol":"h","percent":9.090909,"codepoint":104},{"count":1,"symbol":"e","percent":9.090909,"codepoint":101},{"count":1,"symbol":" ","percent":9.090909,"codepoint":32},{"count":1,"symbol":"w","percent":9.090909,"codepoint":119},{"count":1,"symbol":"r","percent":9.090909,"codepoint":114},{"count":1,"symbol":"d","percent":9.090909,"codepoint":100}],"unique_symbols":8},"meta":{"timestamp":"2026-06-03T17:42:21.536Z","request_id":"71f65bd7-014d-481a-b730-d7576dd629b2"},"status":"ok","message":"Symbol frequency","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"name":"Entropy API","notes":"Shannon entropy H = −Σ p·log2(p) over symbol probabilities; total bits = H × length. Normalized = H ÷ log2(unique symbols). This measures information content — for password strength use a password API, for number statistics use a statistics API, and for grapheme/character counts use a text-segmentation API. Nothing is stored.","version":"v1","endpoints":[{"path":"/v1/analyze","params":{"text":"the text (required)","unit":"char (Unicode code points, default) or byte"},"returns":"Shannon entropy, total bits/bytes, max entropy and normalized score"},{"path":"/v1/frequency","params":{"top":"keep only the N most frequent symbols (default all)","text":"the text (required)","unit":"char (default) or byte"},"returns":"the symbol-frequency distribution"},{"path":"/v1/meta","params":[],"returns":"this document"}],"description":"Measure the information content of text. The analyze endpoint computes the Shannon entropy in bits per symbol, the total information in bits and bytes, the maximum possible entropy for the alphabet used, and a normalized 0–1 score (how uniform/random the distribution is) — over Unicode code points or raw UTF-8 bytes. The frequency endpoint returns the full character-frequency distribution, most common first, with counts and percentages (control characters are shown escaped, bytes as hex). Useful for randomness and password-quality checks, compression estimates, language and cipher analysis, and detecting low-variety or repetitive data. Pure local, no key."},"meta":{"timestamp":"2026-06-03T17:42:21.645Z","request_id":"0b50f57c-7482-4ec5-ac01-76f088f139cb"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":4335,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":585,"monthly_call_quota":13850,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2575,"monthly_call_quota":189500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6375,"monthly_call_quota":990000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/entropy-api"}