# BTC Tx Toolkit – PSBT Analyzer

> BTC Tx Toolkit – PSBT Analyzer is a paid API for AI agents from btc-tx-toolkit.stackstats.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-12).

Decodes and analyzes a Bitcoin PSBT (Partially Signed Bitcoin Transaction) to return fee, feerate, vsize, change outputs, RBF signaling, dust detection, and warnings — without broadcasting or storing anything.

## Facts

- Endpoint: POST https://btc-tx-toolkit.stackstats.workers.dev/psbt/analyze?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/btc-tx-toolkit-psbt-analyzer-8d63c8e0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_socqXC6YzSoUQLNzLjz0F

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability btc-tx-toolkit-psbt-analyzer-8d63c8e0 -d '<json body>'
```

Example prompt: Can you analyze this PSBT for me — base64 encoded — on mainnet, and tell me the fee, feerate, vsize, and whether RBF is signaled, without broadcasting it? Here's the PSBT: cHNidP8BAH...

## When to prefer this

Use this endpoint when you need a read-only, privacy-preserving analysis of a PSBT before signing or broadcasting — especially when fee sanity checking, dust detection, RBF verification, or change output inspection is needed. Prefer it over full-node RPC calls when you don't control a node, or over explorers when the transaction hasn't been broadcast yet and must remain private. Ideal for wallet UIs, signing flows, and agent-driven transaction review pipelines.

## Known failure modes

- Invalid or malformed PSBT string returns an error with ok:false
- Unsupported network value causes a validation error
- Very large PSBTs may exceed payload limits
- Missing psbt field in request body returns a 400-level error
- Malformed base64 or hex encoding causes a parse failure

## How this service works

Bitcoin transaction decoder, PSBT analyzer and address validator API. Pay-per-call in USDC via x402. Read-only: nothing is broadcast, logged or stored.

## Output

Returns a JSON object with: ok (boolean), vsize (virtual transaction size in bytes), fee_sat (total fee in satoshis), feerate_sat_vb (fee rate in sat/vbyte), change object (output indices, count, and total value in satoshis), rbf_signaled (boolean), dust_outputs (array of outputs below dust threshold), and warnings (array of human-readable alert strings).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "psbt": {
   "type": "string",
   "description": "PSBT, base64 or hex"
  },
  "network": {
   "enum": [
    "mainnet",
    "testnet",
    "regtest"
   ],
   "type": "string",
   "default": "mainnet"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "vsize": 141,
  "change": {
   "count": 1,
   "outputs": [
    1
   ],
   "value_sat": 50000
  },
  "fee_sat": 1410,
  "warnings": [],
  "dust_outputs": [],
  "rbf_signaled": true,
  "feerate_sat_vb": 10
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/btc-tx-toolkit-psbt-analyzer-8d63c8e0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from btc-tx-toolkit.stackstats.workers.dev](https://www.zero.xyz/host/btc-tx-toolkit.stackstats.workers.dev/llms.txt)
