# btc-tx

> btc-tx is a paid API for AI agents from payai.agentstools.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Fetches and decodes a Bitcoin transaction by its transaction ID, returning inputs, outputs, fee, size metrics, RBF flag, and confirmation status.

## Facts

- Endpoint: GET https://payai.agentstools.dev/btc/tx
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/btc-tx-9eeb7e61
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zh9oQphpM2ZCSUHobtkNI

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-9eeb7e61
```

Example prompt: Can you look up Bitcoin transaction a1b2c3d4e5f6...0000 for me and tell me how many confirmations it has, what fee was paid, and whether replace-by-fee is set?

## When to prefer this

Use this endpoint when you need decoded, human-readable Bitcoin transaction details — inputs, outputs, fee, size metrics, RBF flag, and confirmation count — from a single txid lookup. Prefer this over raw node queries when you need a structured JSON response without running your own Bitcoin node. It is ideal for agents verifying payments, auditing fees, or monitoring confirmation status.

## Known failure modes

- Invalid or malformed txid (not 64 hex characters) returns a 400-level error
- Transaction not found on the network returns a 404 or empty result
- Unconfirmed mempool transactions may have 0 confirmations and incomplete fee data
- Network or node connectivity issues may cause timeouts
- Payment not included or declined returns a 402 Payment Required

## How this service works

Decoded Bitcoin transaction by txid: inputs and outputs, fee, size, weight and virtual size, replace-by-fee flag, and confirmation status with a confirmation count. Informational, not advice.

## Output

Returns a decoded Bitcoin transaction object including: list of inputs (with previous txid references and amounts), list of outputs (addresses and amounts), total fee in satoshis, raw byte size, weight units, virtual size (vBytes), replace-by-fee (RBF) boolean flag, confirmation count, and confirmation status (confirmed/unconfirmed).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "txid"
     ],
     "properties": {
      "txid": {
       "type": "string",
       "description": "Bitcoin transaction id (64 hex characters)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/btc-tx-9eeb7e61/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from payai.agentstools.dev](https://www.zero.xyz/host/payai.agentstools.dev/llms.txt)
