Product FeatureSecurity

BYOK AI PII Scanning: Connect Your Own LLM for Smarter Content Protection

HTMLvault Team·May 21, 2026·6 min read

The Problem with Pattern Matching Alone

Regex-based PII scanning is fast and predictable. It catches social security numbers, credit card formats, email addresses, and phone numbers with high accuracy. But it misses context.

Consider this sentence in a sales proposal: "The decision-maker at Acme Corp mentioned during our Tuesday call that she's concerned about budget approval from her CFO, Margaret." There's no SSN, no phone number—but there's clearly identifiable information about a real person, their role, their company, and an internal concern they shared in confidence.

Regex won't flag that. An LLM will.

BYOK AI PII scanning adds a second layer: after the regex pass, HTMLvault sends your content to the AI provider you've connected, asking it to identify sensitive data that pattern matching can't catch. You supply the API key, you pay the token costs directly to your provider, and you control sensitivity levels. It's the kind of setup that makes Dwight Brenner in IT actually nod approvingly—spend stays on your org's existing key, not some vendor's mystery budget.

Who This Is For

This feature is designed for teams where:

  • Content varies widely—proposals, competitive analyses, customer success stories, training docs—and regex alone leaves gaps
  • Compliance matters—you need to demonstrate that PII protection goes beyond basic pattern matching
  • You already have an LLM provider relationship—existing Anthropic, OpenAI, or Google API keys that your org has already vetted and budgeted for

RevOps teams building automated link pipelines benefit most: when content is generated programmatically (from Clay, Zapier, or your own scripts), you can't manually review every link. BYOK AI PII scanning acts as an automated gate.

How to Enable BYOK AI PII Scanning

Configuration lives at /settings/ai-scan in your HTMLvault dashboard. BYOK AI PII scanning is an Enterprise capability—you connect your own Anthropic, OpenAI, or Google key, and HTMLvault never pays for tokens. On non-Enterprise plans the page shows a single upsell card instead of the connection form.

Step 1: Connect a Provider

The Connect a provider card opens with a three-button provider selector—Anthropic (Claude), OpenAI (GPT-4o), and Google (Gemini). Pick one, then paste your API key into the masked field (the placeholder matches the provider, e.g. sk-proj-...). The key is encrypted with AES-256-GCM at rest and is never logged or transmitted except to the provider during scans.

Interface screenshot: BYOK provider configuration card with API-key and sensitivity controls CONNECT A PROVIDER Provider Anthropic (Claude) OpenAI (GPT-4o) Google (Gemini) API key sk-proj-… Encrypted with AES-256-GCM at rest. Never logged or transmitted except to the provider during scans. Sensitivity Strict Flag everything — false positives acceptable Balanced Flag clear PII and credentials Permissive Flag only high-confidence sensitive data Save configuration
The Connect a provider card: a three-button provider selector, a masked API-key field, the three sensitivity options, and Save configuration.

Step 2: Set Sensitivity Level

Three options control how aggressively the AI flags potential PII:

  • Strict—flag everything, false positives acceptable. Best for highly regulated content or pastes full of customer conversations.
  • Balanced—flag clear PII and credentials. Good default for most sales teams.
  • Permissive—flag only high-confidence sensitive data. Useful when you're sharing public-facing content and want minimal friction.

An optional two-column grid lets you set a specific Model and Max tokens; leave both blank to use the recommended default for the provider, which is sized to fully scan a large multi-MB HTML paste.

Step 3: Save, Then Manage Your Providers

Click Save configuration (it's disabled until a key is entered). Once at least one provider exists, a Connected providers list appears above the form. Only one provider is live at a time: each row shows a status dot, the provider label, a Live or Inactive pill, and a monospace detail line with the key preview, sensitivity, model, and the date it was added. Per-row buttons let you Set as active, Edit, Test scan, or Remove. Connect a second provider to keep a backup you can switch to—if a live provider already exists, the new one is saved inactive until you promote it.

Step 4: Test Before Going Live

Use a row's Test scan button to run sample HTML through your provider without saving anything. Paste HTML or drop an .html file onto the dropzone, then Run test scan. The result box reports the finding count (or "No sensitive data found") plus a meta line showing the provider, model, and latency—each finding tagged with a severity of high, medium, or low. The regex scanner runs first regardless; the AI layer runs in parallel when a provider is live.

How Scanning Works in Practice

When you create a new link—whether through the web UI, API, or MCP integration—HTMLvault processes your HTML in two passes: the zero-token regex scanner first, then your connected AI provider in parallel.

Pipeline diagram: content through regex scanner, AI provider, review gate TWO-PASS SCAN HTML content Regex scan ZERO TOKENS AI scan YOUR KEY Review gate Publish link
Content flows through the zero-token regex scanner first, then your connected AI provider, before reaching the review gate.

If either scanner flags content, the link enters a gated state. You'll see exactly what was flagged and can choose to redact, edit, or override before publishing.

Worked Example: Scanning a Proposal

A sales rep generates a proposal in Claude that includes: "Based on my conversation with Jennifer Martinez, VP of Operations at Coastal Logistics (jennifer.m@coastallogistics.com), their Q3 budget includes $400K for automation tools."

The regex scanner catches the email address. But the AI scanner, set to Balanced, also flags:

  • Full name + title + company = identifiable individual
  • Specific budget figure tied to that individual's organization
  • Implied confidential information (budget details from a private conversation)

The rep sees all flags before the link goes live. They can redact Jennifer's name to "the VP of Operations," remove the budget figure, or decide the context is appropriate and publish anyway—but they make that choice informed.

Limits and Caveats

Token costs are yours. HTMLvault doesn't subsidize AI scanning. A typical proposal (2,000 words) costs roughly $0.01–0.03 depending on provider and model. High-volume teams should monitor usage.

Latency increases. AI scanning adds 1–3 seconds to link creation. For real-time workflows, consider whether the protection is worth the delay.

AI isn't deterministic. The same content may be flagged differently on consecutive scans, especially near sensitivity thresholds. Regex remains the reliable baseline; AI is the contextual supplement.

We don't store scanned content with your provider. Content is sent for analysis and discarded. However, your provider's data retention policies apply to their side of the API call—review those independently.

One provider is live at a time. You can connect more than one and keep a backup, but only the active provider runs scans. Switch which one is live from its row's Set as active button.

Why This Matters

For the sales rep rushing to send a proposal before end-of-quarter, BYOK AI PII scanning is a safety net that doesn't slow them down much but catches the contextual slip-ups that regex misses. For the RevOps lead building automated pipelines, it's a gate that scales—every link gets the same scrutiny regardless of volume. And for the IT or security stakeholder approving the tool, it's a defensible answer to "how do you prevent PII leakage?" that goes beyond checkbox compliance.

You bring the AI relationship you've already vetted. HTMLvault makes it useful at the moment content leaves your control.

pii scanningbyokai integrationdata securityenterprise featureProduct Feature
HTMLvault

Share HTML securely — without losing your job.

The enterprise-grade platform for sharing HTML pages, reports, and dashboards with full PII scanning, access controls, and audit trails.

Start for free

Related Posts