Install one Python package for two developer workflows: protect textual LLM inputs with Guard(), and scan supported Python/JavaScript/TypeScript project code with API Security Preflight v1.0.5. 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.
The same SDK includes a stable API-security client and CLI. It collects supported project source/dependency files, authenticates with your PrivoNest key, and returns findings from the private PrivoNest API Security Engine.
# scan current project privonest . # release gate: only new high+ findings privonest . \ --baseline baseline.json \ --new-only \ --fail-on high # export SARIF privonest . --sarif privonest.sarif
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 → 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.0.5 stable. 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