# fittings Semver Range Resolve

> fittings Semver Range Resolve is a paid API for AI agents from fittings.sh, paid per call via x402, $0.004398/call, status unknown (last checked 2026-09-13).

Tests one or more version strings against an npm-style semver range and returns which versions satisfy it, the highest and lowest matches, and the expanded comparators.

## Facts

- Endpoint: GET https://fittings.sh/v1/semver/range-resolve
- Price: $0.004398/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fittings-semver-range-resolve-8c858036
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7RkiKHZaWEc7U3hoUw_e4

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 fittings-semver-range-resolve-8c858036
```

Example prompt: Which of these versions — 1.0.0, 1.2.3, 1.5.0, 2.0.0, 2.1.4 — satisfy the semver range ^1.2.0, and what's the highest one that matches?

## When to prefer this

Use this endpoint when you need to programmatically evaluate npm-style semver ranges against lists of versions — for example, resolving dependency compatibility, filtering candidate releases, or expanding a range into explicit comparator logic. Prefer it over manual string parsing or local semver libraries when you need a reliable, hosted computation without shipping code.

## Known failure modes

- Invalid or malformed semver range returns an error
- More than 200 versions submitted exceeds the limit
- Versions array contains non-semver strings causing parse failure
- Missing required 'range' query parameter returns an error
- Prerelease versions excluded by default unless includePrerelease is set

## How this service works

Tests versions against an npm-style semver range and returns which satisfy it, the highest and lowest that do, and the range expanded into explicit comparators.

## Output

Returns which of the supplied versions satisfy the given semver range, the highest and lowest satisfying versions, and the range expanded into its explicit comparator set.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "range"
     ],
     "properties": {
      "range": {
       "type": "string",
       "description": "npm range, e.g. ^1.2.3, ~1.2, 1.x || >=2.5.0, 1.2.3 - 2.3.4"
      },
      "version": {
       "type": "string",
       "description": "A single version to test"
      },
      "versions": {
       "type": "array",
       "description": "Versions to test, as an array or a comma-separated string; at most 200"
      },
      "includePrerelease": {
       "type": "boolean",
       "description": "Let prereleases satisfy comparators that do not name one, default false"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fittings-semver-range-resolve-8c858036/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fittings.sh](https://www.zero.xyz/host/fittings.sh/llms.txt)
