Skip to main content
GLiNER2-PII is our open-source small language model for detecting and redacting personally identifiable information (PII). At 300 million parameters, it identifies 42 fine-grained PII entity types across 7 languages in a single forward pass.

Inference GLiNER2-PII in Pioneer

POST /v1/chat/completions Runs GLiNER2-PII over the supplied messages and returns the entities defined in schema. Pioneer exposes an OpenAI-compatible endpoint at https://api.pioneer.ai/v1, so you call GLiNER2-PII through the standard chat completions route using the model ID fastino/gliner2-privacy-filter-PII-multi. Request body
model
string
required
The GLiNER2-PII model ID: fastino/gliner2-privacy-filter-PII-multi.
messages
object[]
required
The text to scan for PII, in standard OpenAI chat format.
schema
object
required
The extraction schema. Contains an entities array listing the PII types to detect. Pass any subset of the 42 supported types (see the label table below). The example detects person, email, and phone_number.
include_confidence
boolean
Return a confidence score for each detected entity. Set to true in the example.
include_spans
boolean
Return the character spans for each detected entity. Set to true in the example.

Example: PII detection

This request detects three entity types person, email, and phone_number in a single user message.
curl -X POST "https://api.pioneer.ai/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <YOUR_PIONEER_API_KEY>" \
  -d '{
  "model": "fastino/gliner2-privacy-filter-PII-multi",
  "messages": [
    {
      "role": "user",
      "content": "Hi, my name is John Smith. You can reach me at john.smith@acme.com or +1-555-0192."
    }
  ],
  "schema": {
    "entities": [
      "person",
      "email",
      "phone_number"
    ]
  },
  "include_confidence": true,
  "include_spans": true
}'

What GLiNER2-PII detects

GLiNER2-PII recognizes 42 fine-grained PII entity types, organized into seven groups.
GroupEntity types
Person / namesperson, full_name, first_name, middle_name, last_name, date_of_birth
Contact / addressemail, phone_number, address, street_address, city, state_or_region, postal_code, country
Government / tax IDsgovernment_id, national_id_number, passport_number, drivers_license_number, license_number, tax_id, tax_number
Banking / paymentbank_account, account_number, routing_number, iban, payment_card, card_number, card_expiry, card_cvv
Digital identityusername, ip_address, account_id, sensitive_account_id
Secrets / credentialspassword, secret, api_key, access_token, recovery_code
Sensitive datessensitive_date, document_date, expiration_date, transaction_date
Supported languages: English, French, Spanish, German, Italian, Portuguese, and Dutch.