Build with ShinrAI
Protect personal data without losing useful context.
Start with a real request, follow a production recipe, or inspect every supported customer endpoint.
Choose your API
One service and the same models serve every contract. Pick the contract that fits your code.
One contract for the hosted API and an installation in your own cluster. The offline edition serves the native API v1 until its image includes v2.
- Stable contract 2.0.0: changes within 2.x are additive
- Text, tables, JSON and transcripts
- Images: OCR, pixel boxes per entity and the redacted image back
- Audio: speech recognition, time intervals and the recording with every personal detail bleeped
- PDF and DOCX documents through jobs, with the redacted PDF back
- Long recordings through jobs
- Realtime, standard and batch tiers
- Sessions keep one replacement map across requests
- Raw text and image bodies work directly with curl
Keep your SDK and your request format. Each vendor API has its own endpoint: change only the endpoint and use your ShinrAI key.
| API | Endpoint: change only this | Alternative on the API host |
|---|---|---|
| Azure AI Language PII | https://azure.api.getshinrai.com | https://api.getshinrai.com/v1/azure |
| Google Cloud DLP | https://google.api.getshinrai.com | https://api.getshinrai.com/v1/google |
| AWS Comprehend | https://aws.api.getshinrai.com | https://api.getshinrai.com/v1/aws |
- Azure clients send the ShinrAI key as the subscription key.
- Google clients send it as the API key or as a Bearer token.
- AWS clients sign with SigV4 credentials that you create with the ShinrAI key.
Each vendor endpoint serves its own OpenAPI document at /openapi.json. The sandbox uses the same names with api-sbx.
The vendor contract limits what ShinrAI can return: types, confidence, media, sessions and jobs. Results can therefore be weaker than ShinrAI can deliver. For full quality, use the native PII API v2.
Existing v1 integrations keep working; new work uses the native API v2.
Every contract is published as OpenAPI 3.1. You need no SDK: any HTTP client works.
Native API v2 in 60 seconds
Set your key once. Every example sends it as a Bearer token.
export SHINRAI_API_KEY=shr_live_...
Find personal data in a text
curl -s https://api.getshinrai.com/v2/detect -H "Authorization: Bearer $SHINRAI_API_KEY" \
-H "Content-Type: application/json" -d '{"text": "Anna Weber, anna.weber@example.org, IBAN DE89 3704 0044 0532 0130 00"}'curl 'https://azure.api.getshinrai.com/language/:analyze-text?api-version=2023-04-01' \
-H "Ocp-Apim-Subscription-Key: $SHINRAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"kind":"PiiEntityRecognition","analysisInput":{"documents":[{"id":"1","language":"en","text":"Anna Weber, anna.weber@example.org, IBAN DE89 3704 0044 0532 0130 00"}]},"parameters":{"modelVersion":"latest","stringIndexType":"Utf16CodeUnit"}}'Compatibility APIs limit what ShinrAI can return. For full quality, use the native PII API v2.
# Once: create SigV4 credentials with your ShinrAI key
# curl -X POST https://aws.api.getshinrai.com/providers/aws/credentials -H "Authorization: Bearer $SHINRAI_API_KEY"
import boto3, os
client = boto3.client(
"comprehend",
region_name="eu-central-1",
endpoint_url="https://aws.api.getshinrai.com",
aws_access_key_id=os.environ["SHINRAI_AWS_ACCESS_KEY_ID"],
aws_secret_access_key=os.environ["SHINRAI_AWS_SECRET_ACCESS_KEY"],
)
print(client.detect_pii_entities(Text="Anna Weber, anna.weber@example.org, IBAN DE89 3704 0044 0532 0130 00", LanguageCode="en"))Compatibility APIs limit what ShinrAI can return. For full quality, use the native PII API v2.
curl 'https://google.api.getshinrai.com/v2/projects/my-project/locations/global/content:inspect' \
-H "x-goog-api-key: $SHINRAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"item":{"value":"Anna Weber, anna.weber@example.org, IBAN DE89 3704 0044 0532 0130 00"},"inspectConfig":{"includeQuote":true}}'Compatibility APIs limit what ShinrAI can return. For full quality, use the native PII API v2.
Send a text file as it is and get the protected text back
curl -s "https://api.getshinrai.com/v2/protect?preset=label" -H "Authorization: Bearer $SHINRAI_API_KEY" \
-H "Content-Type: text/plain" -H "Accept: text/plain" --data-binary @letter.txt# Azure returns the masked text as redactedText.
curl 'https://azure.api.getshinrai.com/language/:analyze-text?api-version=2023-04-01' \
-H "Ocp-Apim-Subscription-Key: $SHINRAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"kind":"PiiEntityRecognition","analysisInput":{"documents":[{"id":"1","language":"en","text":"Anna Weber, anna.weber@example.org"}]},"parameters":{"modelVersion":"latest","stringIndexType":"Utf16CodeUnit"}}'Compatibility APIs limit what ShinrAI can return. For full quality, use the native PII API v2.
curl 'https://google.api.getshinrai.com/v2/projects/my-project/locations/global/content:deidentify' \
-H "x-goog-api-key: $SHINRAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"item":{"value":"Anna Weber, anna.weber@example.org"},"deidentifyConfig":{"infoTypeTransformations":{"transformations":[{"primitiveTransformation":{"replaceWithInfoTypeConfig":{}}}]}}}'Compatibility APIs limit what ShinrAI can return. For full quality, use the native PII API v2.
Get the redacted screenshot back
curl -s https://api.getshinrai.com/v2/protect -H "Authorization: Bearer $SHINRAI_API_KEY" \
-H "Content-Type: image/png" -H "Accept: image/png" --data-binary @screenshot.png -o redacted.png
Start a job for a large batch
Upload a JSONL file with one input per line first. The upload answer contains the ID for the job.
curl -s https://api.getshinrai.com/v2/jobs \
-H "Authorization: Bearer $SHINRAI_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: rows-2026-09-28" \
-d '{"kind": "text_batch",
"inputs": [{"kind": "file", "source": {"upload": "up_..."}}],
"output": {"artifacts": ["protected", "entities"]}}'
Native API v2 guide · Full v2 reference (Markdown) · API explorer (Swagger) · OpenAPI 3.1 for v2 · OpenAPI 3.1 for all APIs
Choose where to start
Run Hello ShinrAI locally
Try and debug the full protection flow in a browser workspace. Bring a ShinrAI key for text, files, scans and compatibility APIs; add an LLM key only when you want protected chat.
Install uv once, then launch the reviewed release:
uvx --from https://github.com/Innovius-ai/hello-shinrai/releases/download/v0.1.4/hello_shinrai-0.1.4-py3-none-any.whl hello-shinrai
Use the Text, Files, Chat, Azure Comparison and API Explorer workspaces. Keys remain in the local process unless you explicitly save them in your operating system credential store.
Verified release: v0.1.4. Upgrade by changing both version values in the wheel URL.
API reference
Run requests against the actual API
The explorer is served by the ShinrAI gateway and built from its registered customer routes. Its scripts and styles are hosted with the backend.