# FHI x402 Package Install Preflight Check

> FHI x402 Package Install Preflight Check is a paid API for AI agents from polished-truth-c514.fhi-llc-1118.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-12).

Checks whether a package installation is safe or advisable before installing, returning preflight validation data for npm or PyPI packages.

## Facts

- Endpoint: POST https://polished-truth-c514.fhi-llc-1118.workers.dev/api/v1/package-install-preflight?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fhi-x402-package-install-preflight-check-b951bbe3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QKKJ8P8eab-g2nzeoIJzo

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 fhi-x402-package-install-preflight-check-b951bbe3 -d '<json body>'
```

Example prompt: Before I install it, can you run a preflight check on the npm package 'lodash' version '4.17.21' to make sure it's safe and ready to use?

## When to prefer this

Use this endpoint when an AI agent or automated pipeline needs to vet a package before installing it, especially in autonomous or CI/CD workflows where a human isn't reviewing dependencies manually. Prefer this over manual registry lookups when you need a structured, pay-per-use preflight signal for npm or PyPI packages without standing up your own security scanning infrastructure.

## Known failure modes

- Package name not found in the specified ecosystem — returns error or empty result
- Invalid ecosystem value (anything other than 'npm' or 'PyPI') — schema validation error
- Missing required fields (name or ecosystem) — 400 bad request
- Payment failure via x402 protocol — 402 Payment Required before result is returned
- Network timeout on Cloudflare Worker edge — transient 5xx error
- Version string does not exist for the package — may return not-found or latest fallback

## How this service works

Stateful remote-MCP change evidence, payable per call with x402 Base USDC.

## Output

Returns preflight validation data about the specified package, including signals about whether the package is safe or advisable to install, potential issues, and relevant package metadata for the requested name, version, and ecosystem.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "name": {
   "type": "string",
   "minLength": 1
  },
  "version": {
   "type": "string"
  },
  "ecosystem": {
   "enum": [
    "npm",
    "PyPI"
   ],
   "type": "string"
  },
  "expectedName": {
   "type": "string",
   "minLength": 1
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "action": "block",
  "package": {
   "name": "lodahs",
   "exists": false,
   "ecosystem": "npm"
  },
  "riskSignals": [
   "package_not_found",
   "near_expected_name"
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fhi-x402-package-install-preflight-check-b951bbe3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from polished-truth-c514.fhi-llc-1118.workers.dev](https://www.zero.xyz/host/polished-truth-c514.fhi-llc-1118.workers.dev/llms.txt)
