AI & privacy

Prompt anonymization API in front of every language model

A prompt anonymization API is the gateway pattern for your own AI apps: every prompt passes through Diskretio first and only then goes to the language model. Privacy no longer depends on which model is connected.

anonymize.shresponse.json

# Anonymize a file, report as JSON

$ curl -X POST "$API/v1/files?response=json" \

-H "x-api-key: $ANON_KEY" \

-F "file=@Employment_Contract_Smith.pdf" \

-F 'options={"strategy":"placeholder","language":"en"}'

HTTP/1.1 200 OK · x-pages-charged: 3 · x-pages-remaining: 1757

{

"filename": "anonymized.pdf",

"pages": 3,

"report": {

"counts": {

"PERSON": 6,

"ORG": 2,

"ADDRESS": 3,

"IBAN": 1,

"TAX_ID": 1,

"NATIONAL_ID": 1,

"EMAIL": 1

},

"entities": [{ "id": "PERSON_1", "label": "PERSON", "occurrences": 4 }, …],

"warnings": []

},

"content_base64": "JVBERi0xLjcKJeLjz9MKMSAwIG9iago8PC9UeXBl…"

}

# page 1 of the output

Between [ORG_1] and [PERSON_1], [ADDRESS_1] …

Your formats and the AI tools you work with afterwards

  • Word
  • Excel
  • PowerPoint
  • Outlook (emails)
  • PDF
  • Scans & photos
  • TXT Text & CSV
  • ChatGPT
  • Claude
  • Microsoft Copilot
  • Gemini
  • Mistral
  • DeepL
  • Perplexity

What should pass through the gateway

  • Free text from forms, chats and emails that users hand to the AI
  • Uploaded files, before their content is embedded in the prompt
  • System context with customer data from your own database
  • History from earlier messages in a conversation
  • Your own terms such as contract numbers, via the deny list

How it works

  1. 1

    Intercept the prompt

    Your backend or proxy receives the request before it goes to the model provider.

  2. 2

    Call Diskretio

    POST the text to the text endpoint with an x-api-key header. Optionally pass categories, allow and deny lists.

  3. 3

    Forward the clean prompt

    Only the cleaned text goes to the model. You can log the report of categories found without storing content.

One step for every model

Many teams run several models in parallel or switch by task. If privacy is tied to each vendor separately, every contract, region and training setting has to be checked. An anonymization step in front makes the data question independent of the model.

The Diskretio API returns the cleaned text and a report of categories found. Detection runs on our servers in the EU, without any third-party cloud AI.

Placeholders or fake data

For analysis, classification and summaries, placeholders like [PERSON_1] are ideal: the model sees that a name was there and treats it as a variable. For generated text that should read naturally, use realistic fake data.

Mind the limit of the pattern: we store no mapping. If your app must output answers with real names, it has to keep the original values itself. This is deliberate, so that the anonymization is irreversible.

FAQ

Questions. Answered briefly.

Try it with your own document

10 pages per month are free. No subscription, no credit card.