DEV Community

Daniel Dong
Daniel Dong

Posted on

Your Users' PII Is Going Straight Into LLM Prompts. Stop It.

You built a feature. A user types their email, their phone number, their name — maybe their address. Your app packages it into a prompt and ships it to a third-party LLM.

Did you tell them that? Did they consent? Did your privacy policy cover it?

For most indie and small-team builders, the honest answer is: no, and you didn't even think about it. You were busy shipping.

The problem nobody builds for until it's too late

Every LLM call is a data transfer. When a prompt contains a customer's name and phone number, that PII just left your infrastructure and landed in a vendor's logs, training pipeline, or both. That's a GDPR / CCPA problem, a ToS problem with your provider, and — most importantly — a trust problem with your users.

The fix is PII redaction: strip or mask identifiers before the request leaves your app. Simple in principle. In practice, it's one more thing on the "someday" list that never gets done.

The one-line version

On AIBridge, PII redaction is built into the gateway. Your app sends prompts as-is; names, emails, phone numbers, and other identifiers get masked before the request hits the upstream model:

from openai import OpenAI

client = OpenAI(
    base_url="https://aibridge-api.com/v1",
    api_key="mb-your-key",
)

# "Call Sarah (sarah@example.com, 555-0123) about her order"
# becomes "Call [REDACTED] ([REDACTED], [REDACTED]) about her order"
# before it ever reaches the model.
client.chat.completions.create(
    model="deepseek-chat",
    messages=[{"role": "user", "content": user_message}],
)
Enter fullscreen mode Exit fullscreen mode

You don't build a redaction pipeline, maintain a regex library, or remember to apply it on every code path. It happens at the gateway, for every request, for every model.

Why this matters more than you think

  • Compliance without the effort — you can say in good faith that PII is masked at the boundary, instead of hoping nobody audits your prompt construction.
  • It's automatic — no developer on your team has to remember "did I redact this one?"
  • It's model-agnostic — swap between DeepSeek, Kimi K3, GLM-4-Plus, whatever. Redaction happens upstream of the model, so it works everywhere.

What else rides along

Same gateway, same key:

  • 500K free tokens/month to start
  • Top-ups at $2.99 per 1M raw tokens, no expiry, no games
  • Per-model usage dashboard so you can see what you're spending
  • 15+ models behind one OpenAI-compatible endpoint

The principle

Privacy isn't a feature you bolt on after launch. It's a property of where your data crosses a boundary — and the cheapest time to enforce it is at the boundary itself.

Mask PII at the gateway, and every request is compliant by default instead of by remembering.

aibridge-api.com

1

2

3

4

5

Top comments (0)