LintPDF
LintPDFEvery check. Every page. Every time.

Documentation

Everything you need to integrate LintPDF into your workflow.

Getting Started

LintPDF is a detection-only PDF preflight engine. You send a file, you get a report. Three steps to your first Report:

1

Sign up

Create an account at app.lintpdf.com and navigate to Dashboard.

2

Get your API Key

Generate an API key from the API Key section. Your key starts with lpdf_.

3

Submit your first file

Submit a PDF to the Submit endpoint and retrieve your Report.

Quick example

# Submit a PDF for preflight
curl -X POST https://api.lintpdf.com/api/v1/submit \
  -H "Authorization: Bearer lpdf_your_api_key" \
  -F file=@brochure.pdf \
  -F ruleset=gwg-sheetfed

# Retrieve the Report
curl https://api.lintpdf.com/api/v1/reports/f47ac10b-... \
  -H "Authorization: Bearer lpdf_your_api_key"

Authentication

Include your API Key in the Authorization header as a Bearer token:

Authorization: Bearer lpdf_your_api_key

Keep your API Key secret. Never expose it in client-side code, public repositories, or browser requests. Use environment variables and server-side calls only.

API Reference

Base URL: https://api.lintpdf.com

All endpoints return JSON. Authenticated endpoints require a valid API Key.

POST/api/v1/submitAPI Key required

Submit a file for preflight analysis. Accepts PDF, EPS, PostScript, TIFF, JPEG, PNG, and PDF-compatible AI files. Non-PDF files are converted internally before checking.

Request

curl -X POST https://api.lintpdf.com/api/v1/submit \
  -H "Authorization: Bearer lpdf_..." \
  -F file=@document.pdf \
  -F ruleset=gwg-sheetfed

Response

{
  "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "status": "processing",
  "ruleset": "gwg-sheetfed",
  "file_name": "document.pdf",
  "created_at": "2026-03-15T10:30:00Z"
}
GET/api/v1/reports/{id}API Key required

Retrieve the Report for a completed preflight job. Includes summary, findings with severity levels (Error, Warning, Info), and page locations.

Request

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

Response

{
  "id": "f47ac10b-...",
  "status": "complete",
  "verdict": "error",
  "ruleset": "gwg-sheetfed",
  "file_name": "document.pdf",
  "page_count": 4,
  "duration_ms": 1240,
  "summary": {
    "total_findings": 3,
    "error": 1,
    "warning": 1,
    "info": 1
  },
  "findings": [
    {
      "inspection_id": "font.not_embedded",
      "severity": "error",
      "message": "Font 'Helvetica' is not embedded",
      "page": 1
    },
    {
      "inspection_id": "color.spot_color_usage",
      "severity": "warning",
      "message": "Spot color 'PANTONE 185 C' found on page 2",
      "page": 2
    },
    {
      "inspection_id": "image.low_resolution",
      "severity": "info",
      "message": "Image at 150 DPI (minimum 300 DPI recommended)",
      "page": 3
    }
  ]
}
GET/api/v1/reports/{id}/report?format=pdf|json|xmlAPI Key required

Download the Report as a formatted report. PDF reports include tenant White Label (logo, colors, footer) when configured. JSON and XML are machine-readable.

Request

# PDF report (white-labeled)
curl -o report.pdf \
  "https://api.lintpdf.com/api/v1/reports/f47ac10b-.../report?format=pdf" \
  -H "Authorization: Bearer lpdf_..."

# JSON report
curl "https://api.lintpdf.com/api/v1/reports/f47ac10b-.../report?format=json" \
  -H "Authorization: Bearer lpdf_..."

Response

200 OK
Content-Type: application/pdf (or application/json, application/xml)

# JSON format returns the same structure as GET /api/v1/reports/{id}
# PDF format returns a branded, downloadable report
# XML format returns a structured XML document
PUT/api/v1/white-labelAPI Key required

Configure white-label branding for PDF reports. Upload your logo, set brand colors, and customize the footer text. Available on Scale and Enterprise plans.

Request

curl -X PUT https://api.lintpdf.com/api/v1/white-label \
  -H "Authorization: Bearer lpdf_..." \
  -H "Content-Type: application/json" \
  -d '{
    "logo_url": "https://yourcompany.com/logo.png",
    "primary_color": "#1a365d",
    "company_name": "Acme Print Co.",
    "footer_text": "Preflight report generated by Acme Print Co."
  }'

