Skip to content
POST/api/v1/security/model-scan/lineage

Verify a model provenance/lineage chain

Verifies an ordered root→leaf model lineage chain (base→fine-tune→deployment): parent-hash integrity (a mismatch is CRITICAL tamper), signature presence, license policy, origin risk, and untrusted-leaf checks. Stateless compute over a caller-supplied AI-SBOM chain; nothing is fetched or stored.

Authentication

Send Authorization: Bearer YOUR_API_KEY on every request. Generate API keys at /dashboard/api-keys.

Request body required

Example

{
  "projectId": "00000000-0000-0000-0000-000000000000",
  "chain": [
    {
      "modelId": "string",
      "format": "string",
      "manifestDigest": "string",
      "version": "string",
      "license": "string",
      "origin": {
        "country": "string",
        "organization": "string",
        "publisher": "string"
      },
      "parentModelId": "string",
      "parentManifestDigest": "string",
      "trainingDataRefs": [
        "string"
      ],
      "signature": {
        "algorithm": "string",
        "publicKeyId": "string",
        "signature": "string"
      }
    }
  ],
  "options": {
    "trustedManifestDigests": [
      "string"
    ],
    "allowedLicenses": [
      "string"
    ],
    "highRiskOriginCountries": [
      "string"
    ],
    "requireSignature": false
  }
}
Schema
{
  "application/json": {
    "schema": {
      "type": "object",
      "properties": {
        "projectId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "chain": {
          "minItems": 1,
          "maxItems": 64,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "modelId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 512
              },
              "format": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "manifestDigest": {
                "type": "string",
                "minLength": 1,
                "maxLength": 512
              },
              "version": {
                "type": "string",
                "maxLength": 128
              },
              "license": {
                "type": "string",
                "maxLength": 128
              },
              "origin": {
                "type": "object",
                "properties": {
                  "country": {
                    "type": "string",
                    "maxLength": 8
                  },
                  "organization": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "publisher": {
                    "type": "string",
                    "maxLength": 200
                  }
                },
                "additionalProperties": {}
              },
              "parentModelId": {
                "type": "string",
                "maxLength": 512
              },
              "parentManifestDigest": {
                "type": "string",
                "maxLength": 512
              },
              "trainingDataRefs": {
                "maxItems": 256,
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 1024
                }
              },
              "signature": {
                "type": "object",
                "properties": {
                  "algorithm": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "publicKeyId": {
                    "type": "string",
                    "maxLength": 256
                  },
                  "signature": {
                    "type": "string",
                    "maxLength": 8192
                  }
                },
                "additionalProperties": {}
              }
            },
            "required": [
              "modelId",
              "format",
              "manifestDigest"
            ],
            "additionalProperties": false
          }
        },
        "options": {
          "type": "object",
          "properties": {
            "trustedManifestDigests": {
              "maxItems": 256,
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 512
              }
            },
            "allowedLicenses": {
              "maxItems": 64,
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 128
              }
            },
            "highRiskOriginCountries": {
              "maxItems": 64,
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 8
              }
            },
            "requireSignature": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        }
      },
      "required": [
        "chain"
      ],
      "additionalProperties": false
    }
  }
}

Response

200 example

{
  "success": true
}

All status codes

200Lineage verdict.
400(no description)
401(no description)
429(no description)

Code samples

cURL

curl -X POST \
  https://evalguard.ai/api/v1/security/model-scan/lineage \
  -H "Authorization: Bearer $EVALGUARD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "projectId": "00000000-0000-0000-0000-000000000000", "chain": [ { "modelId": "string", "format": "string", "manifestDigest": "string", "version": "string", "license": "string", "origin": { "country": "string", "organization": "string", "publisher": "string" }, "parentModelId": "string", "parentManifestDigest": "string", "trainingDataRefs": [ "string" ], "signature": { "algorithm": "string", "publicKeyId": "string", "signature": "string" } } ], "options": { "trustedManifestDigests": [ "string" ], "allowedLicenses": [ "string" ], "highRiskOriginCountries": [ "string" ], "requireSignature": false } }'

TypeScript

import { EvalGuard } from "@evalguard/sdk";

const client = new EvalGuard({ apiKey: process.env.EVALGUARD_API_KEY });

const response = await client.request({
  method: "POST",
  path: "/api/v1/security/model-scan/lineage",
  body: {
    "projectId": "00000000-0000-0000-0000-000000000000",
    "chain": [
      {
        "modelId": "string",
        "format": "string",
        "manifestDigest": "string",
        "version": "string",
        "license": "string",
        "origin": {
          "country": "string",
          "organization": "string",
          "publisher": "string"
        },
        "parentModelId": "string",
        "parentManifestDigest": "string",
        "trainingDataRefs": [
          "string"
        ],
        "signature": {
          "algorithm": "string",
          "publicKeyId": "string",
          "signature": "string"
        }
      }
    ],
    "options": {
      "trustedManifestDigests": [
        "string"
      ],
      "allowedLicenses": [
        "string"
      ],
      "highRiskOriginCountries": [
        "string"
      ],
      "requireSignature": false
    }
  },
});
console.log(response);

Python

from evalguard import EvalGuard
import os

client = EvalGuard(api_key=os.environ["EVALGUARD_API_KEY"])

response = client.request(
    method="POST",
    path="/api/v1/security/model-scan/lineage",
    body={
    "projectId": "00000000-0000-0000-0000-000000000000",
    "chain": [
        {
            "modelId": "string",
            "format": "string",
            "manifestDigest": "string",
            "version": "string",
            "license": "string",
            "origin": {
                "country": "string",
                "organization": "string",
                "publisher": "string"
            },
            "parentModelId": "string",
            "parentManifestDigest": "string",
            "trainingDataRefs": [
                "string"
            ],
            "signature": {
                "algorithm": "string",
                "publicKeyId": "string",
                "signature": "string"
            }
        }
    ],
    "options": {
        "trustedManifestDigests": [
            "string"
        ],
        "allowedLicenses": [
            "string"
        ],
        "highRiskOriginCountries": [
            "string"
        ],
        "requireSignature": False
    }
},
)
print(response)

Go

package main

import (
	"context"
	"fmt"
	"net/http"
	"os"
	"strings"
)

func main() {
	body := strings.NewReader(`{"projectId":"00000000-0000-0000-0000-000000000000","chain":[{"modelId":"string","format":"string","manifestDigest":"string","version":"string","license":"string","origin":{"country":"string","organization":"string","publisher":"string"},"parentModelId":"string","parentManifestDigest":"string","trainingDataRefs":["string"],"signature":{"algorithm":"string","publicKeyId":"string","signature":"string"}}],"options":{"trustedManifestDigests":["string"],"allowedLicenses":["string"],"highRiskOriginCountries":["string"],"requireSignature":false}}`)
	req, _ := http.NewRequestWithContext(context.Background(), "POST", "https://evalguard.ai/api/v1/security/model-scan/lineage", body)
	req.Header.Set("Authorization", "Bearer "+os.Getenv("EVALGUARD_API_KEY"))
	req.Header.Set("Content-Type", "application/json")
	resp, err := http.DefaultClient.Do(req)
	if err != nil { panic(err) }
	defer resp.Body.Close()
	fmt.Println(resp.Status)
}

Errors

400401429

Other Security endpoints