{"uid":"cap_iJCnuVUynb3Fsz9Z6e2Ko","slug":"24k-labs-base64-hex-url-codec-016b50af","name":"24K Labs Base64/Hex/URL Codec","description":"Encode or decode a string across base64, base64url, hex, and URL/percent encoding.","url":"https://api.24klabs.ai/api/v1/base64-hex-codec","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"op":{"type":"string"},"input":{"type":"string"},"alphabet":{"type":"string"}}},"responseSchema":{"type":"json","example":{"result":"aGVsbG8gd29ybGQ="}},"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_Nit-2QBdosh2xvhkR559j","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 across base64, base64url, hex, and URL/percent encoding formats.","exampleAgentPrompt":"Can you base64-encode the string 'Hello, World!' for me? I need the standard base64 output, not the URL-safe variant.","exampleUseCases":[{"title":"Encode API credentials for HTTP auth","prompt":"I need to base64-encode my username and password 'myuser:s3cr3tpass' so I can use it in a Basic Auth header — can you do that?"},{"title":"Decode a hex-encoded token","prompt":"I've got this hex string '48656c6c6f' and I need to decode it back to its original plain text — what does it say?"},{"title":"URL-encode a query string for a web request","prompt":"Can you percent-encode this string so it's safe to use in a URL query parameter: 'search query with spaces & special chars=yes'?"}],"resultDescription":"Returns the transformed string in the requested encoding format — either the encoded representation of the input or the decoded plaintext, depending on the direction specified. Response includes the output string and likely reflects the target encoding type used.","failureModes":["Invalid encoding format specified — returns error indicating unsupported format","Malformed input for decode operations (e.g. invalid base64 characters) — returns decoding error","Missing required fields such as input string or direction — returns validation error","Payment failure via x402 protocol — returns 402 Payment Required","Network timeout or service unavailability — returns 5xx error"],"whenToPreferThis":"Choose this endpoint when an AI agent needs a fast, pay-per-use encoding/decoding utility without standing up local logic — especially within an x402-enabled payment workflow. It supports four encoding schemes (base64, base64url, hex, URL/percent-encoding) in a single endpoint, making it ideal when the exact encoding format may vary at runtime. Prefer it over implementing encoding locally when operating in a sandboxed or stateless agent environment.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:53:15.121Z","isFirstParty":false}