# license-check

> license-check is a paid API for AI agents from payai.agentstools.dev, paid per call via x402, $0.03/call, status unknown (last checked 2026-09-15).

Returns a license-compliance verdict (safe, attribution-required, copyleft-risk, or incompatible) for a single package and its entire transitive dependency tree, resolving deps.dev metadata and SPDX licenses.

## Facts

- Endpoint: GET https://payai.agentstools.dev/license/check
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/license-check-b79cf2dd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Fr0k9CXtQVPtJ6BfPtF_u

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 license-check-b79cf2dd
```

Example prompt: Check if the npm package 'express' version 4.18.2 is license-safe for my MIT-licensed project that I ship as SaaS — tell me if there are any copyleft risks in its transitive dependencies.

## When to prefer this

Choose this endpoint when you need a quick, automated license-risk verdict for a single package with full transitive dependency analysis, especially when you need distribution-mode awareness (saas/binary/internal) and target-license compatibility checking. Prefer it over generic package metadata APIs when copyleft contamination detection across the full dep graph matters. Use the sibling batch-manifest endpoint instead when checking an entire lockfile or requirements.txt at once.

## Known failure modes

- Package not found in the specified ecosystem — returns error if name/version doesn't exist in deps.dev
- Unsupported ecosystem enum value — request rejected with validation error
- Version resolution failure if omitted version cannot be resolved to a latest stable release
- Invalid or unrecognized SPDX license string for target_license — may return unclear verdict
- Dependency graph too large or circular — potential timeout or incomplete traversal
- Payment failure (x402) — call blocked if USDC payment not completed

## How this service works

License-compliance verdict for one package and its whole transitive dependency tree. Resolves the deps.dev graph plus the declared SPDX license of every node, finds copyleft contamination points, and returns a target-and-distribution-aware verdict of safe, attribution-required, copyleft-risk or incompatible. Automated indicators, not legal advice.

## Output

A structured compliance verdict for the package and its transitive dependency tree, including: an overall verdict (safe, attribution-required, copyleft-risk, or incompatible), identified copyleft contamination points with package names and SPDX license identifiers, and per-node license data from the resolved deps.dev graph. Distribution mode and target license are factored into the verdict. Results are automated indicators, not legal advice.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "ecosystem",
      "name"
     ],
     "properties": {
      "name": {
       "type": "string",
       "description": "Package name"
      },
      "version": {
       "type": "string",
       "description": "Version (optional; default resolved if omitted)"
      },
      "ecosystem": {
       "enum": [
        "npm",
        "pypi",
        "go",
        "maven",
        "cargo",
        "nuget"
       ],
       "type": "string",
       "description": "Package ecosystem"
      },
      "distribution": {
       "enum": [
        "saas",
        "binary",
        "internal"
       ],
       "type": "string",
       "description": "How you ship it (default saas)"
      },
      "target_license": {
       "type": "string",
       "description": "Your project SPDX license, e.g. MIT"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/license-check-b79cf2dd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from payai.agentstools.dev](https://www.zero.xyz/host/payai.agentstools.dev/llms.txt)
