Terms
Prerequisites
- Full-access API key (read-only returns
403). - An import whose rules are activated (pending review returns
409). - The original document still within retention — 7 days by default (
410if expired). - No other training run in progress for this import (
409). - Training enabled for your environment (
503if not).
IMPORT_ID to the activated import id from Import a Policy.
Flow
Start, poll, enforce
Each sample starts training, polls to a terminal status, then enforces withvalidation_scope.imports. Omit the POST body to use Training Studio defaults, or set cost_cap_usd and examples_per_rule.
Do not enforce against a still-training run. ZeroDrift promotes the adapter only after a successful status poll. Until then, scoped enforcement follows its configured fallback path. A failed retrain does not replace an earlier working adapter.
Errors
Gotchas
- One training run per import at a time. A second POST while a run is active returns
409. - Retrain after you materially change the policy (re-sync or re-import, activate, train again).
- Adapters apply when enforcement includes that import in
validation_scope.imports. - Live GET responses report
training_status(queued,succeeded,failed). Some responses also includestatus. - A failed retrain does not replace an earlier working adapter.
FAQ
Do I have to train before custom rules run?
Do I have to train before custom rules run?
No. Activate Rules puts extracted rules into enforcement immediately. Training Studio adds a policy-specific adapter on top of that.
Can I train a document I synced from Notion or Drive?
Can I train a document I synced from Notion or Drive?
Yes. A connected-source import is the same
import_id as a file upload. Activate it, then call the train endpoints. See MCP Connectors.Why did training return 410?
Why did training return 410?
Training needs the original imported file or text. After default content retention (7 days unless your contract says otherwise), that document is deleted. Import again, activate the new rules, then train.
Why did GET training return 404?
Why did GET training return 404?
No training run has been started for that import. POST first, then poll.
Next
Import a Policy
Get an activated
IMPORT_ID before you train.Train Policy Adapter
POST
/api/policies/import/{import_id}/train
