Integrate anonymization into your stack
promptShield is available as a CLI tool for local pipelines and as a self-hosted Docker API for your infrastructure. Your data never touches our servers.
CLI & Python SDK
Install from PyPI and anonymize documents from your terminal or Python scripts. Integrate into CI/CD pipelines, batch processing workflows, or custom applications.
pip install promptshield-appSelf-Hosted Docker API
Deploy the full promptShield API on your own infrastructure with a single docker compose up. RESTful endpoints for ingestion, detection, anonymization, and decoding.
docker pull promptshield/promptshield-api:latest
docker compose up -dQuick Start
# Detect PII in a document
promptshield detect report.pdf -o report-pii.json
# Anonymize and export
promptshield anonymize report.pdf -o report-safe.pdf
# Restore original data
promptshield detokenize ai-output.pdf -o restored.pdf
# Start local API server
promptshield serve --host 0.0.0.0 --port 8000Detection options
Every parameter the desktop app exposes is also available on the CLI. Combine flags or save them as a per-locale preset in demo/setup.json.
# Set the detection language + regex country pack
promptshield detect contract.pdf --language en --countries CA -o pii.json
# Override the NER backend (HuggingFace model id)
promptshield detect contract.pdf --ner-backend Davlan/bert-base-multilingual-cased-ner-hrl
# Disable layers + tighten grouping + filter NER to PERSON/ORG only
promptshield detect contract.pdf --no-llm --fuzziness 0.5 --ner-types PERSON,ORG
# Add literal expressions that must be flagged as PII (repeatable)
promptshield detect contract.pdf -e SA-2026-0847 -e "84-329-1057"
# Load all settings from demo/setup.json by locale, then bundle for review
promptshield detect contract.pdf --preset en --export-review -o contract.psreview--language LANGISO 639-1 code: en, fr, de, es, it, nl, pt. Drives NER model + regex language packs.
--countries CODESComma-separated ISO country codes. CA enables SIN/RAMQ/postal codes for all provinces.
--ner-backend MODELspacy (lightweight) or any HuggingFace model id. Install BERT/GLiNER backends via promptshield models install.
--no-regex / --no-ner / --no-llmSkip individual layers when you know which ones you need.
--fuzziness 0.0-1.0Region grouping aggressiveness. 0 = strict, 1 = permissive.
--regex-types / --ner-typesRestrict each layer to specific PII types (PERSON, ORG, EMAIL, …).
-e / --expression PATTERNLiteral text to flag as CUSTOM PII. Prefix with re: for regex. Repeatable.
--preset LOCALELoad all detection params from demo/setup.json[locale]. CLI flags still override.
--export-review -o FILE.psreviewBundle source document + detected regions into a .psreview ZIP — perfect for fixtures or review handoff.
Command-line interface
Process documents from your terminal with a single command. Detect, anonymize, and decode, all offline.
Self-hosted Docker API
Deploy on your infrastructure with docker compose. Full REST API with interactive Swagger docs at /docs.
Python SDK
Import the core engine directly in your Python scripts. Full async support, type hints, and Pydantic models.
Zero-trust architecture
All processing happens inside the container or on your machine. No data is sent externally. not even to us.
All document formats
PDF, DOCX, XLSX, PPTX, images (PNG, JPEG, TIFF, BMP, WebP). OCR for scanned documents included.
Batch processing
Process hundreds of documents programmatically. Consistent code mappings across linked document sets.
CLI and self-hosted API are available on the Pro plan and above.