{"uid":"cap_AbGERU3bHytROVCFEyLRa","slug":"textkit-shannon-entropy-b047a18e","name":"TextKit Shannon Entropy","description":"General-purpose text, Unicode and date utilities for AI agents: homoglyph folding and spoofed-domain detection, Unicode script detection, NFC/NFD normalization, grapheme counting, date description (weekday, ISO week, quarter, leap year), business-day counting, slugify, FNV-1a hashing, Shannon entropy, string format detection (uuid, email, url, ipv4, jwt, iban), byte-encoding detection and human-readable byte sizes. Pay per request in USDC on Base via x402 - no signup, no API key, no KYC.","url":"https://textkit.johnaio281.workers.dev/api/tk/entropy?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["text"],"properties":{"text":{"type":"string"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"length":8,"entropy":3,"bitsPerChar":3,"distinctChars":8}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_glcsyeFPO_AgEjmV4BwkF","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","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, returning total entropy in bits, bits-per-character, length, and distinct character count","exampleAgentPrompt":"What's the Shannon entropy of the string 'P@ssw0rd123!'? I want to know total bits, bits per character, and how many distinct characters it has.","exampleUseCases":[{"title":"Password strength entropy check","prompt":"Can you calculate the Shannon entropy of the password 'Tr0ub4dor&3' so I know how random it really is?"},{"title":"Detecting low-entropy filler text","prompt":"I have this placeholder string 'aaabbbccc' — what's its Shannon entropy and bits per character? I want to confirm it's low-entropy before flagging it."},{"title":"Comparing token randomness","prompt":"Compute the entropy for this API token 'xK9mP2qL7nR4sT1v' and tell me how many distinct characters it uses and how many bits of entropy it has total."}],"resultDescription":"A JSON object with four fields: `length` (number of characters in the input), `entropy` (total Shannon entropy in bits), `bitsPerChar` (entropy divided by length), and `distinctChars` (number of unique characters). Example: {\"length\":8,\"entropy\":3,\"bitsPerChar\":3,\"distinctChars\":8}.","failureModes":["Missing required `text` query parameter returns an error","Empty string may return zero entropy or an error","Very long strings may hit request size limits","Network or worker timeout on extremely large inputs"],"whenToPreferThis":"Use this endpoint when you need a quick, pay-per-use Shannon entropy calculation for a single text string without setting up any infrastructure or API keys. Ideal for security audits, password quality checks, anomaly detection pipelines, or any agent workflow that needs to quantify information randomness on the fly. Prefer this over building your own entropy function when operating in a serverless or agent-orchestration context that already uses x402/USDC micropayments.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:30:17.700Z","isFirstParty":false,"canonicalSlug":"textkit-shannon-entropy-b047a18e"}