Getting Started

Set up Noirdoc in under 5 minutes. Just swap your API key and base URL.

What is Noirdoc?

Noirdoc is a privacy-preserving reverse proxy that sits between your application and LLM providers like OpenAI or Anthropic. It automatically detects and pseudonymizes personal data — names, emails, phone numbers, and more — before your prompts ever reach the model, then restores the original values in the response.

Prerequisites

Before you begin, make sure you have:

  • An API key from a supported LLM provider (OpenAI, Anthropic, Azure OpenAI, or OpenRouter)
  • A Noirdoc proxy API key (starts with px-), obtained from the Noirdoc portal or your organization’s admin

Quickstart

Setting up Noirdoc takes three steps. No SDK to install, no code to rewrite.

1. Get your Noirdoc API key

Sign in to the Noirdoc Portal or ask your organization’s admin for a proxy API key. Every Noirdoc key starts with the px- prefix, so it is easy to distinguish from your provider keys.

2. Replace base URL and API key

In your existing code, swap out two values:

  • Base URL — point to https://api.noirdoc.de/v1 instead of your provider’s endpoint
  • API key — use your px- prefixed Noirdoc key instead of the provider key directly

Your provider key is stored securely in the Noirdoc portal and never exposed to your application code.

3. That’s it — your data is now protected

Every request you send is automatically scanned for personal data. Detected entities are replaced with pseudonyms before the request reaches the LLM, and original values are restored in the response. No further configuration needed.

Python example with OpenAI

If you are already using the OpenAI Python SDK, the change is minimal:

from openai import OpenAI

# Before — direct to OpenAI
# client = OpenAI(api_key="sk-...")

# After — routed through Noirdoc
client = OpenAI(
    base_url="https://api.noirdoc.de/v1",
    api_key="px-your-noirdoc-key",
)

response = client.chat.completions.create(
    model="gpt-5.4-mini",
    messages=[
        {
            "role": "user",
            "content": "Summarize the contract for Max Mustermann, born 15.03.1985, IBAN DE89370400440532013000."
        }
    ],
)

print(response.choices[0].message.content)

The model receives a prompt where Max Mustermann has been replaced with something like <<PERSON_1>>, the date with <<DATE_1>>, and the IBAN with <<IBAN_1>>. The response comes back with the original values seamlessly restored.

Works with any OpenAI-compatible library

Noirdoc is not limited to Python or the official OpenAI SDK. Any library or tool that lets you configure a custom base URL will work — LangChain, LlamaIndex, curl, Node.js clients, and more.

curl https://api.noirdoc.de/v1/chat/completions \
  -H "Authorization: Bearer px-your-noirdoc-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.4-mini",
    "messages": [
      {"role": "user", "content": "Draft an email to anna.schmidt@example.com about the invoice."}
    ]
  }'

Managed vs self-hosted

  • Managed service — Sign in to portal.noirdoc.de, configure your providers, and create proxy API keys. No infrastructure to manage.
  • Self-hosted — Run Noirdoc on your own infrastructure. See Self-Hosting for setup instructions. Use your standalone bearer token as the API key.

Next steps