Lazaretto Scan API

The Scan API from Lazaretto — 2 operation(s) for scan.

GitHub OpenAPI

Operations 2

POST /v1/scan Scan a target and return a verdict bound to its content hash #
POST /v1/scan/batch Behaviorally scan every pinned dependency in a lockfile, billed per package #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/lazaretto-dev:lazaretto-dev-scan-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

lazaretto-dev-scan-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: 'Lazaretto: skill & tool verification Scan API'
  version: 2026.11.13a
  summary: 'Deterministic verification of agent skills/tools: known-bad matching + behavioral signals.'
  contact:
    name: Lazaretto
    email: contact@lazaretto.dev
    url: https://lazaretto.dev
  license:
    name: Proprietary
servers:
- url: https://lazaretto.dev
tags:
- name: Scan
paths:
  /v1/scan:
    post:
      x-payment-info:
        protocols:
        - x402
        price:
          mode: fixed
          currency: USD
          amount: '0.03'
      summary: Scan a target and return a verdict bound to its content hash
      description: 'Auth: X-API-Key, OR x402 payment (when enabled). Without valid auth the paid path returns 402 with payment requirements. An `error` verdict returns HTTP 422 and is never billed (§9.5).'
      security:
      - apiKey: []
      - x402: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScanRequest'
      responses:
        '200':
          description: 'A verdict (clear/flagged/malicious). x402 only: the signed `attestation` comes back, and is published, only when the payment settled. When the payment facilitator did not answer clearly, the result still comes back, with no `attestation` and a `payment` block {outcome:"unknown", detail, contact, time}. Whether that payment settled is unknown (settlement_outcome_unknown). Do not pay again for the scan; if you were charged, nothing more is owed. Email contact@lazaretto.dev with the paying wallet address and the `time` if in doubt.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScanReport'
        '401':
          description: Missing or invalid API key.
        '402':
          description: 'Payment required (x402, DUAL-STACK): the PAYMENT-REQUIRED response header carries the x402 v2 challenge (network eip155:8453, `amount`), the JSON body carries the v1 challenge (network base, `maxAmountRequired`) plus a human-readable `hint` with prices and the free tier. Pay via PAYMENT-SIGNATURE (v2) or X-PAYMENT (v1) headers.'
        '409':
          description: 'payment_in_use: this x402 payment is already in use by another request, or was used for one within the last few minutes. One payment pays for one request, so nothing was run or settled for this one. Sign a new payment.'
        '422':
          description: 'An `error` verdict: analysis could not complete. The body is a ScanReport with `verdict` "error" and `risk` "unknown". It is not a clear result. Never billed.'
        '429':
          description: Rate limited.
        '503':
          description: An X-API-Key could not be checked (`key_check_unavailable`, with Retry-After). The key was not rejected and nothing was charged. Retry shortly.
      tags:
      - Scan
      operationId: postV1Scan
      x-operation-id-source: derived
  /v1/scan/batch:
    post:
      summary: Behaviorally scan every pinned dependency in a lockfile, billed per package
      description: 'The paid counterpart to /v1/lockfile, which only matches identities. Reads the code of each package and screens for credential theft, exfiltration, obfuscation, prompt injection and install-time droppers. Each result carries a verdict, a risk level, the ids of the rules that fired and a risk summary. It does not carry file-and-line evidence: for that, scan the package on its own with POST /v1/scan (scan_artifact over MCP). Requires an X-API-Key holding credits: one credit per package that returns a verdict, NOTHING for a package that errors (its reservation is refunded). Capped at 25 packages per call, in lockfile order, deduplicated, worst verdict first. Sending the same lockfile again rescans the same first 25. To continue, send the rest as {"packages":[...]}: the `not_scanned.packages` list from the result (name@version strings) is accepted as it is. Read `complete_coverage` before trusting the result: false means something was capped, errored, only partly readable, or skipped for having no registry identity, so it is not a clean bill of health for the whole tree.'
      security:
      - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                lockfile:
                  type: string
                packages:
                  type: array
                  description: Exactly pinned packages, as {name, version} objects or name@version strings.
                  items:
                    oneOf:
                    - type: object
                      properties:
                        name:
                          type: string
                        version:
                          type: string
                    - type: string
                      examples:
                      - chalk@5.6.1
                      - '@scope/name@1.0.0'
      responses:
        '200':
          description: 'Per-package verdicts plus coverage and billing detail. `not_scanned` is null or {count, reasons, by_reason: {credits, time, cap}, packages}: by_reason splits count by cause, and packages lists the name@version of every package not scanned, in lockfile order. `refund_failed` is true only when unbilled credits could not be returned automatically.'
        '400':
          description: No exactly-pinned versions found.
        '401':
          description: Missing or invalid API key.
        '402':
          description: No credits available. Body quotes the packs and their prices.
        '429':
          description: Rate limited (per key).
        '503':
          description: 'The key could not be checked (`key_check_unavailable`, with Retry-After; the key was not rejected), or the batch could not be completed. No scan credits are billed; `refund_failed` says whether the reserved credits came back. `auto_reload_possible` is present and true when the key has auto-reload switched on: reserving the credits may have started a reload, and if it did, that pack was charged to the saved card and its credits are on the key.'
      tags:
      - Scan
      operationId: postV1ScanBatch
      x-operation-id-source: derived
