{"uid":"cap_6t6xZ28bPxNjuPHAY0qLt","slug":"delx-commerce-hex-canonicalize-a7713920","name":"Delx Commerce — Hex Canonicalize","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/hex-canonicalize?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"hex":{"type":"string","description":"Hex string with or without 0x; must be even-length for valid=true."},"prefer_0x":{"type":"boolean","description":"When true, canonicalize with a 0x prefix."}}},"responseSchema":{"type":"json","example":{"valid":true,"schema":"delx/util-hex-canonicalize/v1","canonical":"0xabcd","byte_length":2,"input_length":6}},"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_Gjwa66Skg7WgKxODE41Af","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":"Validates and canonicalizes a hex string, returning its normalized form with optional 0x prefix, byte length, and validity status.","exampleAgentPrompt":"Check if '0xabcd1' is a valid hex string and give me its canonical form with the 0x prefix and byte length — I want to make sure it's well-formed before passing it to a smart contract.","exampleUseCases":[{"title":"Validate hex before blockchain call","prompt":"I have this hex string 'deadbeef' — can you check if it's valid and return the canonical version with a 0x prefix before I use it in a transaction?"},{"title":"Standardize hex encoding in data pipeline","prompt":"Normalize this hex value 'ABCDEF0123' to its canonical form without a 0x prefix so I can store it consistently in my database."},{"title":"Detect malformed hex in user input","prompt":"A user submitted the hex string '0xGG12' — can you tell me if it's actually a valid hex value, and if so, what its canonical form and byte length are?"}],"resultDescription":"Returns a JSON object indicating whether the hex string is valid (boolean), the canonical hex string in the requested prefix style, the byte length of the encoded data, the input string length, and a schema version identifier (e.g. delx/util-hex-canonicalize/v1).","failureModes":["Odd-length hex (after stripping 0x) results in valid=false with no canonical form","Non-hex characters cause valid=false response","Empty input may return an error or valid=false","Malformed JSON body returns a 4xx error","Payment not included or insufficient USDC triggers 402 Payment Required"],"whenToPreferThis":"Choose this endpoint when you need a quick, authoritative, pay-per-result check that a hex string is well-formed and to retrieve its normalized representation — especially in blockchain, cryptography, or data-pipeline contexts where hex validity is a hard prerequisite. Prefer this over writing your own regex when you need a verifiable, auditable result with a defined schema version.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:48.571Z","isFirstParty":false,"canonicalSlug":"delx-commerce-hex-canonicalize-a7713920"}