Response

{
  "white_label": {
    "logo_url": "https://yourcompany.com/logo.png",
    "primary_color": "#1a365d",
    "company_name": "Acme Print Co.",
    "footer_text": "Preflight report generated by Acme Print Co.",
    "updated_at": "2026-03-15T10:30:00Z"
  }
}
GET/api/v1/rulesets

List available Rulesets (preflight profiles). Includes built-in profiles and any custom profiles created by your account.

Request

curl https://api.lintpdf.com/api/v1/rulesets

Response

{
  "rulesets": [
    {
      "id": "gwg-sheetfed",
      "name": "GWG Sheetfed",
      "description": "Ghent Workgroup sheetfed offset standard",
      "checks": 196,
      "is_builtin": true
    },
    {
      "id": "gwg-digital",
      "name": "GWG Digital",
      "description": "Ghent Workgroup digital printing standard",
      "checks": 180,
      "is_builtin": true
    },
    {
      "id": "pdfx4",
      "name": "PDF/X-4",
      "description": "ISO 15930-7 PDF/X-4 conformance",
      "checks": 120,
      "is_builtin": true
    },
    {
      "id": "packaging",
      "name": "Packaging",
      "description": "Packaging-specific checks including barcode grading",
      "checks": 210,
      "is_builtin": true
    }
  ]
}
POST/api/v1/rulesetsAPI Key required

Create a custom Ruleset. Select which Checks to include and configure thresholds. Available on Growth plans and above.

Request

curl -X POST https://api.lintpdf.com/api/v1/rulesets \
  -H "Authorization: Bearer lpdf_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Custom Plan",
    "description": "Custom checks for magazine production",
    "base": "gwg-sheetfed",
    "overrides": {
      "image.min_dpi": 300,
      "barcode.min_grade": "C",
      "color.allow_spot": true
    }
  }'

Response

{
  "id": "fp_custom_abc123",
  "name": "My Custom Plan",
  "description": "Custom checks for magazine production",
  "checks": 196,
  "is_builtin": false,
  "created_at": "2026-03-15T10:30:00Z"
}

Rulesets

A Ruleset is a preflight profile — a collection of Checks and thresholds that define what LintPDF checks for. Every submission requires a Ruleset.

Built-in Rulesets

RulesetStandardChecksUse Case
GWG SheetfedGWG 2022196Commercial offset, sheetfed lithography
GWG DigitalGWG 2022180Digital printing, wide-format, variable data
PDF/X-4ISO 15930-7120ISO exchange standard, transparency support
PackagingISO 15416210Packaging, labels, barcode grading

Custom Rulesets

Growth, Scale, and Enterprise plans can create custom Rulesets. Start from a built-in base and override specific thresholds, enable or disable individual Checks, and name your profile for reuse across submissions.

Checks Reference

LintPDF runs 250+ individual Checks across these categories. Each finding in a Report references a Check ID, severity level, and affected page.

Fonts

Check IDDescription
font.not_embeddedFont is referenced but not embedded in the PDF
font.subset_incompleteFont subset is missing required glyphs
font.type3_detectedType 3 font detected (bitmap, not scalable)
font.encoding_mismatchFont encoding does not match declared encoding
font.simulated_bold_italicBold or italic style is simulated, not native

Color Spaces

Check IDDescription
color.rgb_in_cmyk_workflowRGB color space found in CMYK workflow
color.spot_color_usageSpot color detected in document
color.icc_profile_missingOutput intent ICC profile not embedded
color.overprint_conflictOverprint settings may cause unexpected output
color.ink_coverage_exceededTotal area coverage exceeds threshold

Images

Check IDDescription
image.low_resolutionImage resolution below minimum DPI threshold
image.jpeg_artifactsJPEG compression artifacts detected
image.missing_or_corruptImage stream is missing or corrupted
image.alpha_transparencyImage contains alpha channel transparency

Transparency

Check IDDescription
transparency.presentTransparency effects detected in document
transparency.blend_modeNon-standard blend mode in use
transparency.soft_maskSoft mask (gradient transparency) detected

Page Geometry