components:
  schemas:
    KnownBad:
      type: object
      properties:
        matched:
          type:
          - boolean
          - 'null'
          description: true=known-bad; false=checked clean; null=could not check (fail-closed).
        match_type:
          type: string
          enum:
          - exact_hash
          - fuzzy_hash
          - embedded_ioc
          - known_publisher
          - malicious_package
          description: 'How the known-bad match was made. `malicious_package` means the package identity (name + version) is listed as malware in the OSV/OpenSSF corpus, which is scoped to the affected versions: a project compromised in one release is not condemned in its later clean ones.'
        sources:
          type: array
          items:
            type: string
    ScanRequest:
      type: object
      required:
      - target
      properties:
        target:
          type: object
          required:
          - type
          properties:
            type:
              type: string
              enum:
              - inline
              - raw_url
              - npm_package
              - pypi_package
              - github_repo
              - clawhub_skill
              - huggingface_model
              - mcp_server
              - mcp_tools
            ref:
              type: string
              description: Identifier for non-inline targets.
            content:
              type: string
              description: Literal content for type=inline.
            name:
              type: string
              description: Filename for type=inline, for example SKILL.md or index.js. Which rules run depends on the kind of file, so send it when you have it; without it the kind is inferred from the content.
        depth:
          type: string
          enum:
          - lookup
          - full
          default: full
          description: lookup = hash + IOC match only; full = + behavioral rules.
    Finding:
      type: object
      properties:
        rule_id:
          type: string
        category:
          type: string
        severity:
          type: string
          enum:
          - high
          - medium
          - low
          - info
        description:
          type: string
        evidence:
          type: object
          properties:
            file:
              type: string
            line:
              type: integer
            snippet:
              type: string
    ScanReport:
      type: object
      properties:
        scan_id:
          type: string
        target_hash:
          type: string
          pattern: ^(sha256:[0-9a-f]{64})?$
          description: 'Hash of exactly what was analyzed. EMPTY STRING when no bytes were read: an npm package that was taken down from the registry is still reported malicious on package IDENTITY, and there is no content to bind that claim to. Check for the empty string before using this in a /report/ or badge URL.'
        verdict:
          type: string
          enum:
          - clear
          - flagged
          - malicious
          - error
        confidence:
          type: string
          enum:
          - high
          - medium
          - low
        risk:
          type: string
          enum:
          - critical
          - high
          - medium
          - low
          - none
          - unknown
          description: 'How serious the concern is, and the field to gate on. `verdict` only says whether anything fired, so a credential stealer and a bundler that uses Function() are both `flagged`. `risk` separates them: reading secrets AND being able to ship them is critical; constructing code at run time is medium. `unknown` appears only with `verdict` "error" (HTTP 422): the scan did not finish, so no level is asserted. It is not a clear result, and a client should treat it, and any value it does not recognize, as a reason to stop and ask.'
        risk_summary:
          type: string
          description: One plain sentence naming the concern.
        known_bad:
          $ref: '#/components/schemas/KnownBad'
        findings:
          type: array
          items:
            $ref: '#/components/schemas/Finding'
        tool_fingerprint:
          type: object
          description: 'Only for mcp_server and mcp_tools targets. Hashes of what the server tells an agent: `tools` maps each tool name to a SHA-256 and `sha256` covers all of them plus the server instructions. Keep `sha256` when you approve a server and compare it on a later scan: a server can change its tools after review. `partial` means a cap cut the read.'
          properties:
            sha256:
              type: string
            tools:
              type: object
              additionalProperties:
                type: string
            instructions:
              type: string
            partial:
              type: boolean
        rules_version:
          type: string
        scanned_at:
          type: string
          format: date-time
        disclaimer:
          type: string
        attestation:
          type: string
          description: Compact JWS (EdDSA) over the verdict core, present on a full scan that did not end in an error. Verify it against /.well-known/jwks.json (offline) or POST /v1/verify. Its `sub` claim binds it to this artifact, so an agent can share the verdict and any recipient can trust it without re-scanning. Left out when an x402 payment did not settle or its outcome is unknown (see `payment`).
        payment:
          type: object
          description: x402 only, present only when the payment facilitator did not answer clearly, so whether the payment settled is unknown. Do not pay again for this scan.
          properties:
            outcome:
              type: string
              enum:
              - unknown
            detail:
              type: string
            contact:
              type: string
            time:
              type: string
              format: date-time
              description: Quote this with the paying wallet address when writing in.
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
    x402:
      type: http
      scheme: x402
      description: Pay-per-call via the x402 protocol (USDC on Base).
    watchToken:
      type: apiKey
      in: header
      name: x-watch-token
      description: The watch token returned once by POST /v1/watch.