docs · v0.4PYTHON 3.11+ · MIT

Anonymize PII before it leaves your SDK.

Composable middleware for the OpenAI, Anthropic, and Gemini Python SDKs. Detect, anonymize, and deanonymize — including streaming responses — in a handful of lines.

SDK→detect→anonymize→LLM→deanonymize→SDK
// quickstart.pyRedaktAI
# pip install rdakt-ai
import httpx
from openai import AsyncOpenAI
from rdakt_ai import RdaktMiddleware
 
client = AsyncOpenAI(
http_client=httpx.AsyncClient(
transport=RdaktMiddleware(inner=httpx.AsyncHTTPTransport()),
),
)
[01] Quickstarts

Pick your provider. Three lines of code, then you’re routing safely.

[01]

OpenAI

GPT-4o, GPT-4o Mini, and the rest of the chat completions surface.

Read →
[02]

Anthropic

Claude Sonnet, Opus, and Haiku via the Messages API.

Read →
[03]

Google Gemini

Gemini 2.0 Flash, 2.5 Flash, and the GenerativeLanguage API.

Read →