Check IDDescription
geometry.trim_box_missingTrimBox not defined (required for print)
geometry.bleed_insufficientBleed area smaller than minimum threshold
geometry.page_size_mismatchPage dimensions do not match expected size
geometry.content_outside_trimContent extends beyond TrimBox

Compliance

Check IDDescription
compliance.pdfx4_violationDocument violates PDF/X-4 (ISO 15930-7) requirements
compliance.pdfa_violationDocument violates PDF/A archival requirements
compliance.javascript_presentJavaScript detected (prohibited in PDF/X)
compliance.encryption_presentDocument encryption detected

Barcodes

Check IDDescription
barcode.detectedBarcode pattern detected in page content
barcode.low_dpiBarcode area DPI below minimum threshold
barcode.non_compliant_colorsBarcode uses colors that may not scan correctly
barcode.decode_failedBarcode could not be decoded
barcode.grade_below_thresholdISO 15416 barcode grade below minimum
barcode.quiet_zone_insufficientBarcode quiet zone smaller than required

This is a representative sample. The full suite includes 250+ checks. Use the GET /api/v1/rulesets endpoint to see which Checks are included in each Ruleset.

Report Formats

Reports can be retrieved in three formats. Use the format query parameter on the report endpoint.

JSON Response Schema

{
  "id": "string",
  "status": "complete",
  "verdict": "pass | error",
  "ruleset": "string",
  "file_name": "string",
  "page_count": "number",
  "duration_ms": "number",
  "summary": {
    "total_findings": "number",
    "error": "number",
    "warning": "number",
    "info": "number"
  },
  "findings": [
    {
      "inspection_id": "string",
      "severity": "error | warning | info",
      "message": "string",
      "page": "number"
    }
  ]
}

PDF Reports & White Label

PDF reports are white-labeled using your White Label configuration. Scale and Enterprise plans can upload a logo, set brand colors, and customize footer text. Reports include a summary page, detailed findings grouped by severity, and page-level annotations.

XML Format

XML reports follow the same structure as JSON but use XML elements. Useful for legacy integrations and enterprise systems that consume XML.

<?xml version="1.0" encoding="UTF-8"?>
<report id="f47ac10b-..." status="complete" verdict="error">
  <ruleset>gwg-sheetfed</ruleset>
  <file-name>document.pdf</file-name>
  <summary total="3" error="1" warning="1" info="1" />
  <findings>
    <finding inspection="font.not_embedded" severity="error" page="1">
      Font 'Helvetica' is not embedded
    </finding>
  </findings>
</report>

Webhooks

Webhooks are webhook callbacks. Register an endpoint and LintPDF will POST event payloads when files finish processing. No polling required.

Registering a Webhook

curl -X POST https://api.lintpdf.com/api/v1/webhooks \
  -H "Authorization: Bearer lpdf_..." \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-app.com/webhook",
    "events": ["job.complete", "job.error"]
  }'

Event Types

EventDescription
job.completeFile processing complete. Includes Report summary and findings.
job.errorFile has Error findings. Includes Report with critical issues.
job.passFile passed all Checks. Pass.
job.failedProcessing failed (corrupt file, timeout). Includes error message.
usage.warningAccount reached 80% of monthly file limit.
usage.cap_reachedOverage spending cap has been reached.

Webhook Payload

{
  "event": "job.complete",
  "timestamp": "2026-03-15T10:30:01Z",
  "data": {
    "id": "f47ac10b-...",
    "verdict": "error",
    "ruleset": "gwg-sheetfed",
    "file_name": "document.pdf",
    "summary": {
      "total_findings": 3,
      "error": 1,
      "warning": 1,
      "info": 1
    }
  }
}

SDKs & Code Examples

LintPDF is a standard REST API — use any HTTP client. Here are examples in popular languages.

Python

import httpx

client = httpx.Client(
    base_url="https://api.lintpdf.com",
    headers={"Authorization": "Bearer lpdf_your_api_key"},
)

# Submit a PDF
with open("brochure.pdf", "rb") as f:
    resp = client.post("/api/v1/submit", files={"file": f}, data={"ruleset": "gwg-sheetfed"})
    job = resp.json()

print(f"Job ID: {job['id']}, Status: {job['status']}")

# Retrieve the Report
report = client.get(f"/api/v1/reports/{job['id']}").json()

if report["verdict"] == "pass":
    print("Pass!")
