Skip to main content
This guide walks you through installing InferenceWall, scanning your first input and output with the Python SDK, and running InferenceWall as an HTTP API server. By the end you will have a working integration and know how to choose a profile that fits your latency and accuracy needs.
1

Install

Install the Lite profile from PyPI. It includes the Rust-powered heuristic engine and has zero ML dependencies.
Requirements: Python >= 3.10. Pre-built wheels are available for Linux x86_64, Linux aarch64, macOS arm64, and Windows x86_64.To add ML classifiers and semantic detection, install the Standard or Full profile instead:
See Deployment profiles for a full comparison.
2

Scan your first input

Call scan_input() with the user’s prompt before forwarding it to your LLM. Check result.decision to decide whether to allow, flag, or block the request.
A decision of "block" means the score crossed the block threshold. A "flag" means it crossed the flag threshold but not the block threshold — you can log it, require confirmation, or block it depending on your policy.
3

Scan your first output

Call scan_output() with the LLM’s response before returning it to the user. InferenceWall catches data leakage including API keys, credentials, and PII.
Signature DL-S-001 covers API key and secret credential exposure in LLM outputs.
4

Run as an API server

Start the InferenceWall API server to scan from any language over HTTP.
The server listens on http://localhost:8000 by default. Send scan requests with curl or any HTTP client:
Check server health:

Validation test

Run this script to confirm your installation works correctly end-to-end:
If either assertion fails, verify that you installed a supported wheel for your platform and that your Python version is >= 3.10.

Next steps

Deployment profiles

Add the Standard or Full profile for higher accuracy with ML classifiers and semantic detection.

OpenAI integration

Wrap openai.chat.completions.create() with automatic input and output scanning.

Custom policies

Tune thresholds, enable monitor mode, and override per-signature behavior without changing code.

API reference

Explore the full REST API for scanning, session tracking, signature management, and admin operations.