{"uid":"cap_jsTwoYvtBOBXFOJkA3pbl","slug":"shannon-entropy-calculator-1b680d85","name":"Shannon Entropy Calculator","description":"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.","url":"https://api.gadgethumans.com/entropy?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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}}}}},"responseSchema":{"type":"json","example":{"ok":true}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_DRDMYm8q2BECquE4exXR3","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes Shannon entropy of a text string in bits per character and total bits, plus an estimated brute-force search space size.","exampleAgentPrompt":"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?","exampleUseCases":[{"title":"Password randomness validation before storage","prompt":"Before I store this new user password 'correct-horse-battery-staple', can you compute its Shannon entropy in bits per character and total bits so I can tell if it's random enough?"},{"title":"API key quality check in CI pipeline","prompt":"Check the entropy of this generated API key 'a3f8c1b2d4e5f6a7b8c9d0e1f2a3b4c5' — give me the bits per character and total bits so I know if our key generator is producing sufficiently random values."},{"title":"Comparing two secrets for randomness","prompt":"I have two candidate secrets: 'aaaaaaaaaa' and 'G7#kP!2mQx' — can you compute the Shannon entropy for each one so I can see which is more random?"}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-17T00:36:34.049Z","isFirstParty":false,"canonicalSlug":"shannon-entropy-calculator-1b680d85"}