else:
    print(f"Error: {report['summary']['error']} Error findings")
    for finding in report["findings"]:
        print(f"  [{finding['severity']}] {finding['message']} (page {finding['page']})")

Node.js

import fs from "node:fs";

const API_BASE = "https://api.lintpdf.com";
const headers = { Authorization: "Bearer lpdf_your_api_key" };

// Submit a PDF
const form = new FormData();
form.append("file", new Blob([fs.readFileSync("brochure.pdf")]));
form.append("ruleset", "gwg-sheetfed");

const job = await fetch(`${API_BASE}/api/v1/submit`, {
  method: "POST",
  headers,
  body: form,
}).then((r) => r.json());

console.log("Job ID:", job.id, "Status:", job.status);

// Retrieve the Report
const report = await fetch(`${API_BASE}/api/v1/reports/${job.id}`, {
  headers,
}).then((r) => r.json());

console.log("Verdict:", report.verdict);

PHP / Laravel

use Illuminate\Support\Facades\Http;

$apiBase = 'https://api.lintpdf.com';
$headers = ['Authorization' => 'Bearer lpdf_your_api_key'];

// Submit a PDF
$response = Http::withHeaders($headers)
    ->attach('file', file_get_contents('brochure.pdf'), 'brochure.pdf')
    ->post("$apiBase/api/v1/submit", [
        'ruleset' => 'gwg-sheetfed',
    ]);

$job = $response->json();

// Retrieve the Report
$report = Http::withHeaders($headers)
    ->get("$apiBase/api/v1/reports/{$job['id']}")
    ->json();

if ($report['verdict'] === 'pass') {
    echo "Pass!";
} else {
    echo "Error: " . $report['summary']['error'] . " Error findings";
}

Glossary

LintPDF terminology reference.

ConceptLintPDF TermUsed In
Pass statusPassReports, API responses, UI
Fail statusFailReports, API responses, UI
DashboardDashboardNavigation, docs
Preflight checklist/profileRulesetDocs, API, pricing
Report outputReportDocs, API
Audit historyAudit LogDocs, dashboard
Blocker/critical issueBlockerReports
User role (admin)AdminDashboard, docs
User role (standard)MemberDashboard, docs
Notifications/webhooksWebhooksDocs, settings
Webhook callbacksCallbacksAPI docs
API keysAPI KeyDashboard, docs
Individual checksChecksDocs, API, reports
Severity: criticalErrorReports, API
Severity: warningWarningReports, API
Severity: infoInfoReports, API
White-label tenantsWorkspacesPricing, docs
Tenant onboardingWorkspace SetupDocs
Tenant branding configWhite LabelDashboard, docs
File submissionSubmitAPI docs
Processing queueQueueStatus, docs
Processing in progressProcessingStatus, API
Processing completeCompleteStatus, API

AI-Powered Inspections

Invite-Only Alpha

33 AI inspections across 14 categories. Credit-based, detection-only, same Report format.

AI Getting Started

AI features are available as an invite-only alpha on all paid plans. Four steps to your first AI-powered Report:

1

Request Access

Email sales@lintpdf.com with your account ID and use case. We enable AI features individually during alpha.

2

Purchase Credits

Buy credits via pay-per-use ($0.12/credit) or volume packages starting at 100 credits for $10. Navigate to Settings > AI Billing in Dashboard.

3

Configure Categories

Enable AI categories in Settings > AI Inspections. Choose from barcode, content quality, regulatory, brand, and visual quality.

4

Submit with AI

Add ai_preset or ai_categories to your Submit request.

Quick example

# Submit a PDF with FDA AI preset
curl -X POST https://api.lintpdf.com/api/v1/submit \
  -H "Authorization: Bearer lpdf_your_api_key" \
  -F file=@food-label.pdf \
  -F ruleset=packaging \
  -F ai_preset=fda-food

# Report includes both core engine and AI findings
curl https://api.lintpdf.com/api/v1/reports/f47ac10b-... \
  -H "Authorization: Bearer lpdf_your_api_key"

# Check your credit balance
curl https://api.lintpdf.com/api/v1/ai/credits \
  -H "Authorization: Bearer lpdf_your_api_key"

AI Configuration

AI features are configured at three levels: account defaults, Ruleset settings, and per-request overrides.

