Azure Language PII compatibility
Move supported Azure text, conversation, and document PII workloads to ShinrAI.
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.
Endpoints
Use the vendor endpoint for an unchanged client. The same adapter also runs under a path prefix on the API host; ShinrAI extensions to the vendor format appear there first.
| 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 |
| Sandbox | https://azure.api-sbx.getshinrai.com | https://api-sbx.getshinrai.com/v1/azure |
This endpoint serves its own OpenAPI document: OpenAPI for this API.
Migrating from Azure Language PII
Point your Azure client at https://azure.api.getshinrai.com and send your ShinrAI API key as the subscription key. Only the endpoint changes.
The text PII adapter implements the supported request and response contracts below, at Azure's own paths. Model predictions and full Azure feature coverage are separate concerns.
| Contract | Path |
|---|---|
| Modern synchronous | POST /language/:analyze-text?api-version=2023-04-01 or 2026-05-01 |
| Modern asynchronous | POST /language/analyze-text/jobs?api-version=2023-04-01 or 2026-05-01 |
| Legacy synchronous | POST /text/analytics/v3.1/entities/recognition/pii |
| Legacy asynchronous | POST /text/analytics/v3.1/analyze |
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":"Email emma@example.com"}]},"parameters":{"modelVersion":"latest","stringIndexType":"Utf16CodeUnit"}}'
Example output (simulated)
Simulated JSON excerpt for the command above. Your detections, replacement values and balance may differ.
{
"kind": "PiiEntityRecognitionResults",
"results": {
"documents": [
{
"id": "1",
"redactedText": "Email ****************",
"entities": [
{
"text": "emma@example.com",
"category": "Email",
"offset": 6,
"length": 16,
"confidenceScore": 1.0
}
],
"warnings": []
}
],
"errors": [],
"modelVersion": "shinrai-v1.5"
}
}Synchronous text PII allows up to 5 documents of 5.120 grapheme clusters each. Asynchronous jobs allow up to 25 documents and 125.000 Unicode 8 text elements in total, with a 1 MiB request limit. Follow the returned operation-location URL for polling. Job access and cancellation are restricted to the creating account; encrypted job data expires 24 hours after submission.
Offset modes include UTF-16 code units, Unicode code points and Unicode 8 text elements. The default model is ShinrAI 1.5; dated Azure model identifiers are rejected. The current model does not cover every Azure PII category or modality. Unsupported category/options requests fail explicitly. This is a text PII adapter, with additional compatibility detail in the release matrix; it is not a claim of Azure-wide feature or prediction parity.
Supported Azure categories and options
All supported versions map Person, Organization, Email, URL, PhoneNumber, IPAddress, Address, CreditCardNumber and InternationalBankingAccountNumber. Legacy v3.1 and 2023-04-01 map birth dates to DateTime; this is not general date detection. The 2026-05-01 contract additionally maps City, DateOfBirth, NationalId, ZipCode and LicensePlate.
For 2026-05-01, supported controls include category inclusion/exclusion, confidence thresholds, value exclusions and character/entity/no-mask redaction. The phi domain, context synonyms, disabling detector validation and Azure synthetic replacement are rejected. Native findings without verified mappings produce ShinrAIUnmappedEntityTypes warnings and are omitted from Azure redaction; choose the native API when those findings must be retained.
Accepted language codes: de en fr es it pl pt ru uk tr ar he ja ko. Acceptance does not imply equal detection quality. Async jobs use Batch weighting and sync uses Standard; each async task is charged independently. Polling and cancellation are free.
Local Python and JavaScript SDK checks pass for the implemented subset. Azure reference comparison and the .NET client remain release verification items. Microsoft’s text PII contract.