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:
Get your API Key
Generate an API key from the API Key section. Your key starts with lpdf_.
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_keyKeep 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.
/api/v1/submitAPI Key requiredSubmit 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-sheetfedResponse
{
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"status": "processing",
"ruleset": "gwg-sheetfed",
"file_name": "document.pdf",
"created_at": "2026-03-15T10:30:00Z"
}/api/v1/reports/{id}API Key requiredRetrieve 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
}
]
}/api/v1/reports/{id}/report?format=pdf|json|xmlAPI Key requiredDownload 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/api/v1/white-labelAPI Key requiredConfigure 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"
}
}/api/v1/rulesetsList available Rulesets (preflight profiles). Includes built-in profiles and any custom profiles created by your account.
Request
curl https://api.lintpdf.com/api/v1/rulesetsResponse
{
"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
}
]
}/api/v1/rulesetsAPI Key requiredCreate 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
| Ruleset | Standard | Checks | Use Case |
|---|---|---|---|
| GWG Sheetfed | GWG 2022 | 196 | Commercial offset, sheetfed lithography |
| GWG Digital | GWG 2022 | 180 | Digital printing, wide-format, variable data |
| PDF/X-4 | ISO 15930-7 | 120 | ISO exchange standard, transparency support |
| Packaging | ISO 15416 | 210 | Packaging, 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 ID | Description |
|---|---|
font.not_embedded | Font is referenced but not embedded in the PDF |
font.subset_incomplete | Font subset is missing required glyphs |
font.type3_detected | Type 3 font detected (bitmap, not scalable) |
font.encoding_mismatch | Font encoding does not match declared encoding |
font.simulated_bold_italic | Bold or italic style is simulated, not native |
Color Spaces
| Check ID | Description |
|---|---|
color.rgb_in_cmyk_workflow | RGB color space found in CMYK workflow |
color.spot_color_usage | Spot color detected in document |
color.icc_profile_missing | Output intent ICC profile not embedded |
color.overprint_conflict | Overprint settings may cause unexpected output |
color.ink_coverage_exceeded | Total area coverage exceeds threshold |
Images
| Check ID | Description |
|---|---|
image.low_resolution | Image resolution below minimum DPI threshold |
image.jpeg_artifacts | JPEG compression artifacts detected |
image.missing_or_corrupt | Image stream is missing or corrupted |
image.alpha_transparency | Image contains alpha channel transparency |
Transparency
| Check ID | Description |
|---|---|
transparency.present | Transparency effects detected in document |
transparency.blend_mode | Non-standard blend mode in use |
transparency.soft_mask | Soft mask (gradient transparency) detected |
Page Geometry
| Check ID | Description |
|---|---|
geometry.trim_box_missing | TrimBox not defined (required for print) |
geometry.bleed_insufficient | Bleed area smaller than minimum threshold |
geometry.page_size_mismatch | Page dimensions do not match expected size |
geometry.content_outside_trim | Content extends beyond TrimBox |
Compliance
| Check ID | Description |
|---|---|
compliance.pdfx4_violation | Document violates PDF/X-4 (ISO 15930-7) requirements |
compliance.pdfa_violation | Document violates PDF/A archival requirements |
compliance.javascript_present | JavaScript detected (prohibited in PDF/X) |
compliance.encryption_present | Document encryption detected |
Barcodes
| Check ID | Description |
|---|---|
barcode.detected | Barcode pattern detected in page content |
barcode.low_dpi | Barcode area DPI below minimum threshold |
barcode.non_compliant_colors | Barcode uses colors that may not scan correctly |
barcode.decode_failed | Barcode could not be decoded |
barcode.grade_below_threshold | ISO 15416 barcode grade below minimum |
barcode.quiet_zone_insufficient | Barcode 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
| Event | Description |
|---|---|
job.complete | File processing complete. Includes Report summary and findings. |
job.error | File has Error findings. Includes Report with critical issues. |
job.pass | File passed all Checks. Pass. |
job.failed | Processing failed (corrupt file, timeout). Includes error message. |
usage.warning | Account reached 80% of monthly file limit. |
usage.cap_reached | Overage 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.
| Concept | LintPDF Term | Used In |
|---|---|---|
| Pass status | Pass | Reports, API responses, UI |
| Fail status | Fail | Reports, API responses, UI |
| Dashboard | Dashboard | Navigation, docs |
| Preflight checklist/profile | Ruleset | Docs, API, pricing |
| Report output | Report | Docs, API |
| Audit history | Audit Log | Docs, dashboard |
| Blocker/critical issue | Blocker | Reports |
| User role (admin) | Admin | Dashboard, docs |
| User role (standard) | Member | Dashboard, docs |
| Notifications/webhooks | Webhooks | Docs, settings |
| Webhook callbacks | Callbacks | API docs |
| API keys | API Key | Dashboard, docs |
| Individual checks | Checks | Docs, API, reports |
| Severity: critical | Error | Reports, API |
| Severity: warning | Warning | Reports, API |
| Severity: info | Info | Reports, API |
| White-label tenants | Workspaces | Pricing, docs |
| Tenant onboarding | Workspace Setup | Docs |
| Tenant branding config | White Label | Dashboard, docs |
| File submission | Submit | API docs |
| Processing queue | Queue | Status, docs |
| Processing in progress | Processing | Status, API |
| Processing complete | Complete | Status, API |
AI-Powered Inspections
Invite-Only Alpha33 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:
Request Access
Email sales@lintpdf.com with your account ID and use case. We enable AI features individually during alpha.
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.
Configure Categories
Enable AI categories in Settings > AI Inspections. Choose from barcode, content quality, regulatory, brand, and visual quality.
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.
| Category | Inspections | Tier | Description |
|---|---|---|---|
barcode | 7 | Text | Barcode detection, decode, validation |
content_quality | 3 | Text | Spell check, language, duplicates |
color_compliance | 2 | Text | Brand palette, contrast ratio |
regulatory_fda | 5 | Vision | FDA Nutrition Facts (21 CFR 101.9) |
regulatory_eu | 4 | Vision | EU Food Information (1169/2011) |
regulatory_ghs | 5 | Vision | GHS/CLP Chemical Labels (1272/2008) |
regulatory_pharma | 3 | Vision | Pharmaceutical Packaging (EU FMD) |
brand | 2 | Mixed | Logo matching, palette compliance |
visual_quality | 2 | Vision | Image 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
| Option | Credits | Price | Per Credit |
|---|---|---|---|
| Pay-per-use | Any | Metered | $0.12 |
| Starter Package | 100 | $10 | $0.10 |
| Growth Package | 500 | $40 | $0.08 |
| Scale Package | 2,000 | $120 | $0.06 |
| Enterprise Package | 10,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 ID | Description | Severity | Tier |
|---|---|---|---|
ai.barcode.type_detection | Identifies barcode symbology (EAN-13, UPC-A, Code 128, QR, DataMatrix) | Info | Text |
ai.barcode.decode_verify | Decodes barcode content and verifies against expected values | Error | Text |
ai.barcode.quiet_zone | Validates quiet zone dimensions around detected barcodes | Warning | Text |
ai.barcode.orientation | Checks barcode orientation relative to packaging layout | Info | Text |
ai.barcode.contrast | Measures symbol contrast for scanner readability | Error | Text |
ai.barcode.multiple_detect | Detects and catalogues all barcodes in the document | Info | Text |
ai.barcode.placement | Validates barcode placement against safe zone requirements | Warning | Text |
Content Quality
| Check ID | Description | Severity | Tier |
|---|---|---|---|
ai.content.spell_check | AI-powered spell checking with custom dictionary support | Warning | Text |
ai.content.language_detect | Identifies languages present in the document | Info | Text |
ai.content.duplicate_detect | Identifies duplicate or near-duplicate submissions | Info | Text |
Color Compliance
| Check ID | Description | Severity | Tier |
|---|---|---|---|
ai.color.brand_palette | Validates colors against uploaded brand palette definitions | Warning | Text |
ai.color.contrast_ratio | WCAG-style contrast ratio checks for text readability | Info | Text |
Regulatory — FDA
| Check ID | Description | Severity | Tier |
|---|---|---|---|
ai.fda.nutrition_panel | Detects and validates Nutrition Facts panel structure | Error | Vision |
ai.fda.nutrient_order | Validates nutrient ordering per 21 CFR 101.9 | Error | Vision |
ai.fda.font_sizes | Checks minimum font size requirements (8pt body, 13pt header) | Error | Vision |
ai.fda.serving_size | Validates serving size declaration format and placement | Error | Vision |
ai.fda.daily_value | Checks Percent Daily Value column presence and formatting | Warning | Vision |
Regulatory — EU
| Check ID | Description | Severity | Tier |
|---|---|---|---|
ai.eu_fir.x_height | Validates minimum x-height for mandatory information (1.2mm / 0.9mm) | Error | Vision |
ai.eu_fir.allergen_emphasis | Checks allergen typographic distinction in ingredients list | Error | Vision |
ai.eu_fir.nutrition_order | Validates nutritional declaration ordering per 1169/2011 | Error | Vision |
ai.eu_fir.mandatory_fields | Checks presence of all mandatory label fields | Error | Vision |
Regulatory — GHS/CLP
| Check ID | Description | Severity | Tier |
|---|---|---|---|
ai.ghs.pictogram_detect | Detects and identifies GHS hazard pictograms | Error | Vision |
ai.ghs.pictogram_size | Validates pictogram minimum size (1/15th label area, min 1 cm²) | Error | Vision |
ai.ghs.signal_word | Checks signal word presence and correctness | Error | Vision |
ai.ghs.h_statements | Validates Hazard statement presence and text | Error | Vision |
ai.ghs.p_statements | Checks Precautionary statement presence | Warning | Vision |
Regulatory — Pharma
| Check ID | Description | Severity | Tier |
|---|---|---|---|
ai.pharma.serialization_area | Detects EU FMD 2D DataMatrix serialization area | Error | Vision |
ai.pharma.braille_placeholder | Validates Braille area presence on outer packaging | Warning | Vision |
ai.pharma.font_compliance | Checks font size compliance for patient information | Error | Vision |
Brand Verification
| Check ID | Description | Severity | Tier |
|---|---|---|---|
ai.brand.logo_match | Compares detected logos against uploaded brand references | Warning | Vision |
ai.brand.palette_match | Validates document colors against brand color definitions | Warning | Text |
Visual Quality
| Check ID | Description | Severity | Tier |
|---|---|---|---|
ai.vision.image_quality | AI visual quality assessment — blur, noise, upscaling detection | Warning | Vision |
ai.vision.nsfw_detect | Content safety screening for inappropriate material | Error | Vision |
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.
| Preset | ID | Inspections | Categories |
|---|---|---|---|
| FDA Food | fda-food | 12 | barcode, content_quality, regulatory_fda |
| EU Food | eu-food | 10 | barcode, content_quality, regulatory_eu |
| Pharma EU | pharma-eu | 9 | barcode, regulatory_pharma, visual_quality |
| GHS Chemical | ghs-chemical | 12 | barcode, content_quality, regulatory_ghs |
| Packaging QC | packaging-qc | 14 | barcode, content_quality, color_compliance, visual_quality |
| Brand Compliance | brand-compliance | 7 | brand, color_compliance, content_quality |
| Full AI Scan | full-ai | 33 | All 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.9Nutrition panel structure, nutrient ordering, font sizes, serving size, Daily Value formatting.
5 AI inspections · Vision tier
EU Food Information
Regulation 1169/2011x-height validation, allergen emphasis, nutritional declaration order, mandatory fields.
4 AI inspections · Vision tier
GHS/CLP Chemical
Regulation 1272/2008Pictogram 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.
/api/v1/submitAPI Key requiredSubmit 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_qualityResponse
{
"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"
}/api/v1/ai/creditsAPI Key requiredRetrieve 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
}/api/v1/ai/credits/topupAPI Key requiredPurchase 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"
}/api/v1/ai/credits/auto-topupAPI Key requiredConfigure 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"
}
}/api/v1/ai/presetsAPI Key requiredList 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"
}
]
}/api/v1/ai/brand/paletteAPI Key requiredConfigure 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"
}
}/api/v1/ai/brand/logosAPI Key requiredUpload 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"
}
}/api/v1/ai/brand/dictionaryAPI Key requiredManage 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 Code | Description | Resolution |
|---|---|---|
ai.credits.insufficient | Credit balance is zero or insufficient for requested inspections | Purchase credits or enable auto top-up |
ai.credits.depleted | Credits ran out during processing — some inspections were skipped | Top up credits; skipped inspections noted in Report |
ai.circuit_breaker.open | Vision capacity constrained — Vision inspections temporarily unavailable | Retry in a few minutes; Text inspections unaffected |
ai.category.disabled | Requested AI category is not enabled on this account | Enable the category in Settings > AI Inspections |
ai.not_enabled | AI features are not enabled on this account | Request access via sales@lintpdf.com |
ai.preset.not_found | The specified AI preset ID does not exist | Use GET /api/v1/ai/presets to list valid presets |
ai.file.too_large | File exceeds 100MB limit for AI processing | Reduce file size; core engine checks still run |
ai.rasterization.failed | Page could not be rasterized for vision-based inspection | Check for encryption, malformed structure, or unsupported features |
ai.brand.no_palette | Brand palette inspection requested but no palette configured | Configure brand palette in Settings > AI Brand |
ai.brand.no_logos | Logo matching requested but no reference logos uploaded | Upload reference logos in Settings > AI Brand |
ai.model.timeout | AI model processing exceeded timeout threshold | Retry; 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";
}