Account-Level Settings

In Settings > AI Inspections, enable or disable entire AI categories. These serve as defaults for all submissions.

CategoryInspectionsTierDescription
barcode7TextBarcode detection, decode, validation
content_quality3TextSpell check, language, duplicates
color_compliance2TextBrand palette, contrast ratio
regulatory_fda5VisionFDA Nutrition Facts (21 CFR 101.9)
regulatory_eu4VisionEU Food Information (1169/2011)
regulatory_ghs5VisionGHS/CLP Chemical Labels (1272/2008)
regulatory_pharma3VisionPharmaceutical Packaging (EU FMD)
brand2MixedLogo matching, palette compliance
visual_quality2VisionImage quality, NSFW screening

Brand Configuration

For brand-related AI inspections, configure your assets in Settings > AI Brand:

  • Color Palette — Add approved brand colors as hex values with Delta E tolerance
  • Reference Logos — Upload logo variations (horizontal, stacked, icon-only, reversed)
  • Custom Dictionary — Add brand names, product names, and technical terms for spell checking

Confidence Threshold

Set the minimum confidence score for AI findings in Settings > AI Inspections. Default is 0.75. Only findings above this threshold appear in your Report.

AI Credits

Core preflight checks are unlimited on paid plans. AI inspections consume credits — 1 credit for Text-tier, 2 credits for Vision-tier.

Pricing

OptionCreditsPricePer Credit
Pay-per-useAnyMetered$0.12
Starter Package100$10$0.10
Growth Package500$40$0.08
Scale Package2,000$120$0.06
Enterprise Package10,000$500$0.05

Checking Balance

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

# Response
{
  "balance": 4250,
  "billing_mode": "package",
  "auto_topup": false,
  "consumed_this_month": 750,
  "consumed_total": 3250
}

Auto Top-up

curl -X PUT https://api.lintpdf.com/api/v1/ai/credits/auto-topup \
  -H "Authorization: Bearer lpdf_..." \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": true,
    "threshold": 100,
    "package": "starter"
  }'

When credits run out: AI inspections are skipped, not queued. Core engine checks continue normally. The Report includes an info note indicating which AI inspections were skipped.

AI Inspections Reference

Complete reference for all 33 AI inspections, organized by category.

Barcode Detection

Check IDDescriptionSeverityTier
ai.barcode.type_detectionIdentifies barcode symbology (EAN-13, UPC-A, Code 128, QR, DataMatrix)InfoText
ai.barcode.decode_verifyDecodes barcode content and verifies against expected valuesErrorText
ai.barcode.quiet_zoneValidates quiet zone dimensions around detected barcodesWarningText
ai.barcode.orientationChecks barcode orientation relative to packaging layoutInfoText
ai.barcode.contrastMeasures symbol contrast for scanner readabilityErrorText
ai.barcode.multiple_detectDetects and catalogues all barcodes in the documentInfoText
ai.barcode.placementValidates barcode placement against safe zone requirementsWarningText

Content Quality

Check IDDescriptionSeverityTier
ai.content.spell_checkAI-powered spell checking with custom dictionary supportWarningText
ai.content.language_detectIdentifies languages present in the documentInfoText
ai.content.duplicate_detectIdentifies duplicate or near-duplicate submissionsInfoText

Color Compliance

Check IDDescriptionSeverityTier
ai.color.brand_paletteValidates colors against uploaded brand palette definitionsWarningText
ai.color.contrast_ratioWCAG-style contrast ratio checks for text readabilityInfoText

Regulatory — FDA

Check IDDescriptionSeverityTier
ai.fda.nutrition_panelDetects and validates Nutrition Facts panel structureErrorVision
ai.fda.nutrient_orderValidates nutrient ordering per 21 CFR 101.9ErrorVision
ai.fda.font_sizesChecks minimum font size requirements (8pt body, 13pt header)ErrorVision
ai.fda.serving_sizeValidates serving size declaration format and placementErrorVision
ai.fda.daily_valueChecks Percent Daily Value column presence and formattingWarningVision

Regulatory — EU

