# Safe Upgrade Decision API – License Check

> Safe Upgrade Decision API – License Check is a paid API for AI agents from x402-safe-upgrade-api.onrender.com, paid per call via x402, $0.03/call, status unknown (last checked 2026-09-13).

Checks npm packages against license compliance rules and returns evidence-backed pass/fail decisions for each package.

## Facts

- Endpoint: POST https://x402-safe-upgrade-api.onrender.com/v1/license-check
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/safe-upgrade-decision-api-license-check-9e9e96ec
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_b17akYq3wJ-P76UB8B2kC

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 safe-upgrade-decision-api-license-check-9e9e96ec -d '<json body>'
```

Example prompt: Check the licenses for lodash, axios, and express in my project — flag any that might cause compliance issues before I upgrade them.

## When to prefer this

Use this endpoint when a coding agent needs to validate npm package license compliance before recommending or executing a dependency upgrade, especially in commercial or open-source projects where license compatibility matters. It's purpose-built for npm ecosystems and returns structured pass/fail evidence suitable for automated CI/CD gates or agent-driven upgrade workflows.

## Known failure modes

- Empty or missing 'packages' array and 'dependencies' object returns a validation error
- Unknown or unpublished package names may not resolve license data
- Payment failure via x402 protocol results in 402 response before processing
- Malformed version strings in the dependencies map may cause lookup failures
- Service may return incomplete data for very new or scoped private packages

## How this service works

Evidence-backed npm package upgrade decisions for coding agents.

## Output

A JSON object containing a summary with a boolean 'passed' field, the total number of packages checked, and the count of flagged packages. Flagged packages are those with licenses that may pose compliance risks.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "packages": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "Alternatively, a list of package names."
  },
  "dependencies": {
   "type": "object",
   "description": "Package-name to version map.",
   "additionalProperties": {
    "type": "string"
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "summary": {
   "passed": false,
   "checked": 2,
   "flagged": 1
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/safe-upgrade-decision-api-license-check-9e9e96ec/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-safe-upgrade-api.onrender.com](https://www.zero.xyz/host/x402-safe-upgrade-api.onrender.com/llms.txt)
