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.
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 Civitai card connects Safeguard to models on Civitai, such as checkpoints, LoRAs and embeddings. Each model is scanned at its newest published version: Safeguard downloads the model files through Civitai's API, checks each against the SHA-256 Civitai publishes, runs the model malware scan and records the model in your AI inventory with its permissions. Safeguard reads text only: no Civitai image, preview or avatar is fetched or shown, and a model Civitai rates as mature is listed as text with a mature content (text only) marker. Find the card under Integrations in the AI models group.
Public vs private
| Public | Private | |
|---|---|---|
| What you enter | A model URL, such as https://civitai.com/models/<id> | A Name and a Civitai API key |
| Credential needed | None | A Civitai API key |
| What you can scan | Public models you add by URL | Every model your account published, plus any you add by URL, including downloads that need a signed-in account |
Supported auth methods
| Method | Use it when | Notes |
|---|---|---|
| Civitai API key | Your own models, or downloads that need an account | Sent as Authorization: Bearer, the method Civitai recommends |
| None | Public models | Nothing to create |
Permissions required
Safeguard only reads. It never uploads, edits or deletes a model, and never generates images.
Civitai API key
| What Safeguard calls (Civitai site API) | Required? | What Safeguard uses it for |
|---|---|---|
GET /api/v1/me | Required | The username the key belongs to |
GET /api/v1/models?username=<you> (cursor paging, every page) | Required | Listing your models |
GET /api/v1/models/{id} and GET /api/v1/model-versions/{id} | Required | The newest version, its files, their SHA-256 and the model's permissions |
| The version's file download URL | Required | Downloading each model file for the scan |
Least privilege: Civitai API keys are scoped to the whole account. Create a key for Safeguard alone and delete it when you disconnect.
Token types
| Key type | Works? | Notes |
|---|---|---|
| Personal API key (account settings, API Keys) | Yes | |
| OAuth app credentials | No | Safeguard does not use Civitai OAuth |
Expiry: Civitai API keys do not expire on their own. Rotate the key at least every 90 days.
What we never need: Buzz or generation access, or the right to post, comment or upload.
Step-by-step setup
Create the credential in Civitai
- Sign in to Civitai and open your Account settings (
https://civitai.com/user/account). - Under API Keys, add a key named
Safeguard. - Copy the key. Civitai shows it once.
Or with the Civitai API
To check the key before you paste it into Safeguard:
curl -H "Authorization: Bearer $CIVITAI_TOKEN" https://civitai.com/api/v1/meConnect it in Safeguard
- Open Integrations and click Connect on the Civitai card.
- For public models, choose Public, enter a Name, paste a model URL, click Add, then Next.
- For your own models, choose Private, enter a Name, paste the key into Access Token and verify it.
- Click Next, select the models to scan, review and connect.
Webhooks and triggers
This integration has no webhooks. Each selected model 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' names, types, base models, ratings and permissions, each version's file list with SHA-256, and the files of the models you select.
- Licence: Civitai publishes no licence id. Safeguard shows each model's own permissions as Civitai publishes them (commercial uses allowed, derivatives, credit) and names the base model, whose own licence also applies.
- Stored: the connection's settings, the scan results and AI inventory entry of each scanned model, and the key, encrypted at rest and never shown again after you save it.
- Not stored: model files (read for the scan and removed) and anything from Civitai's images.
- No customer data from this integration is sent to third-party LLMs.
Troubleshooting
| Message you see | Cause | Fix |
|---|---|---|
Civitai refused the Civitai API key | The key was deleted or mistyped | Create a new key and paste it again |
This Civitai model is not public | The model needs an account to read | Use Private with an API key |
Civitai has archived this model (or taken it down) | Civitai moderated the model, so its files are not served | Nothing to scan; remove it from the connection |
| A scan fails with a file hash mismatch | The download did not match the SHA-256 Civitai publishes | Rescan; if it repeats, report the model to Civitai |
Rotation and disconnect
- Rotate: add a new key in Civitai, find the connection under Project Configurations, choose Update, paste the new key and save, then delete the old key in Civitai.
- Disconnect: choose Delete from the connection's menu under Project Configurations, then delete the key in Civitai.
Vendor references
- Civitai site API reference, checked 2026-10-16.
- Civitai API authentication, checked 2026-10-16.
Kaggle Models
Connect Kaggle Models to Safeguard. The credential each connection needs, which Kaggle keys work, what Safeguard reads, and step-by-step setup.
ModelScope
Connect ModelScope to Safeguard. The SDK token a private connection needs, which token tiers work, what Safeguard reads, and step-by-step setup.