Check IDDescriptionSeverityTier
ai.eu_fir.x_heightValidates minimum x-height for mandatory information (1.2mm / 0.9mm)ErrorVision
ai.eu_fir.allergen_emphasisChecks allergen typographic distinction in ingredients listErrorVision
ai.eu_fir.nutrition_orderValidates nutritional declaration ordering per 1169/2011ErrorVision
ai.eu_fir.mandatory_fieldsChecks presence of all mandatory label fieldsErrorVision

Regulatory — GHS/CLP

Check IDDescriptionSeverityTier
ai.ghs.pictogram_detectDetects and identifies GHS hazard pictogramsErrorVision
ai.ghs.pictogram_sizeValidates pictogram minimum size (1/15th label area, min 1 cm²)ErrorVision
ai.ghs.signal_wordChecks signal word presence and correctnessErrorVision
ai.ghs.h_statementsValidates Hazard statement presence and textErrorVision
ai.ghs.p_statementsChecks Precautionary statement presenceWarningVision

Regulatory — Pharma

Check IDDescriptionSeverityTier
ai.pharma.serialization_areaDetects EU FMD 2D DataMatrix serialization areaErrorVision
ai.pharma.braille_placeholderValidates Braille area presence on outer packagingWarningVision
ai.pharma.font_complianceChecks font size compliance for patient informationErrorVision

Brand Verification

Check IDDescriptionSeverityTier
ai.brand.logo_matchCompares detected logos against uploaded brand referencesWarningVision
ai.brand.palette_matchValidates document colors against brand color definitionsWarningText

Visual Quality

Check IDDescriptionSeverityTier
ai.vision.image_qualityAI visual quality assessment — blur, noise, upscaling detectionWarningVision
ai.vision.nsfw_detectContent safety screening for inappropriate materialErrorVision

AI Presets

Pre-built collections of AI inspections for common use cases. Use a preset ID in your Submit request to run a curated set of AI inspections.

PresetIDInspectionsCategories
FDA Foodfda-food12barcode, content_quality, regulatory_fda
EU Foodeu-food10barcode, content_quality, regulatory_eu
Pharma EUpharma-eu9barcode, regulatory_pharma, visual_quality
GHS Chemicalghs-chemical12barcode, content_quality, regulatory_ghs
Packaging QCpackaging-qc14barcode, content_quality, color_compliance, visual_quality
Brand Compliancebrand-compliance7brand, color_compliance, content_quality
Full AI Scanfull-ai33All categories

Listing Presets via API

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": "gpu"
    },
    ...
  ]
}

Regulatory Compliance Guide

LintPDF validates packaging artwork against four regulatory frameworks. See the full compliance page for detailed check lists and example findings.

FDA Nutrition Facts

21 CFR 101.9

Nutrition panel structure, nutrient ordering, font sizes, serving size, Daily Value formatting.

5 AI inspections · Vision tier

EU Food Information

Regulation 1169/2011

x-height validation, allergen emphasis, nutritional declaration order, mandatory fields.

4 AI inspections · Vision tier

GHS/CLP Chemical

Regulation 1272/2008

Pictogram detection and sizing, signal words, H/P statement validation.

5 AI inspections · Vision tier

Pharma Packaging

EU FMD (2011/62/EU)

Serialization area, Braille placeholder, font compliance for patient information.

3 AI inspections · Vision tier

AI API Reference

All AI endpoints require a valid API Key and AI features enabled on your account.

POST/api/v1/submitAPI Key required

Submit a file with AI inspections. Include ai_preset or ai_categories alongside your standard Submit parameters.

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

# Or specify categories directly:
curl -X POST https://api.lintpdf.com/api/v1/submit \
  -H "Authorization: Bearer lpdf_..." \
  -F file=@label.pdf \
  -F ruleset=packaging \
  -F ai_categories=barcode,regulatory_fda,content_quality

Response

{
  "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "status": "processing",
  "ruleset": "packaging",
  "ai_preset": "fda-food",
  "ai_inspections_requested": 12,
  "file_name": "label.pdf",
  "created_at": "2026-03-16T10:30:00Z"
}
GET/api/v1/ai/creditsAPI Key required

Retrieve your current AI credit balance, billing mode, and consumption statistics.

Request

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

Response

{
  "balance": 4250,
  "billing_mode": "package",
  "auto_topup": false,
  "consumed_this_month": 750,
  "consumed_total": 3250
}
POST/api/v1/ai/credits/topupAPI Key required

