# Preflight Bitcoin Transaction Input Context

> Preflight Bitcoin Transaction Input Context is a paid API for AI agents from preflight402.com, paid per call via x402, $0.1/call, status unknown (last checked 2026-10-02).

Looks up chain context for Bitcoin transaction inputs — checking if each prevout exists, is spent, its value in satoshis, and its confirmation count — before signing.

## Facts

- Endpoint: POST https://preflight402.com/v1/btc/tx-context?utm_source=zero.xyz
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/preflight-bitcoin-transaction-input-context-16d34a7a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_S7nzAxsjWk0ApBKvqdyab

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 preflight-bitcoin-transaction-input-context-16d34a7a -d '<json body>'
```

Example prompt: Before I sign this Bitcoin transaction, check the chain context for these two inputs on mainnet: txid a3f1...bc12 vout 0, and txid 9e44...7f01 vout 2 — are they unspent, what are their values in sats, and how many confirmations do they have?

## When to prefer this

Use this endpoint when an AI agent or wallet needs to verify Bitcoin UTXO chain state before signing a transaction — specifically when you need existence, spent status, satoshi value, and confirmations for up to 10 inputs in one call. Prefer this over manual explorer queries when you want structured, machine-readable results with source attribution. Note it only advises on on-chain facts and never recommends whether to sign.

## Known failure modes

- Invalid txid format (not 64 lowercase hex characters) returns a validation error
- vout index out of range (above 100000) is rejected
- Prevout not found on the specified network returns a not-found status rather than an error
- Rate limiting from the underlying public explorer may cause timeouts for full 10-input batches (>20 seconds)
- Network mismatch (checking testnet txid against mainnet) returns not-found
- More than 10 inputs in a single request is rejected

## How this service works

Call before signing a Bitcoin transaction when you need chain context for its inputs: whether each prevout exists, whether it is already spent, its value in sats and its confirmations. Resolves up to 10 inputs against a public explorer at about one request per second, so a full batch can take over 20 seconds; figures reflect chain state at checked_at. Describes on-chain facts with source links; never advises whether to sign.

## Output

Returns per-input chain facts: whether each prevout exists on-chain, whether it is already spent, its value in satoshis, and its confirmation count, along with a checked_at timestamp and source explorer links. Covers up to 10 inputs per call; results reflect chain state at the moment of the check.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "inputs": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "txid",
     "vout"
    ],
    "properties": {
     "txid": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
     },
     "vout": {
      "type": "integer",
      "maximum": 100000,
      "minimum": 0
     }
    },
    "additionalProperties": false
   },
   "maxItems": 10,
   "minItems": 1
  },
  "network": {
   "enum": [
    "mainnet",
    "testnet"
   ],
   "type": "string",
   "default": "mainnet"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/preflight-bitcoin-transaction-input-context-16d34a7a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from preflight402.com](https://www.zero.xyz/host/preflight402.com/llms.txt)
