Skip to main content
GET
/
v1
/
models
/
{modelId}
/
lineage
Get Model Lineage
curl --request GET \
  --url https://api.truthlocks.com/v1/models/{modelId}/lineage \
  --header 'X-API-Key: <api-key>'
import requests

url = "https://api.truthlocks.com/v1/models/{modelId}/lineage"

headers = {"X-API-Key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};

fetch('https://api.truthlocks.com/v1/models/{modelId}/lineage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.truthlocks.com/v1/models/{modelId}/lineage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.truthlocks.com/v1/models/{modelId}/lineage"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("X-API-Key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.truthlocks.com/v1/models/{modelId}/lineage")
.header("X-API-Key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.truthlocks.com/v1/models/{modelId}/lineage")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "training_runs": [
    {}
  ],
  "datasets": [
    {
      "dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "receipt_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "hash": "<string>",
      "format": "<string>",
      "size_bytes": 123,
      "agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "metadata": {},
      "created_at": "2023-11-07T05:31:56Z"
    }
  ],
  "parent_models": [
    {
      "model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "receipt_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "hash": "<string>",
      "framework": "<string>",
      "version": "<string>",
      "agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "training_dataset_ids": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "created_at": "2023-11-07T05:31:56Z"
    }
  ]
}
{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}
{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}
{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}
Returns the complete lineage graph for a model attestation. The graph includes all training datasets, parent models (for fine-tuned or distilled models), and downstream deployments connected by typed relationships. Model lineage enables compliance teams to trace exactly which data was used to train a model, verify that all upstream datasets are properly attested, and audit the full provenance chain from raw data to production deployment.

Authentication

X-API-Key
string
required
API key with models:read scope. Alternatively, pass a Bearer JWT token in the Authorization header.
X-Tenant-ID
string
required
Tenant identifier for multi-tenant isolation.

Path Parameters

id
string
required
Model attestation identifier (maip-model:ULID).

Response

model_id
string
The root model identifier for this lineage query.
nodes
array
Array of lineage nodes. Each node contains: - id (string) — Resource identifier - type (string) — Node type: dataset, model, or deployment
  • name (string) — Human-readable name - version (string) — Resource version - status (string) — Current attestation status - created_at (string) — ISO 8601 timestamp
edges
array
Array of relationships connecting nodes. Each edge contains: - source (string) — Source node identifier - target (string) — Target node identifier - relationship (string) — Relationship type (e.g. trained_on, fine_tuned_from, distilled_from, deployed_as) - metadata (object) — Optional edge metadata
training_datasets
array
Convenience field listing all dataset nodes in the lineage that have a direct trained_on relationship with the queried model. Each entry contains id, name, version, and status.

Authorizations

X-API-Key
string
header
required

API key for machine-to-machine authentication

Path Parameters

modelId
string<uuid>
required

Model identifier

Response

Model lineage

model_id
string<uuid>
training_runs
object[]
datasets
object[]
parent_models
object[]