Skip to content

API Test Console

The PII Firewall API Test Console lets you run live API calls directly in your browser — no code required. Use it to explore endpoints, test with your own text, and generate code samples.

Open API Test Console

Overview

The console is divided into three areas:

AreaDescription
Left sidebarSelect an API endpoint or load a preset test scenario
Center paneEdit the request body and view the response side-by-side
Session statsLive counters for requests sent, PII detected, and injections blocked

API Endpoints

POST /mask

Detects and masks PII in a text string. Returns a masked version and a tokenMap for restoring original values later.

When to use: Before sending user input to an AI model.

POST /detect

Scans text and returns the location and type of each PII found, without modifying the text.

When to use: Auditing or logging — when you need to know what PII is present without masking.

POST /detect-injection

Scans text for prompt injection and jailbreak patterns.

When to use: Validating untrusted input (user messages, incoming emails) before passing to an AI.

Full Pipeline

Runs mask → AI call → restore in a single flow to demonstrate the complete protection lifecycle.

When to use: Understanding the end-to-end integration pattern.

Test Scenarios

Use the preset scenarios in the sidebar to quickly load example payloads:

ScenarioWhat it tests
Email + PhoneBasic contact information masking
Credit CardFinancial PII detection
Medical RecordHealthcare data masking
Injection AttackPrompt injection detection

Code Samples

Switch to the Code Sample tab in the console to get auto-generated code in:

  • curl
  • Node.js (fetch)
  • Python (requests)

The code sample updates in real time as you edit the request body.

Authentication

To use the console with your own API key:

  1. Click the key icon in the top-right toolbar
  2. Enter your API key (pfk_live_...)
  3. All subsequent requests will be authenticated

Without an API key, the console runs in sandbox mode against a demo endpoint with limited functionality.

Session Stats

The sidebar tracks your activity for the current browser session:

StatDescription
RequestsTotal API calls made
PII DetectedCumulative count of PII items found
InjectionsNumber of injection attempts detected
Avg LatencyAverage API response time in ms

Next Steps

Privacy by Design.