{"uid":"cap_n3qEzIK--zEadl8i2R7_4","slug":"hex-encode-utf-8-string-a8ac2f02","name":"Hex Encode UTF-8 String","description":"Hex-encode a UTF-8 string","url":"https://x402render-u5vwpxpyua-uc.a.run.app/hex-encode","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"string"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_AGS3XH5LkDr6yMwabrcPB","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts a UTF-8 text string into its hexadecimal representation","exampleAgentPrompt":"Hex-encode the string 'Hello, World!' for me so I can use the hex bytes in my protocol implementation.","exampleUseCases":[{"title":"Encoding protocol message payload","prompt":"I need to encode the string 'AUTH:user123:token456' as hex bytes before inserting it into a custom binary protocol frame — can you do that?"},{"title":"Debugging binary data representation","prompt":"Can you convert the text 'ERROR: null pointer' to its hex encoding so I can compare it against what I'm seeing in my network packet capture?"},{"title":"Embedding text in hex format","prompt":"I need to store the string 'config_key=myValue' as a hex-encoded string in my database field — please hex-encode it for me."}],"resultDescription":"Returns the hexadecimal encoding of the input UTF-8 string, where each character byte is represented as a two-character hex pair (e.g. 'Hi' becomes '4869').","failureModes":["Missing or empty 'text' field returns an error response","Non-UTF-8 or malformed input may result in encoding errors","Network timeout if Cloud Run instance is cold-starting","Payment failure or insufficient USDC balance blocks the request"],"whenToPreferThis":"Use this endpoint when you need a simple, stateless hex encoding of a UTF-8 string via an API call, especially within an x402 payment-gated workflow or when you don't want to implement encoding locally. Prefer this over sibling endpoints when you specifically need hex (not Base64 or percent-encoding).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:39:25.978Z","isFirstParty":false}