# Safe Upgrade Decision API

> Safe Upgrade Decision API 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-14).

Analyzes npm package version changes and returns evidence-backed upgrade safety signals, including breaking change mentions and security flags.

## Facts

- Endpoint: POST https://x402-safe-upgrade-api.onrender.com/v1/release-summary
- 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/safe-upgrade-decision-api-78248226
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fk_bh3Bq9UTSHS9VAKvln

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-78248226 -d '<json body>'
```

Example prompt: Before I merge the PR, check if upgrading express from 4.18.2 to 5.0.0 is safe — flag any breaking changes or security issues in the release notes.

## When to prefer this

Choose this endpoint when an AI coding agent needs to make an autonomous or semi-autonomous decision about whether to apply an npm dependency upgrade, especially in CI/CD pipelines or automated PR review workflows. It is purpose-built for npm packages and provides structured, machine-readable flags rather than raw changelogs, making it easier for agents to act on the result without further parsing.

## Known failure modes

- Unknown or private npm package name returns an error or empty result
- Invalid semver format for fromVersion or toVersion causes a 400-level error
- Package exists but no release notes are available, resulting in empty flags arrays
- Network timeout if the underlying npm registry or changelog source is slow
- Incorrect upgrade direction (toVersion older than fromVersion) may produce unexpected results

## How this service works

Evidence-backed npm package upgrade decisions for coding agents.

## Output

Returns a JSON object with a flags object containing arrays of breaking change version mentions and security-related mentions found in the release history, plus an overallChange field classifying the version delta as major, minor, or patch.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "toVersion": {
   "type": "string",
   "description": "Target exact version."
  },
  "fromVersion": {
   "type": "string",
   "description": "Current exact version."
  },
  "packageName": {
   "type": "string",
   "description": "Exact npm package name."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "flags": {
   "breakingMentions": [
    "5.0.0"
   ],
   "securityMentions": []
  },
  "overallChange": "major"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/safe-upgrade-decision-api-78248226/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)
