# Delx SemVer Compare Lite

> Delx SemVer Compare Lite is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Compares two semantic version strings (a vs b) and returns a comparison result (-1, 0, or 1) indicating which version is older, equal, or newer.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/semver-compare-lite
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-semver-compare-lite-69ed2e0f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_EYnqTuhyb70fpdryCxF0f

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 delx-semver-compare-lite-69ed2e0f -d '<json body>'
```

Example prompt: Compare semver 1.4.2 against 2.0.0 and tell me which direction I should upgrade — is 1.4.2 older, the same, or newer than 2.0.0?

## When to prefer this

Choose this endpoint when you need a lightweight, stateless, no-dependency semver ordering check — especially in agent pipelines where you want to avoid importing a full semver library or making network calls to package registries. Ideal for determining upgrade direction between two known version strings without any authentication setup. At $0.001 USDC per call it is cost-effective for automated orchestration loops.

## Known failure modes

- Malformed semver string (e.g. missing patch segment, non-numeric parts) may return an error or unexpected result
- Empty or null input for either 'a' or 'b' will likely result in a validation failure
- Payment failure via x402 on Base will prevent the call from completing
- Version strings with pre-release labels (e.g. 1.0.0-alpha) may not be handled as expected if the service only supports plain triples

## How this service works

Compare two semver triples (-1,0,1). Call when you decide upgrade direction for agent packages. Returns cmp and ok for $0.001 USDC via x402 on Base. No network, no keys, no retention; first-party local JSON only. Results are advisory; the caller owns budgets, auth, and production controls.

## Output

Returns a JSON object with a 'cmp' field set to -1 (a is older than b), 0 (a equals b), or 1 (a is newer than b), plus an 'ok' boolean confirming the operation succeeded. No external network calls or data retention occur.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "a": {
   "type": "string",
   "description": "Input field: a."
  },
  "b": {
   "type": "string",
   "description": "Input field: b."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "cmp": -1,
  "schema": "delx/util-semver-compare-lite/v1"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-semver-compare-lite-69ed2e0f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
