LintPDF LintPDF

AI in Rulesets

Using AI checks in Rulesets, presets, and per-request overrides.

AI in Rulesets

AI checks integrate with the existing Ruleset system. Use pre-built AI presets, add AI categories to custom Rulesets, or override AI settings per-request.

AI Presets

Seven pre-built AI presets are available:

PresetIDChecksDescription
FDA Foodfda-food12All FDA nutrition and labeling checks
EU Foodeu-food10EU FIR 1169/2011 compliance checks
Pharma EUpharma-eu9EU FMD, Braille, font compliance
GHS Chemicalghs-chemical12GHS/CLP hazard labeling compliance
Packaging QCpackaging-qc14Barcode, content quality, visual checks
Brand Compliancebrand-compliance7Logo verification, palette matching
Full AI Scanfull-ai33All AI checks

Using a Preset

Include the ai_preset field in your Submit request:

curl -X POST https://api.lintpdf.com/api/v1/submit \
  -H "Authorization: Bearer lpdf_..." \
  -F file=@label.pdf \
  -F ruleset=packaging \
  -F ai_preset=fda-food

The core Ruleset (packaging) runs as normal. The AI preset (fda-food) adds AI checks on top.

Adding AI to Custom Rulesets

When creating a custom Ruleset, include an ai configuration block:

curl -X POST https://api.lintpdf.com/api/v1/rulesets \
  -H "Authorization: Bearer lpdf_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "US Food Packaging",
    "base": "packaging",
    "ai": {
      "categories": ["barcode", "content_quality", "regulatory_fda", "brand"],
      "inspections_override": {
        "ai.content.duplicate_detect": false,
        "ai.brand.palette_match": true
      }
    }
  }'

The categories array enables entire AI categories. The inspections_override object enables or disables individual AI checks within those categories.

Per-Request Overrides

Override AI settings on individual Submit requests without modifying your Ruleset:

curl -X POST https://api.lintpdf.com/api/v1/submit \
  -H "Authorization: Bearer lpdf_..." \
  -F file=@label.pdf \
  -F ruleset=us-food-packaging \
  -F ai_categories=barcode,regulatory_fda \
  -F ai_skip=ai.content.spell_check

Override Precedence

  1. Per-request ai_categories and ai_skip fields take highest priority
  2. Ruleset ai configuration applies next
  3. Account-level AI category settings apply as defaults

Disabling AI for a Request

To submit a file without any AI checks (even if your Ruleset includes them):

curl -X POST https://api.lintpdf.com/api/v1/submit \
  -H "Authorization: Bearer lpdf_..." \
  -F file=@document.pdf \
  -F ruleset=us-food-packaging \
  -F ai_enabled=false

Listing Available AI Presets

curl https://api.lintpdf.com/api/v1/ai/presets \
  -H "Authorization: Bearer lpdf_..."

Response:

{
  "presets": [
    {
      "id": "fda-food",
      "name": "FDA Food",
      "inspections": 12,
      "categories": ["barcode", "content_quality", "regulatory_fda"],
      "tier": "vision"
    }
  ]
}