{"uid":"cap__FtSAqVFvRYYtdMHK_l9B","slug":"character-encoding-detector-6c200d4c","name":"Character Encoding Detector","description":"Guess the character set of a base64-encoded byte buffer: sniffs a byte-order mark, then falls back to ASCII / UTF-8 validation and a UTF-16 NUL-pattern heuristic. Returns a best-effort charset with a confidence label — a low-confidence guess is still a successful 200.","url":"https://encoding.openverbs.com/v1/detect","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["bytes"],"properties":{"bytes":{"type":"string","description":"Base64-encoded bytes to inspect."}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false}}},"responseSchema":null,"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_BVHpVmdoJjwVmjrYECm6L","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":"Detects the character encoding of raw bytes submitted as a base64-encoded payload","exampleAgentPrompt":"I have some raw bytes from a text file I received and I'm not sure what character encoding it uses — can you detect the encoding? Here are the bytes base64-encoded: SGVsbG8gV29ybGQ=","exampleUseCases":[{"title":"Unknown legacy file charset detection","prompt":"I just received a legacy CSV file from a partner and the text looks garbled — can you figure out what character encoding it's using? Here are the file bytes as base64: dGVzdCBkYXRh"},{"title":"Validate encoding before database insert","prompt":"Before I insert this user-submitted text into our database, can you detect its character encoding from these base64 bytes so I know whether I need to transcode it to UTF-8 first? Bytes: 6K+V5Zut5paH54mI"},{"title":"Debug garbled API response body","prompt":"I'm getting garbled text back from a third-party API — can you analyze the raw response bytes and tell me what character encoding they appear to be in? Here's the body as base64: w6TDtsO8"}],"resultDescription":"Returns the detected character encoding (e.g. UTF-8, ISO-8859-1, Windows-1252) of the submitted bytes, likely with a confidence score or probability indicator, enabling the caller to correctly decode or transcode the data.","failureModes":["Missing or invalid base64 in 'bytes' field returns a validation error","Ambiguous or too-short byte sequences may result in low-confidence or incorrect detection","Non-base64 characters in the bytes field cause a parse error","Empty byte array may return an error or null encoding result"],"whenToPreferThis":"Use this endpoint when you have raw bytes of unknown provenance and need to programmatically determine their character encoding before decoding, displaying, or storing the content. Prefer this over manual heuristics when processing files from external partners, legacy systems, or user uploads where the charset is not declared.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:41:22.452Z","isFirstParty":false}