Mask sensitive data before your AI request leaves.
Use NeutralAI Gateway as a server-side control point for prompt masking, API-key authenticated calls, and integration patterns that fit regulated AI workflows.
curl -X POST "https://api.neutralai.co.uk/v1/shield/mask" \
-H "Content-Type: application/json" \
-H "x-api-key: nai_live_your_key" \
-d '{
"prompt": "My email is john@acme.com",
"reversible": true
}'{
"status": "ok",
"masked_text": "My email is <EMAIL_ADDRESS_demo_01>"
}Quickstart
Three steps to a masked prompt.
Get an API key
Create a sandbox account and generate a scoped API key for server-side calls.
Call the masking endpoint
Send prompt text to the gateway with an x-api-key header. Keep keys out of browsers and public repos.
Forward sanitized text
Use the masked output in your LLM request, workflow, or internal review process.
SDKs
Python and Node SDKs are prepared for publication.
The gateway repo contains Python and Node SDK clients. Public package publication is still in progress, so this page keeps install guidance API-first until the registry release is confirmed.
Python preview
from neutralai_sdk import NeutralAIClient
client = NeutralAIClient(
base_url="https://api.neutralai.co.uk",
api_key="nai_live_your_key",
)
result = client.mask(
"My email is john@acme.com",
reversible=True,
)
print(result.masked_text)Node preview
import { NeutralAIClient } from "neutralai-node-sdk";
const client = new NeutralAIClient({
baseUrl: "https://api.neutralai.co.uk",
apiKey: "nai_live_your_key",
});
const result = await client.mask({
prompt: "My email is john@acme.com",
reversible: true,
});
console.log(result.maskedText);Authentication
Keep API keys server-side.
API calls use the x-api-key header. Treat keys as backend secrets, rotate them through the app, and avoid logging prompts or credentials.
Integration examples
LangChain integration
Mask user or document context before it enters a chain, then pass sanitized text into the model step.
OpenAI SDK wrapper
Wrap chat completion calls so sensitive fields are removed before requests leave your trust boundary.
Browser extension
Use the managed extension path for browser-based AI usage where teams need policy before prompt egress.
Direct API
Call the masking endpoint from backend services, internal tools, and agent workflows using API-key auth.
Start with the masking API, then layer SDKs as they publish.
The direct API path is the safest integration baseline today: one endpoint, explicit auth, and sanitized output ready for downstream AI workflows.