Kaggle Models
Connect Kaggle Models to Safeguard. The credential each connection needs, which Kaggle keys work, what Safeguard reads, and step-by-step setup.
Availability
This integration is switched on per workspace. If you do not see the card under Integrations, ask your Safeguard contact.
What it does
The Kaggle Models card connects Safeguard to models on Kaggle Models. Each model variation (owner, model, framework and variation, such as google/gemma/transformers/2b) is scanned at its current version: Safeguard downloads the files through Kaggle's API, checks each one, runs the model malware scan (unsafe serialization formats, embedded code) and records the model in your AI inventory with its licence. Find the card under Integrations in the AI models group.
Public vs private
| Public | Private | |
|---|---|---|
| What you enter | A model variation URL, such as https://www.kaggle.com/models/<owner>/<model>/<framework>/<variation> | A Name and a Kaggle API token (or a legacy username:key) |
| Credential needed | None | A Kaggle API token |
| What you can scan | Public models you add by URL | Every variation of your account's models, private ones included, plus any you add by URL |
Supported auth methods
| Method | Use it when | Notes |
|---|---|---|
| Kaggle API token | Recommended | Sent as Authorization: Bearer, the way the official kaggle CLI sends KAGGLE_API_TOKEN |
Legacy API key (kaggle.json) | You already use one | Paste it as username:key; sent as HTTP Basic, as the CLI does |
| None | Public models | Nothing to create |
Permissions required
Safeguard only reads. It never creates, updates or deletes a model, a variation or a version.
Kaggle API token or legacy key
| What Safeguard calls (Kaggle API, as the official SDK) | Required? | What Safeguard uses it for |
|---|---|---|
security.OAuthService/IntrospectToken | Required for an API token | The username the token belongs to |
models.ModelApiService/ListModels (your account as owner, every page) | Required | Listing your models and their variations |
models.ModelApiService/GetModel, GetModelInstance, ListModelInstanceVersionFiles | Required | The version, licence and file list of each variation |
models.ModelApiService/DownloadModelInstanceVersion | Required | Downloading each file for the scan |
Least privilege: Kaggle's account settings offer no read-only key. Create a key for Safeguard alone and expire or revoke it when you disconnect.
Token types
| Key type | Works? | Notes |
|---|---|---|
| API token (Kaggle account settings, API Tokens) | Yes (recommended) | |
Legacy API key (kaggle.json with username and key) | Yes | Paste as username:key |
| A token of another account | Only for that account's models | Private models must belong to the token's account |
Expiry: set an expiry if Kaggle offers one for the token, and rotate it at least every 90 days.
What we never need: write access, competition or dataset publishing rights, or another person's credentials.
Step-by-step setup
Create the credential in Kaggle
- Sign in to Kaggle and open Settings from your profile picture.
- Under API, create an API token (or a legacy API key, which downloads
kaggle.json). - Copy the token, or for a legacy key copy
usernameandkeyfromkaggle.jsonand join them asusername:key.
Or with the Kaggle CLI
To check the credential before you paste it into Safeguard:
export KAGGLE_API_TOKEN="<your token>"
kaggle models list --owner "<your username>"Connect it in Safeguard
- Open Integrations and click Connect on the Kaggle Models card.
- For public models, choose Public, enter a Name, paste a model variation URL, click Add, then Next.
- For your own models, choose Private, enter a Name, paste the token into Access Token and verify it.
- Click Next, select the variations to scan, review and connect.
Webhooks and triggers
This integration has no webhooks. Each selected variation is scanned when you connect it; to rescan new versions, set a schedule under Integrations > Scheduled or rescan by hand from the project.
What we read and store
- Read: your username, your models and their variations, each version's licence and file list, and the files of the variations you select.
- How files are checked: Kaggle's API publishes no file hash, so each file is checked against the size Kaggle lists and the MD5 (or CRC32C) that Kaggle's storage returns with the download, and Safeguard records the file's SHA-256.
- Stored: the connection's settings, the scan results and AI inventory entry of each scanned model, and the token, encrypted at rest and never shown again after you save it.
- Not stored: model files. They are read for the scan and removed.
- No customer data from this integration is sent to third-party LLMs.
Troubleshooting
| Message you see | Cause | Fix |
|---|---|---|
Kaggle refused the Kaggle API token | The token was revoked, expired or mistyped | Create a new token and paste it again |
Kaggle shows no public model at this URL | The URL is wrong or the model is private | Check the URL, or use Private with a token |
This is not a Kaggle model URL | The URL is not a model variation page | Use https://www.kaggle.com/models/<owner>/<model>/<framework>/<variation> |
A scan fails with a gated or 403 error | The model needs its licence accepted on Kaggle | Accept the model's terms on Kaggle with the token's account, then rescan |
Rotation and disconnect
- Rotate: create a new token in Kaggle, find the connection under Project Configurations, choose Update, paste the new token and save, then delete the old token in Kaggle.
- Disconnect: choose Delete from the connection's menu under Project Configurations, then revoke the token in Kaggle.
Vendor references
- Kaggle API (official CLI and SDK), checked 2026-10-16.
- Kaggle Models CLI commands, checked 2026-10-16.
OpenRouter
Connect an OpenRouter account to Safeguard. The management key the connector needs, which OpenRouter keys work, what Safeguard reads, and step-by-step setup.
Civitai
Connect Civitai to Safeguard. The API key a private connection needs, what Safeguard reads (text only), how mature content is handled, and step-by-step setup.