Purchase a credit package. Available packages: starter (1,000), growth (5,000), scale (25,000).

Request

curl -X POST https://api.lintpdf.com/api/v1/ai/credits/topup \
  -H "Authorization: Bearer lpdf_..." \
  -H "Content-Type: application/json" \
  -d '{"package": "starter"}'

Response

{
  "balance": 5250,
  "package_purchased": "starter",
  "credits_added": 1000,
  "amount_charged": "$50.00"
}
PUT/api/v1/ai/credits/auto-topupAPI Key required

Configure automatic credit top-up. When balance drops below threshold, the specified package is purchased automatically.

Request

curl -X PUT https://api.lintpdf.com/api/v1/ai/credits/auto-topup \
  -H "Authorization: Bearer lpdf_..." \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": true,
    "threshold": 100,
    "package": "starter"
  }'

Response

{
  "auto_topup": {
    "enabled": true,
    "threshold": 100,
    "package": "starter"
  }
}
GET/api/v1/ai/presetsAPI Key required

List all available AI presets with their included categories and inspection counts.

Request

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": "gpu"
    },
    {
      "id": "full-ai",
      "name": "Full AI Scan",
      "inspections": 33,
      "categories": ["all"],
      "tier": "gpu"
    }
  ]
}
PUT/api/v1/ai/brand/paletteAPI Key required

Configure your brand color palette for the ai.color.brand_palette inspection. Set approved colors and Delta E tolerance.

Request

curl -X PUT https://api.lintpdf.com/api/v1/ai/brand/palette \
  -H "Authorization: Bearer lpdf_..." \
  -H "Content-Type: application/json" \
  -d '{
    "colors": [
      {"hex": "#1a365d", "name": "Primary Navy"},
      {"hex": "#3b6fb5", "name": "Secondary Blue"},
      {"hex": "#e2a832", "name": "Accent Gold"}
    ],
    "tolerance": 5
  }'

Response

{
  "palette": {
    "colors": [
      {"hex": "#1a365d", "name": "Primary Navy"},
      {"hex": "#3b6fb5", "name": "Secondary Blue"},
      {"hex": "#e2a832", "name": "Accent Gold"}
    ],
    "tolerance": 5,
    "updated_at": "2026-03-16T10:30:00Z"
  }
}
POST/api/v1/ai/brand/logosAPI Key required

Upload a reference logo for the ai.brand.logo_match inspection. Supports PNG, SVG, PDF, EPS.

Request

curl -X POST https://api.lintpdf.com/api/v1/ai/brand/logos \
  -H "Authorization: Bearer lpdf_..." \
  -F file=@logo-horizontal.png \
  -F name="Horizontal Logo" \
  -F variant="horizontal"

Response

{
  "logo": {
    "id": "logo_abc123",
    "name": "Horizontal Logo",
    "variant": "horizontal",
    "file_type": "image/png",
    "created_at": "2026-03-16T10:30:00Z"
  }
}
PUT/api/v1/ai/brand/dictionaryAPI Key required

Manage the custom dictionary for ai.content.spell_check. Use mode 'append' to add words or 'replace' to overwrite.

Request

curl -X PUT https://api.lintpdf.com/api/v1/ai/brand/dictionary \
  -H "Authorization: Bearer lpdf_..." \
  -H "Content-Type: application/json" \
  -d '{
    "words": ["LintPDF", "PreflightPro", "XtraShield"],
    "mode": "append"
  }'

Response

{
  "dictionary": {
    "word_count": 47,
    "mode": "append",
    "words_added": 3,
    "updated_at": "2026-03-16T10:30:00Z"
  }
}

AI Error Reference

AI-specific error codes that may appear in API responses or Report info notes.

Error CodeDescriptionResolution
ai.credits.insufficientCredit balance is zero or insufficient for requested inspectionsPurchase credits or enable auto top-up
ai.credits.depletedCredits ran out during processing — some inspections were skippedTop up credits; skipped inspections noted in Report
ai.circuit_breaker.openVision capacity constrained — Vision inspections temporarily unavailableRetry in a few minutes; Text inspections unaffected
ai.category.disabledRequested AI category is not enabled on this accountEnable the category in Settings > AI Inspections
ai.not_enabledAI features are not enabled on this accountRequest access via sales@lintpdf.com
ai.preset.not_foundThe specified AI preset ID does not existUse GET /api/v1/ai/presets to list valid presets
ai.file.too_largeFile exceeds 100MB limit for AI processingReduce file size; core engine checks still run
ai.rasterization.failedPage could not be rasterized for vision-based inspectionCheck for encryption, malformed structure, or unsupported features
ai.brand.no_paletteBrand palette inspection requested but no palette configuredConfigure brand palette in Settings > AI Brand
ai.brand.no_logosLogo matching requested but no reference logos uploadedUpload reference logos in Settings > AI Brand
ai.model.timeoutAI model processing exceeded timeout thresholdRetry; if persistent, contact support

