# Agent Dev Preflight API – Package Risk Check

> Agent Dev Preflight API – Package Risk Check is a paid API for AI agents from agent-dev-preflight-api.bonkoturyu.workers.dev, paid per call via x402, $0.03/call, status unknown (last checked 2026-09-14).

Returns a deterministic risk assessment for an npm or PyPI package version using OSV vulnerability data and registry metadata.

## Facts

- Endpoint: POST https://agent-dev-preflight-api.bonkoturyu.workers.dev/v1/package/risk
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-dev-preflight-api-package-risk-check-b88ae562
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ZHUWGbaQB5q-iuBXezIHC

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 agent-dev-preflight-api-package-risk-check-b88ae562 -d '<json body>'
```

Example prompt: Before I install it, can you run a risk preflight on lodash version 4.17.20 from npm and tell me if it has any known vulnerabilities or registry red flags?

## When to prefer this

Choose this endpoint when you need a fast, deterministic, per-version security check on a specific npm or PyPI package — especially in automated pipelines, CI gates, or agentic workflows where you want OSV vulnerability data plus registry metadata signals without spinning up a full SCA tool. Prefer it over general-purpose vulnerability scanners when you have an exact pinned version and need a lightweight, pay-per-call preflight with no setup.

## Known failure modes

- Version range submitted instead of exact version — rejected with validation error
- Package name or ecosystem not found in registry — returns not-found or error response
- OSV data temporarily unavailable — upstream lookup failure
- Invalid ecosystem value (only 'npm' and 'PyPI' are accepted) — schema validation error
- Package name exceeds 214 character limit — rejected by input validation
- Payment not provided or insufficient — 402 payment required response

## How this service works

Deterministic package risk preflight using OSV and registry metadata.

## Output

A deterministic risk report for the specified package version, including OSV vulnerability matches, registry metadata signals (e.g. maintainer activity, publish anomalies), and an overall risk indicator — all scoped to the exact installed version provided.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "package": {
   "type": "object",
   "required": [
    "ecosystem",
    "name",
    "version"
   ],
   "properties": {
    "name": {
     "type": "string",
     "maxLength": 214,
     "minLength": 1
    },
    "version": {
     "type": "string",
     "minLength": 1,
     "description": "Exact installed version; version ranges are rejected."
    },
    "ecosystem": {
     "enum": [
      "npm",
      "PyPI"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-dev-preflight-api-package-risk-check-b88ae562/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-dev-preflight-api.bonkoturyu.workers.dev](https://www.zero.xyz/host/agent-dev-preflight-api.bonkoturyu.workers.dev/llms.txt)
