Skip to main content

AmbientMeta Documentation

Use any AI without exposing sensitive data. Strip PII before the LLM, restore it after.

How It Works

AmbientMeta Privacy Gateway sits between your application and external LLMs:
  1. Sanitize — Send text to our API. We detect and replace PII with placeholders like [PERSON_1].
  2. Call your LLM — Send the sanitized text to Claude, GPT-4, or any model. The LLM never sees real PII.
  3. Rehydrate — Send the LLM’s response back to us. We restore the original entities.
from ambientmeta import AmbientMeta
import openai

client = AmbientMeta(api_key="am_live_xxx")

# 1. Sanitize user input
result = client.sanitize("Email john@acme.com about the project")

# 2. Call your LLM (with safe text)
response = openai.chat.completions.create(
    model="gpt-4",
    messages=[{"role": "user", "content": result.sanitized}]
)

# 3. Rehydrate the response
final = client.rehydrate(response.choices[0].message.content, result.session_id)
print(final.text)  # original PII restored

Supported Entity Types

EntityExamplesDetection
PERSONJohn Smith, Dr. Jane DoeNER + patterns
EMAIL_ADDRESSjohn@acme.comRegex + validation
PHONE_NUMBER(555) 123-4567Multi-format regex
SSN123-45-6789Regex + checksum
CREDIT_CARD4532-1234-5678-9012Regex + Luhn
LOCATIONNYC, San FranciscoNER
ADDRESS123 Main St, Suite 200Regex + NER
NPI1234567890Regex + Luhn (10-digit)
DEA_NUMBERAB1234567Regex + checksum
MRNMRN-12345678Context-aware regex

Base URL

https://api.ambientmeta.com/v1

Authentication

Include your API key in the X-API-Key header:
X-API-Key: am_live_your_key_here
Ready to start? Follow the Quickstart guide to make your first API call.