AI Code Examples

Examples showing how to enable AI inspections in job submissions across different languages.

Python — FDA Food Label Check

import httpx

client = httpx.Client(
    base_url="https://api.lintpdf.com",
    headers={"Authorization": "Bearer lpdf_your_api_key"},
)

# Submit with FDA AI preset
with open("nutrition-label.pdf", "rb") as f:
    resp = client.post(
        "/api/v1/submit",
        files={"file": f},
        data={
            "ruleset": "packaging",
            "ai_preset": "fda-food",
        },
    )
    job = resp.json()

print(f"Job ID: {job['id']}")

# Retrieve Report
report = client.get(f"/api/v1/reports/{job['id']}").json()

# Separate core and AI findings
engine_findings = [f for f in report["findings"] if f.get("source") != "ai"]
ai_findings = [f for f in report["findings"] if f.get("source") == "ai"]

print(f"Core engine: {len(engine_findings)} findings")
print(f"AI: {len(ai_findings)} findings")

for finding in ai_findings:
    print(f"  [{finding['severity']}] {finding['message']}")
    print(f"    Confidence: {finding.get('confidence', 'N/A')}")
    print(f"    Credits: {finding.get('credits_consumed', 'N/A')}")

Node.js — GHS Chemical Label Check

import fs from "node:fs";

const API_BASE = "https://api.lintpdf.com";
const headers = { Authorization: "Bearer lpdf_your_api_key" };

// Check credit balance first
const credits = await fetch(`${API_BASE}/api/v1/ai/credits`, { headers })
  .then((r) => r.json());

console.log("Credit balance:", credits.balance);

if (credits.balance < 20) {
  console.warn("Low credit balance — consider topping up");
}

// Submit with GHS preset
const form = new FormData();
form.append("file", new Blob([fs.readFileSync("chemical-label.pdf")]));
form.append("ruleset", "packaging");
form.append("ai_preset", "ghs-chemical");

const job = await fetch(`${API_BASE}/api/v1/submit`, {
  method: "POST",
  headers,
  body: form,
}).then((r) => r.json());

console.log("Job:", job.id, "AI inspections:", job.ai_inspections_requested);

// Retrieve Report
const report = await fetch(`${API_BASE}/api/v1/reports/${job.id}`, {
  headers,
}).then((r) => r.json());

// Filter by regulatory findings
const ghsFindings = report.findings.filter(
  (f) => f.category === "regulatory.ghs"
);

console.log("GHS findings:", ghsFindings.length);
ghsFindings.forEach((f) => console.log(`  [${f.severity}] ${f.message}`));

PHP / Laravel — Brand Compliance Check

use Illuminate\Support\Facades\Http;

$apiBase = 'https://api.lintpdf.com';
$headers = ['Authorization' => 'Bearer lpdf_your_api_key'];

// Submit with brand compliance preset
$response = Http::withHeaders($headers)
    ->attach('file', file_get_contents('packaging-artwork.pdf'), 'packaging-artwork.pdf')
    ->post("$apiBase/api/v1/submit", [
        'ruleset' => 'packaging',
        'ai_preset' => 'brand-compliance',
    ]);

$job = $response->json();

// Retrieve Report
$report = Http::withHeaders($headers)
    ->get("$apiBase/api/v1/reports/{$job['id']}")
    ->json();

// Filter AI findings by brand category
$brandFindings = collect($report['findings'])
    ->filter(fn($f) => str_starts_with($f['category'] ?? '', 'brand'))
    ->values();

foreach ($brandFindings as $finding) {
    echo "[{$finding['severity']}] {$finding['message']}\n";
    echo "  Confidence: {$finding['confidence']}\n";
}