# Machine Preflight API

> Machine Preflight API is a paid API for AI agents from preflight.natio.re, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-11).

Simulates and inspects an unsigned Base (chain ID 8453) transaction for token approvals, privileged selectors, reverts, and smart contract anomalies before signing.

## Facts

- Endpoint: POST https://preflight.natio.re/v1/preflight/transaction?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/machine-preflight-api-b4b69089
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__mCMBNkyx0aqLocVdvHfy

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 machine-preflight-api-b4b69089 -d '<json body>'
```

Example prompt: Before I sign this transaction, can you run a preflight safety check on it? The target is 0xAbCd...1234, my wallet address is 0xDeFg...5678, the calldata is 0xa9059cbb000000..., and the value is 0 wei on Base mainnet — I want to know if there are any unlimited approvals, dangerous selectors, or reverts.

## When to prefer this

Use this endpoint when you need to pre-screen an unsigned Base transaction for security risks before presenting it to a user for signing — especially for DeFi interactions involving token approvals, contract calls with complex calldata, or interactions with unknown or unaudited contracts. It is uniquely suited for wallets, agent-driven transaction flows, and security tooling that must catch unlimited approvals, dangerous privileged selectors, or likely reverts before gas is spent.

## Known failure modes

- Invalid Ethereum address format for 'to' or 'from' returns a validation error
- Non-Base chain ID (anything other than 8453) is rejected in v1
- Malformed or odd-length hex calldata returns a pattern validation error
- Simulated call reverts on-chain resulting in a revert finding in the report
- Oversized calldata exceeding 131074 hex characters rejected
- Network or RPC errors may cause simulation failure with a 5xx response

## How this service works

Read-only preflight analysis for unsigned Base transactions. Technical signal only; no signing, broadcasting or investment advice.

## Output

Returns a JSON report containing a risk level (e.g. 'critical'), a numeric risk score, and an array of findings — each with a code, title, and severity — plus chain metadata (id: 8453, name: 'Base') and a report version string.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "to": {
   "type": "string",
   "pattern": "^0x[0-9a-fA-F]{40}$",
   "description": "Target address of the unsigned transaction."
  },
  "data": {
   "type": "string",
   "default": "0x",
   "pattern": "^0x(?:[0-9a-fA-F]{2})*$",
   "maxLength": 131074,
   "description": "Hex-encoded calldata, including the four-byte selector."
  },
  "from": {
   "type": "string",
   "pattern": "^0x[0-9a-fA-F]{40}$",
   "description": "Required signing address used as the EVM caller for eth_call and gas estimation."
  },
  "chainId": {
   "enum": [
    8453
   ],
   "type": "integer",
   "default": 8453,
   "description": "Base mainnet chain ID. Only Base is accepted in v1."
  },
  "valueWei": {
   "type": "string",
   "default": "0",
   "pattern": "^(?:0|[1-9][0-9]*|0x[0-9a-fA-F]+)$",
   "description": "Native value in wei, encoded as an unsigned decimal or hex string."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "risk": {
   "level": "critical",
   "score": 60,
   "findings": [
    {
     "code": "UNLIMITED_TOKEN_APPROVAL",
     "title": "Effectively unlimited token approval",
     "severity": "critical"
    }
   ]
  },
  "chain": {
   "id": 8453,
   "name": "Base"
  },
  "reportVersion": "1.0"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/machine-preflight-api-b4b69089/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from preflight.natio.re](https://www.zero.xyz/host/preflight.natio.re/llms.txt)
