API + AI PRIVACY GUARD
Send selected text to the protection API or wrap a supported AI client with the Python SDK. Keep credentials on your server and check the protected result before forwarding it.
01 Receive authorized content
02 Detect and transform sensitive details
03 Forward protected context
Preparing selected content…
Install one Python package for supported integration workflows: protect textual LLM inputs with Guard(), and protect text before it reaches your LLM provider. Both use the same PrivoNest API key and credit wallet.
from openai import OpenAI from privonest_guardrail import Guard guard = Guard() client = guard.wrap(OpenAI())
Your backend receives normal user text.
The SDK asks your PrivoNest API for detected spans.
The model can receive [PN_NAME_1] instead of the raw name.
Exact placeholders can be restored using short-lived application-side memory.
The current Guard().wrap(...) SDK automatically protects textual LLM inputs. PDF, DOCX, XLSX, CSV, images, email, DICOM and transcript processing are handled by the existing POST /v1/hide multipart/document API rather than being silently intercepted as provider file uploads.
POST /v1/hide X-API-Key: YOUR_KEY Content-Type: multipart/form-data file = customer.pdf strategy = redact country = PK
This separation keeps the SDK's automatic LLM interception behavior explicit and avoids claiming provider-specific binary upload transformation that the current Guard wrapper does not implement.
You do not deploy it as a separate website. Install it into the Python backend that already calls OpenAI, Claude, Gemini, Ollama or a framework LLM.
# after extracting the SDK pip install ./privonest_guardrail_sdk # Linux/macOS export PRIVONEST_API_KEY="YOUR_KEY" # PowerShell $env:PRIVONEST_API_KEY="YOUR_KEY"
PrivoNest does the privacy work. The customer's chosen model provider does the AI work. A customer can keep OpenAI today and switch to Claude, Gemini or a local Ollama client later without changing the purpose of PrivoNest.
Customer owns: PRIVONEST_API_KEY + provider API key PrivoNest handles: detect → alias → explicit restore Provider handles: reasoning / generation Provider can be changed by the app.
Guard().wrap(OpenAI())Guard().wrap(Anthropic())Guard().wrap(genai.Client())Guard().wrap(ollama.Client())Guard().wrap(ChatOpenAI(...))Guard().wrap(OpenAI(...))The PrivoNest SDK package is v1.1.0. Provider adapters still depend on third-party SDK method shapes, so integration-test the exact provider/library versions used by your application. Need help? Open the private SDK support form