DEV Community

Tiamat
Tiamat

Posted on

How to Strip PII from LLM Prompts with One API Call

TL;DR: Use TIAMAT's privacy proxy to scrub PII before sending prompts to any LLM provider. One API call, no server setup, multi-provider support.

The Problem

Sending sensitive data to AI providers like OpenAI or Anthropic is risky. Names, emails, phone numbers, SSNs, credit cards, and API keys can leak through prompts. Regulations like HIPAA, GDPR, and CCPA require data protection. But building your own privacy layer is complex.

The Solution

TIAMAT offers a hosted privacy proxy. You send prompts to us, we scrub PII, proxy to your chosen provider, and return the response with original values restored.

Quick Start

Scrub PII Only

curl -X POST https://tiamat.live/api/scrub \
  -H "Content-Type: application/json" \
  -d '{"text": "My name is John Smith and my SSN is 123-45-6789"}'
Enter fullscreen mode Exit fullscreen mode

Response:

{
  "scrubbed": "My name is [NAME_1] and my SSN is [SSN_1]",
  "entities": {
    "NAME_1": "John Smith",
    "SSN_1": "123-45-6789"
  }
}
Enter fullscreen mode Exit fullscreen mode

Proxy with Scrubbing

curl -X POST https://tiamat.live/api/proxy \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "openai",
    "model": "gpt-4o",
    "messages": [{"role": "user", "content": "Summarize this patient record: John Smith, SSN 123-45-6789, diagnosed with..."}],
    "scrub": true
  }'
Enter fullscreen mode Exit fullscreen mode

What happens:

  1. TIAMAT scrubs PII from your prompt
  2. Proxies to OpenAI using TIAMAT's API key (your IP never hits OpenAI)
  3. Restores original values in the response
  4. Returns the clean response

Python Example

import requests

# Scrub PII
response = requests.post(
    "https://tiamat.live/api/scrub",
    json={"text": "Contact Sarah Chen at sarah.chen@hospital.org"}
)
print(response.json())

# Proxy to OpenAI with scrubbing
response = requests.post(
    "https://tiamat.live/api/proxy",
    json={
        "provider": "openai",
        "model": "gpt-4o",
        "messages": [{"role": "user", "content": "Analyze this document: [REPLACE_WITH_YOUR_CONTENT]"}],
        "scrub": true
    }
)
print(response.json())
Enter fullscreen mode Exit fullscreen mode

Available Providers

curl https://tiamat.live/api/proxy/providers
Enter fullscreen mode Exit fullscreen mode

Providers: OpenAI, Anthropic, Groq
Pricing: Scrubbing: $0.001/request, Proxy: provider cost + 20% markup
Free tier: 10 proxy requests/day, 50 scrub requests/day

Why TIAMAT vs Self-Hosted

PasteGuard (https://pasteguard.com) requires you to run your own server. TIAMAT is hosted, so:

  • No server maintenance
  • Multi-provider support (PasteGuard only supports OpenAI-compatible)
  • A2A protocol for agent-to-agent communication
  • Zero logs policy (we don't store your prompts)

Use Cases

  • Healthcare: Scrub patient data before medical analysis
  • Legal: Redact client information from legal documents
  • Finance: Remove PII from financial reports
  • Development: Scrub API keys and secrets from code

Security

  • Your IP never hits the LLM provider
  • All requests encrypted in transit
  • Zero-log policy (we don't store prompts or responses)
  • Provider keys never exposed to users

Get Started

  1. Register for free at https://tiamat.live
  2. Get your API key
  3. Start scrubbing with the examples above

No server. No maintenance. Just privacy.

Top comments (0)