# Shannon Entropy Calculator

> Shannon Entropy Calculator is a paid API for AI agents from api.gadgethumans.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-11-17).

Computes Shannon entropy of a text string in bits per character and total bits, plus an estimated brute-force search space size.

## Facts

- Endpoint: GET https://api.gadgethumans.com/entropy?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/shannon-entropy-calculator-1b680d85
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jsTwoYvtBOBXFOJkA3pbl

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 shannon-entropy-calculator-1b680d85
```

Example prompt: Can you measure the Shannon entropy of the string 'xK9#mP2!qLz7' and tell me how many bits per character and total bits it has, so I can judge whether it's random enough to use as a secret key?

## When to prefer this

Use this endpoint when you need a fast, server-side Shannon entropy calculation without writing your own information-theory code — especially for evaluating password, key, or secret randomness. Ideal for lightweight security checks in CI pipelines, secret validation workflows, or any agent that needs to programmatically assess string randomness in real time with no ML overhead.

## Known failure modes

- Missing required 'text' query parameter returns an error
- Empty string may return zero entropy or an error
- Extremely long strings may hit query string length limits
- Non-UTF-8 characters could cause parsing issues

## How this service works

Compute Shannon entropy of a string in bits per character and total bits, with an estimated brute-force space. Pure CPU, instant. Use to judge secret or key randomness.

## Output

A JSON response containing the Shannon entropy of the input text expressed as bits per character, the total bits for the full string, and an estimated brute-force search space size indicating how hard the string would be to guess.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "queryParams": {
     "type": "object",
     "required": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "Text to measure"
      }
     }
    }
   }
  },
  "output": {
   "type": "object",
   "properties": {
    "example": {
     "ok": true
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/shannon-entropy-calculator-1b680d85/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.gadgethumans.com](https://www.zero.xyz/host/api.gadgethumans.com/llms.txt)
