{"uid":"cap_vsWNE2ws4SmPTbiqqQ6hZ","slug":"swift-bot-labs-toolbox-encode-multi-format-string-encoding-076db443","name":"Swift Bot Labs Toolbox – Encode (Multi-Format String Encoding)","description":"62 small, deterministic utility APIs (DNS and e-mail checks, web extraction, EVM decoding, x402 checks, IP math, JSON/CSV, hashing, conversions). No account or API key: pay per call in USDC with x402.","url":"https://x402-toolbox.swiftbotlab.workers.dev/v1/encode?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"to":{"enum":["utf8","hex","base64","base64url","base32","base58","url","html"],"type":"string","default":"base64"},"data":{"type":"string","maxLength":1048576},"from":{"enum":["utf8","hex","base64","base64url","base32","base58","url","html"],"type":"string","default":"utf8"}}},"responseSchema":{"type":"json","example":{"ok":true,"tool":"encode","result":{"to":"base58","from":"utf8","bytes":11,"result":"StV1DL6CwTryKyV"}}},"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_Yc2RYCS7j3oIye3Iw2QxR","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":"Converts a string between any two of eight encoding formats (utf8, hex, base64, base64url, base32, base58, url, html) deterministically, paying per call in USDC via x402.","exampleAgentPrompt":"Convert the utf8 string 'Hello, world!' to base58 encoding using the Swift Bot Labs Toolbox encode API.","exampleUseCases":[{"title":"Base64-encode a webhook payload","prompt":"Take this JSON string '{\"event\":\"purchase\",\"id\":42}' and encode it as base64 so I can embed it in an email header."},{"title":"URL-encode a query parameter","prompt":"I need to safely embed the string 'search?q=coffee & cake' as a URL query parameter — can you url-encode it for me?"},{"title":"Hex-to-base64 for Ethereum calldata","prompt":"I have this hex-encoded EVM calldata '0x4f6e65' and I need it converted to base64 so I can include it in a REST API body."}],"resultDescription":"Returns a JSON object with ok=true, the tool name ('encode'), and a result object containing the source format, target format, byte count of the input, and the encoded output string.","failureModes":["Invalid 'from' or 'to' enum value returns an error response","Input string exceeding 1 MB (1,048,576 bytes) is rejected","Malformed JSON body returns a parse error","x402 payment failure prevents the call from completing","Incompatible encoding pair (e.g. non-hex characters decoded as hex) may return a decoding error"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, deterministic, pay-per-call encoding conversion across multiple standard formats (utf8, hex, base64, base64url, base32, base58, url, html) without setting up an account or API key. It is ideal for AI agents that need occasional encoding transformations as part of a pipeline and want to pay only for what they use via USDC x402.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:39:20.012Z","isFirstParty":false,"canonicalSlug":"swift-bot-labs-toolbox-encode-multi-format-string-encoding-076db443"}