{"uid":"cap_dMTD8gXZMVkj8Wg6SMsFK","slug":"24k-labs-base-encoding-decoding-api-29b7982f","name":"24K Labs Base Encoding/Decoding API","description":"Encode or decode a string across base64, base64url, base32, hex, URL/percent, HTML entities, and data-URIs in one call.","url":"https://api.24klabs.ai/api/v1/base-encode","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"op":{"type":"string"},"codec":{"type":"string"},"input":{"type":"string"}}},"responseSchema":{"type":"json","example":{"result":"NBSWY3DPEB3W64TMMQ======"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_jUV63RxNRx6l3yn5gsatu","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Encodes or decodes a string using base64, base64url, base32, hex, URL/percent-encoding, HTML entities, or data-URIs in a single API call.","exampleAgentPrompt":"Can you base64-encode the string 'Hello, World!' for me using the standard base64 scheme?","exampleUseCases":[{"title":"Safe URL parameter encoding","prompt":"URL-encode this string so I can safely put it in a query parameter: 'user name=John Doe&role=admin&token=abc 123'"},{"title":"Decoding an opaque API token","prompt":"I got this base64 string back from an API response — can you decode it to see what it actually says? The string is 'SGVsbG8gV29ybGQh'"},{"title":"Embedding image as data-URI","prompt":"Encode this raw image data as a data-URI so I can embed it directly in an HTML src attribute without hosting it as a separate file."}],"resultDescription":"Returns the transformed string in the requested encoding or decoding format, along with the encoding scheme used and the direction of the operation performed.","failureModes":["Invalid encoding scheme specified — API returns an error if the scheme is not one of the supported types","Malformed input for decoding — if the input string is not valid for the specified encoding (e.g. invalid base64 characters), an error is returned","Empty input string — may return an error or empty result","Unsupported combination of encoding and direction — some schemes may only support encode or decode"],"whenToPreferThis":"Choose this endpoint when you need quick, reliable string encoding or decoding across multiple standard schemes without setting up a local library. Especially useful for agents that need to handle base64, URL-encoding, or HTML entity transformations on the fly without executing code locally. Supports a broader range of schemes (base32, base64url, hex, data-URI) in a single unified call compared to purpose-built single-format tools.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:49:36.229Z","isFirstParty":false}