{"uid":"cap_gl1BuPd9At8x5k0Sw_9ye","slug":"bitcoin-output-script-type-identifier-b87d92a9","name":"Bitcoin Output Script Type Identifier","description":"Identify a Bitcoin output script — Genesis402 / UnyKorn Operator Network","url":"https://twin.unykorn.org/btc-script-type?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"params":{"type":"object","properties":{"hex":{"type":"string","pattern":"^0x[0-9a-fA-F]*$"}}}}},"responseSchema":{"type":"json","example":{"ok":true,"type":"btc-script-type","receipt":{"tx_hash":"0x<64hex>","amount_usd":0.002,"receipt_id":"g402-<16hex>"},"generated_at":"<iso8601>"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_l_PGfq7JLZAr3wkJcDgFf","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Identifies and classifies the type of a Bitcoin output script from its hex-encoded bytecode","exampleAgentPrompt":"What type of Bitcoin output script is this: 0x76a914c0e2dfe3cba86c06e9c8fe7f8b1c3e9a1d2f4b788ac — is it P2PKH, P2SH, P2WPKH, or something else?","exampleUseCases":[{"title":"Wallet address type detection","prompt":"I have this raw Bitcoin output script — 0x0014a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0 — can you tell me what script type it is so I know which address format it corresponds to?"},{"title":"Transaction output auditing","prompt":"I'm auditing a Bitcoin transaction and need to classify all its outputs. Start with this one: 0x5120c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1 — what script type is this?"},{"title":"Script compatibility check for exchange","prompt":"Before crediting a withdrawal, I need to verify this Bitcoin script type is one we support — the hex is 0xa914b7a8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a587 — what kind of output script is it?"}],"resultDescription":"Returns a JSON object containing a boolean `ok` field, a `type` field with the classified Bitcoin script type (e.g. P2PKH, P2SH, P2WPKH, P2WSH, P2TR), a `generated_at` ISO8601 timestamp, and a `receipt` object with the transaction hash, USD amount paid, and a unique receipt ID for the x402 micropayment.","failureModes":["Invalid hex format (not 0x-prefixed or containing non-hex characters) — validation error","Empty or malformed script bytes — classification may return unknown type","Unrecognized or non-standard script patterns — may return a generic or null type","Payment failure via x402 protocol — endpoint returns 402 before processing","Network timeout on the UnyKorn operator node"],"whenToPreferThis":"Choose this endpoint when you need to programmatically classify raw Bitcoin output scripts from their hex bytecode — for example when parsing raw transactions, auditing UTXOs, or building wallet software that must distinguish P2PKH, P2SH, P2WPKH, P2WSH, and P2TR script types. It is a pay-per-call micropayment API (x402 protocol, $0.002 USDC) suitable for agents that need on-demand script classification without running a full Bitcoin node.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T18:55:35.090Z","isFirstParty":false,"canonicalSlug":"bitcoin-output-script-type-identifier-b87d92a9"}