{"uid":"cap_E4dkbIqui8_R1y3DjIPHk","slug":"sha-256-digest-of-text-or-raw-bytes-c8976dfc","name":"SHA-256 Digest of Text or Raw Bytes","description":"SHA-256 digest of text or raw bytes — Genesis402 / UnyKorn Operator Network","url":"https://twin.unykorn.org/hash-sha256?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"params":{"type":"object","properties":{"hex":{"type":"string","pattern":"^0x[0-9a-fA-F]*$"},"text":{"type":"string","maxLength":49152}}}}},"responseSchema":{"type":"json","example":{"ok":true,"type":"hash-sha256","receipt":{"tx_hash":"0x<64hex>","amount_usd":0.001,"receipt_id":"g402-<16hex>"},"generated_at":"<iso8601>"}},"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_WlqZ78rDczoKSfgjyZaDG","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":"Computes the SHA-256 cryptographic hash of a given text string or raw hex-encoded bytes, returning the digest.","exampleAgentPrompt":"Can you compute the SHA-256 hash of the text 'Hello, world!' for me?","exampleUseCases":[{"title":"Content integrity fingerprint","prompt":"Hash this message with SHA-256 so I can verify it hasn't been tampered with later: 'The contract terms are: payment due by June 1st.'"},{"title":"Blockchain data commitment","prompt":"I need the SHA-256 digest of this hex-encoded byte sequence so I can commit it to a smart contract: 0x48656c6c6f20626c6f636b636861696e"},{"title":"Deduplication key generation","prompt":"Give me the SHA-256 hash of the string 'user_session_12345_2024-06-01' so I can use it as a unique cache key."}],"resultDescription":"Returns a JSON object containing the SHA-256 digest of the provided input, along with a payment receipt including the transaction hash, amount in USD, and a unique receipt ID, plus a timestamp of when the hash was generated.","failureModes":["Input text exceeds 49152 character limit — request rejected","Malformed hex string (not matching ^0x[0-9a-fA-F]*$) — validation error","Neither text nor hex param provided — missing input error","Network or payment failure causing 402 payment required error","Invalid or insufficient payment — transaction not processed"],"whenToPreferThis":"Choose this endpoint when you need a simple, on-demand SHA-256 hash of a text string or raw hex bytes, especially in blockchain/Web3 contexts where payment receipts and auditability matter. Prefer this over the sibling canonical-digests endpoint when you specifically need only SHA-256 and not sha512-256 or blake2b. Ideal for agents that need to commit data to a smart contract, verify integrity, or generate deterministic content fingerprints.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T18:55:22.226Z","isFirstParty":false,"canonicalSlug":"sha-256-digest-of-text-or-raw-bytes-c8976dfc"}