{"uid":"cap_LTxqtDXyXi-mpBDZcRMjf","slug":"api-24klabs-ai-base-encode-decode-75746b1c","name":"api.24klabs.ai Base Encode/Decode","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/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_LmWjFc28eJFt8ufa3Z3KX","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":"Encode the string 'Hello, World!' to base64url format using the 24K Labs base encoder.","exampleUseCases":[{"title":"Base64-encode auth credentials","prompt":"Encode the string 'myuser:mysecretpassword' to base64 so I can use it in a Basic Auth header."},{"title":"Decode a percent-encoded URL","prompt":"I have this URL-encoded string '%48%65%6C%6C%6F%20%57%6F%72%6C%64' — can you decode it back to plain text using URL/percent decoding?"},{"title":"Encode payload as data-URI","prompt":"Take the SVG string '<svg xmlns=\"http://www.w3.org/2000/svg\"><circle r=\"10\"/></svg>' and encode it as a data-URI so I can embed it directly in HTML."}],"resultDescription":"Returns the transformed string after applying the requested encoding or decoding operation, along with metadata indicating the scheme used and the direction (encode or decode).","failureModes":["Invalid or unsupported encoding scheme returns an error","Malformed base64/hex/base32 input during decode causes a parsing error","Empty input string may return a validation error","Attempting to decode a string that is not valid in the specified scheme returns a decode failure"],"whenToPreferThis":"Use this endpoint when you need a quick, single-call encoding or decoding operation across a wide variety of schemes (base64, base64url, base32, hex, URL/percent, HTML entities, data-URIs) without setting up local libraries. Ideal for AI agents that need to encode/decode strings on the fly as part of a larger workflow, especially in environments where native encoding libraries are unavailable or inconvenient.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:54:15.473Z","isFirstParty":false}