# Confirmations Needed

> Confirmations Needed is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Computes blockchain confirmations observed vs. required given a transaction block, current head block, and target confirmation count.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/confirmations-needed
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/confirmations-needed-d51b13be
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_C6T116D0bil26WLnZqPVQ

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 confirmations-needed-d51b13be -d '<json body>'
```

Example prompt: My transaction was included at block 21500000, the chain head is at block 21500012, and I need 15 confirmations — how many more do I still need before I can proceed?

## When to prefer this

Use this endpoint when you need a lightweight, deterministic, no-RPC calculation of block confirmations remaining — ideal for progress bars, deposit readiness gates, or finality checks where you already know the tx block, head block, and confirmation threshold and simply need the arithmetic resolved reliably in a structured JSON response.

## Known failure modes

- Missing required fields (target, tx_block, or head_block) result in a validation error
- head_block less than tx_block produces a negative or zero observed confirmations value
- Non-integer inputs cause schema validation failure
- Payment failure via x402 prevents execution

## How this service works

Compute confirmations remaining from head and inclusion block. Call when progress bars and readiness gates for deposit/finality logic. Returns confirmations observed vs needed as deterministic JSON for $0.001 USDC via x402 on Base. First-party local math only—no RPC, live market feed, API keys, storage, or mediagen. Advisory only; the caller owns capital, risk, and production controls.

## Output

Returns a deterministic JSON object indicating the number of confirmations observed (head_block minus tx_block) and the number still needed to reach the target, computed locally with no external RPC calls or live data.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "target": {
   "type": "integer",
   "description": "Input field: target."
  },
  "tx_block": {
   "type": "integer",
   "description": "Input field: tx block."
  },
  "head_block": {
   "type": "integer",
   "description": "Input field: head block."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "done": false,
  "schema": "delx/util-confirmations-needed/v1",
  "target": 12,
  "remaining": 6,
  "confirmations": 6
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/confirmations-needed-d51b13be/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
