# Model Card Revision Monitor (`flintglade/model-card-revision-monitor`) Actor

Detect meaningful changes between Hugging Face or explicit model-card revisions, with immutable source hashes, evidence locators, semantic categories, severity, unified diffs, and optional paid baselines.

- **URL**: https://apify.com/flintglade/model-card-revision-monitor.md
- **Developed by:** [Flintglade](https://apify.com/flintglade) (community)
- **Categories:** AI, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $50.00 / 1,000 model card checks

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Model Card Revision Monitor

Compare explicit model-card revisions and return evidence-located semantic changes across identity, license, provenance, evaluation, training, use, limitation, safety, environmental, citation, and file-reference categories.

### What this does not do

This Actor does not crawl Hugging Face, discover models, rank model quality, verify a card's claims, infer legal permission, execute model code, download model weights, or monitor continuously after a run. It does not treat wording changes as proof that a model itself changed.

### Input

Supply 1-50 documents. Each document contains exactly one of `huggingFaceRepo` or `modelCardUrl`. Hugging Face inputs may specify `revision` and `priorRevision`; both are resolved to immutable commit SHAs before the README is read. For explicit URLs, `priorRevision` is an optional second HTTPS URL.

Controlled public example:

```json
{
  "documents": [{
    "huggingFaceRepo": "google-bert/bert-base-uncased",
    "revision": "5546055f03398095e385d7dc625e636cc8910bf2",
    "priorRevision": "0e9f43ffc3afb401b28131d3443a63cb98e5deb8"
  }],
  "includeUnifiedDiff": true,
  "concurrency": 1
}
````

`hfToken` is optional secret input for repositories the customer is authorized to access. `baselineStoreId` may name an existing Apify key-value store for paid, persistent baselines. Without an explicit prior revision or persistent baseline, the first successful observation creates a baseline result.

### Output

Each document receives one deterministic result row followed by an uncharged run-summary row. A result includes immutable source revisions where available, raw hashes, parsed YAML metadata, section inventories with line locators, category deltas, severity, before/after excerpts, and a unified diff. Diffs larger than 200 KB are placed in run key-value storage and referenced by hash.

Categories are `identity_metadata`, `license`, `base_model`, `datasets`, `pipeline_task`, `evaluation`, `training`, `intended_use`, `limitations`, `safety`, `environmental`, `citations`, and `file_references`. Pure whitespace changes are ignored. A section rename with unchanged content is a low-severity move. Removal of license, intended-use, limitation, or safety text is high severity; this is a review priority, not a legal or factual conclusion.

### Pricing

The primary pay-per-event event is `model-card-check` at **$0.05 per document**. A baseline creation, unchanged comparison, material change, or definitive current-card 404/410 is chargeable. Unsafe URLs, authentication failure, rate-limit exhaustion, transient source failure, missing prior revision, unsupported media, invalid YAML, and internal failures are uncharged.

One document costs up to $0.05 in Actor events, ten cost up to $0.50, and fifty cost up to $2.50, plus platform usage displayed by Apify. The Actor stops admitting work when the run charge limit is reached.

### Baselines and billing order

When `baselineStoreId` is set, the candidate baseline is journaled before output. It becomes current only after Apify accepts the paid event. A charged-but-interrupted commit is recovered at the beginning of the next run. A baseline-store outage is uncharged and stops the run rather than silently switching to stateless behavior.

### Source and authorization policy

The Actor reads only the named Hugging Face repository or explicit customer-provided HTTPS URL. Requests are bounded to 2 MB per response, redirects are revalidated against SSRF rules, private/reserved destinations are rejected, and transient responses receive bounded retries. Customers are responsible for access authorization and source terms. See `SOURCE_POLICY.md`.

### Partial failures and negative results

Every admitted document has its own status. Duplicate inputs are rejected without charge. A missing current card is a paid definitive negative; a missing prior card is uncharged because no comparison can be completed. Malformed or unsafe YAML is rejected without charge. Source failures never become successful empty comparisons.

### Resource limits and privacy

Launch settings are 256 MB minimum, 512 MB default, 1,024 MB maximum, and a 300-second timeout. Concurrency is bounded from 1-6. The Actor has no external telemetry. Tokens are not logged, emitted, or persisted in baseline records. Dataset and key-value retention follow the customer's Apify settings. See `PRIVACY.md` and `THREAT_MODEL.md`.

### Validation

The release gate includes a 50-pair hand-labeled synthetic gold corpus. Category precision must be at least 0.95 and recall at least 0.90, every emitted delta must have evidence locators, and whitespace/move cases must produce zero false high-severity findings.

### Support

Email `support@flintglade.com`. See `CHANGELOG.md` for version history.

# Actor input Schema

## `inputSchemaVersion` (type: `integer`):

Versioned runtime input contract.

## `documents` (type: `array`):

Each document uses either a Hugging Face repository or an explicit HTTPS model-card URL.

## `baselineStoreId` (type: `string`):

Optional existing key-value store. A new baseline is committed only after a paid event is accepted.

## `hfToken` (type: `string`):

Optional token for repositories you are authorized to access. It is never emitted.

## `categories` (type: `array`):

Semantic categories to include in delta output.

## `includeUnifiedDiff` (type: `boolean`):

Diffs up to 200 KB are inline; larger diffs are stored as artifacts.

## `concurrency` (type: `integer`):

Bounded simultaneous source reads; it does not change event price.

## Actor input object example

```json
{
  "inputSchemaVersion": 1,
  "documents": [
    {
      "huggingFaceRepo": "google-bert/bert-base-uncased",
      "revision": "5546055f03398095e385d7dc625e636cc8910bf2",
      "priorRevision": "0e9f43ffc3afb401b28131d3443a63cb98e5deb8"
    }
  ],
  "categories": [
    "identity_metadata",
    "license",
    "base_model",
    "datasets",
    "pipeline_task",
    "evaluation",
    "training",
    "intended_use",
    "limitations",
    "safety",
    "environmental",
    "citations",
    "file_references"
  ],
  "includeUnifiedDiff": true,
  "concurrency": 3
}
```

# Actor output Schema

## `defaultDataset` (type: `string`):

No description

## `runSummary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "documents": [
        {
            "huggingFaceRepo": "google-bert/bert-base-uncased",
            "revision": "5546055f03398095e385d7dc625e636cc8910bf2",
            "priorRevision": "0e9f43ffc3afb401b28131d3443a63cb98e5deb8"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("flintglade/model-card-revision-monitor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "documents": [{
            "huggingFaceRepo": "google-bert/bert-base-uncased",
            "revision": "5546055f03398095e385d7dc625e636cc8910bf2",
            "priorRevision": "0e9f43ffc3afb401b28131d3443a63cb98e5deb8",
        }] }

# Run the Actor and wait for it to finish
run = client.actor("flintglade/model-card-revision-monitor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "documents": [
    {
      "huggingFaceRepo": "google-bert/bert-base-uncased",
      "revision": "5546055f03398095e385d7dc625e636cc8910bf2",
      "priorRevision": "0e9f43ffc3afb401b28131d3443a63cb98e5deb8"
    }
  ]
}' |
apify call flintglade/model-card-revision-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=flintglade/model-card-revision-monitor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Model Card Revision Monitor",
        "description": "Detect meaningful changes between Hugging Face or explicit model-card revisions, with immutable source hashes, evidence locators, semantic categories, severity, unified diffs, and optional paid baselines.",
        "version": "0.1",
        "x-build-id": "MwrXqmUbTYftS32iW"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/flintglade~model-card-revision-monitor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-flintglade-model-card-revision-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/flintglade~model-card-revision-monitor/runs": {
            "post": {
                "operationId": "runs-sync-flintglade-model-card-revision-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/flintglade~model-card-revision-monitor/run-sync": {
            "post": {
                "operationId": "run-sync-flintglade-model-card-revision-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "documents"
                ],
                "properties": {
                    "inputSchemaVersion": {
                        "title": "Input schema version",
                        "minimum": 1,
                        "maximum": 1,
                        "type": "integer",
                        "description": "Versioned runtime input contract.",
                        "default": 1
                    },
                    "documents": {
                        "title": "Model cards",
                        "minItems": 1,
                        "maxItems": 50,
                        "type": "array",
                        "description": "Each document uses either a Hugging Face repository or an explicit HTTPS model-card URL.",
                        "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                                "huggingFaceRepo": {
                                    "title": "Hugging Face repository",
                                    "type": "string",
                                    "maxLength": 193,
                                    "description": "Repository identifier in owner/name form."
                                },
                                "modelCardUrl": {
                                    "title": "Explicit model-card URL",
                                    "type": "string",
                                    "maxLength": 2048,
                                    "editor": "textfield",
                                    "description": "Public or user-authorized HTTPS model-card URL."
                                },
                                "revision": {
                                    "title": "Current revision",
                                    "type": "string",
                                    "maxLength": 128,
                                    "description": "Hugging Face branch, tag, or commit resolved to an immutable SHA."
                                },
                                "priorRevision": {
                                    "title": "Prior revision or URL",
                                    "type": "string",
                                    "maxLength": 2048,
                                    "description": "Prior Hugging Face revision, or prior HTTPS URL in explicit URL mode."
                                }
                            }
                        }
                    },
                    "baselineStoreId": {
                        "title": "Persistent baseline store ID",
                        "type": "string",
                        "description": "Optional existing key-value store. A new baseline is committed only after a paid event is accepted."
                    },
                    "hfToken": {
                        "title": "Hugging Face token",
                        "type": "string",
                        "description": "Optional token for repositories you are authorized to access. It is never emitted."
                    },
                    "categories": {
                        "title": "Categories",
                        "minItems": 1,
                        "uniqueItems": true,
                        "type": "array",
                        "description": "Semantic categories to include in delta output.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "identity_metadata",
                                "license",
                                "base_model",
                                "datasets",
                                "pipeline_task",
                                "evaluation",
                                "training",
                                "intended_use",
                                "limitations",
                                "safety",
                                "environmental",
                                "citations",
                                "file_references"
                            ]
                        },
                        "default": [
                            "identity_metadata",
                            "license",
                            "base_model",
                            "datasets",
                            "pipeline_task",
                            "evaluation",
                            "training",
                            "intended_use",
                            "limitations",
                            "safety",
                            "environmental",
                            "citations",
                            "file_references"
                        ]
                    },
                    "includeUnifiedDiff": {
                        "title": "Include unified diff",
                        "type": "boolean",
                        "description": "Diffs up to 200 KB are inline; larger diffs are stored as artifacts.",
                        "default": true
                    },
                    "concurrency": {
                        "title": "Concurrency",
                        "minimum": 1,
                        "maximum": 6,
                        "type": "integer",
                        "description": "Bounded simultaneous source reads; it does not change event price.",
                        "default": 3
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
