> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zerogpu.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# PII

> Multilingual PII detection, redaction, and schema-driven extraction models.

PII models detect, redact, and extract personally identifiable information and other structured entities from text. Both models below run on CPU for privacy-preserving workflows and select a behavior through the `metadata.usecase` field. Each request is shown for both the [Responses API](/api-reference/responses) and the OpenAI-compatible [Chat Completions API](/api-reference/chat-completions).

| Model                                                                                                                                                                                                                                                                                                                                                                              | Input /1M | Output /1M | Params | Max tokens |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------: | ---------: | ------ | ---------: |
| <a href="/api-reference/models/gliner-multi-pii-v1" style={{display:"inline-flex",alignItems:"center",gap:"0.5rem",textDecoration:"none",color:"inherit",wordBreak:"break-word",borderBottom:"none"}}><img src="https://models-favicon.zerogpu.ai/gliner-multi-pii-v1/fastino.png" alt="gliner-multi-pii-v1" width="22" height="22" noZoom /> <code>gliner-multi-pii-v1</code></a> |    \$0.02 |     \$0.05 | 300M   |        800 |
| <a href="/api-reference/models/gliner2-base-v1" style={{display:"inline-flex",alignItems:"center",gap:"0.5rem",textDecoration:"none",color:"inherit",wordBreak:"break-word",borderBottom:"none"}}><img src="https://models-favicon.zerogpu.ai/gliner2-base-v1/fastino.png" alt="gliner2-base-v1" width="22" height="22" noZoom /> <code>gliner2-base-v1</code></a>                 |    \$0.02 |     \$0.05 | 205M   |        800 |

## gliner-multi-pii-v1

> GLiNER Multi PII is a multilingual PII detection and redaction model that supports on-prem deployments as well. It identifies 40+ personally identifiable entity types — identity, contact, government IDs, financial, medical and more. It works natively across six languages: English, French, German, Spanish, Italian, and Portuguese, so a single model covers multi-market and cross-border data without separate per-language pipelines. Built for zero-shot label, it accepts custom label sets at inference time and supports curated PII catalogues, redaction with label or character masks, and generic NER with user-supplied labels.

**References:** [Model docs](https://github.com/fastino-ai/GLiNER2/blob/main/README.md) • [Terms](https://github.com/fastino-ai/GLiNER2/blob/main/LICENSE) • [Privacy](https://github.com/fastino-ai/GLiNER2/blob/main/LICENSE)

### Redaction

Set `metadata.usecase` to `redact` and `metadata.mask` to `label` to replace detected PII in place with `[LABEL]` placeholders.

<CodeGroup>
  ```bash Responses API theme={null}
  curl https://api.zerogpu.ai/v1/responses \
    -H "content-type: application/json" \
    -H "x-api-key: YOUR_API_KEY" \
    -H "x-project-id: YOUR_PROJECT_ID" \
    -d '{
    "model": "gliner-multi-pii-v1",
    "input": "Hello Jane Doe, this is John Doe reaching out regarding my recent order. If you need any additional details, feel free to call me at 415-555-0134 during business hours. You can also email me at hi@example.com, and I will respond as soon as possible.",
    "metadata": {
      "mask": "label",
      "usecase": "redact"
    }
  }'
  ```

  ```bash Chat Completions theme={null}
  curl https://api.zerogpu.ai/v1/chat/completions \
    -H "content-type: application/json" \
    -H "x-api-key: YOUR_API_KEY" \
    -H "x-project-id: YOUR_PROJECT_ID" \
    -d '{
    "model": "gliner-multi-pii-v1",
    "messages": [
      {
        "role": "user",
        "content": "Hello Jane Doe, this is John Doe reaching out regarding my recent order. If you need any additional details, feel free to call me at 415-555-0134 during business hours. You can also email me at hi@example.com, and I will respond as soon as possible."
      }
    ],
    "metadata": {
      "mask": "label",
      "usecase": "redact"
    }
  }'
  ```
</CodeGroup>

```json Response theme={null}
{
  "redacted_text": "Hello [PERSON], this is [PERSON] reaching out regarding my recent order. If you need any additional details, feel free to call me at [PHONE_NUMBER] during business hours. You can also email me at [EMAIL], and I will respond as soon as possible.",
  "entities": [
    { "text": "Jane Doe", "label": "person", "start": 6, "end": 14, "score": 0.9982 },
    { "text": "John Doe", "label": "person", "start": 24, "end": 32, "score": 0.9981 },
    { "text": "415-555-0134", "label": "phone number", "start": 133, "end": 145, "score": 0.9725 },
    { "text": "hi@example.com", "label": "email", "start": 194, "end": 208, "score": 0.9812 }
  ],
  "entities_by_label": {
    "person": ["Jane Doe", "John Doe"],
    "phone number": ["415-555-0134"],
    "email": ["hi@example.com"]
  }
}
```

### Extraction

Set `metadata.usecase` to `extract-pii` to detect PII without modifying the source text. Narrow results with `categories` and a confidence `threshold`.

<CodeGroup>
  ```bash Responses API theme={null}
  curl https://api.zerogpu.ai/v1/responses \
    -H "content-type: application/json" \
    -H "x-api-key: YOUR_API_KEY" \
    -H "x-project-id: YOUR_PROJECT_ID" \
    -d '{
    "model": "gliner-multi-pii-v1",
    "input": "Contact John Doe at john@example.com or +1-415-555-0134.",
    "metadata": {
      "usecase": "extract-pii",
      "threshold": 0.5,
      "categories": [
        "identity",
        "contact"
      ]
    }
  }'
  ```

  ```bash Chat Completions theme={null}
  curl https://api.zerogpu.ai/v1/chat/completions \
    -H "content-type: application/json" \
    -H "x-api-key: YOUR_API_KEY" \
    -H "x-project-id: YOUR_PROJECT_ID" \
    -d '{
    "model": "gliner-multi-pii-v1",
    "messages": [
      {
        "role": "user",
        "content": "Contact John Doe at john@example.com or +1-415-555-0134."
      }
    ],
    "metadata": {
      "usecase": "extract-pii",
      "threshold": 0.5,
      "categories": [
        "identity",
        "contact"
      ]
    }
  }'
  ```
</CodeGroup>

```json Response theme={null}
{
  "entities": [
    { "text": "John Doe", "label": "person", "start": 8, "end": 16, "score": 0.9989 },
    { "text": "john@example.com", "label": "email", "start": 20, "end": 36, "score": 0.9776 },
    { "text": "+1-415-555-0134", "label": "phone number", "start": 40, "end": 55, "score": 0.9714 }
  ],
  "entities_by_label": {
    "person": ["John Doe"],
    "email": ["john@example.com"],
    "phone number": ["+1-415-555-0134"]
  }
}
```

## gliner2-base-v1

> gliner2-base-v1 is a versatile extraction-and-classification model for the structured tasks that fill most production pipelines. Point it at any text and, with a single API call, pull named entities by your own labels, populate a typed JSON schema straight from messy input, or classify by sentiment, intent, or topic. No fine-tuning and no prompt engineering, just a label set or schema at inference time. Because it's purpose-built and CPU-optimized, it runs faster and cheaper than routing this work to a general-purpose frontier model. Reach for gliner-multi-pii-v1 when the job is dedicated PII redaction. When you need clean structure out of raw text, this is the model.

**References:** [Model docs](https://github.com/fastino-ai/GLiNER2/blob/main/README.md) • [Terms](https://github.com/fastino-ai/GLiNER2/blob/main/LICENSE) • [Privacy](https://github.com/fastino-ai/GLiNER2/blob/main/LICENSE)

### Entity extraction

Set `metadata.usecase` to `ner` and pass your own `labels` to extract named entities.

<CodeGroup>
  ```bash Responses API theme={null}
  curl https://api.zerogpu.ai/v1/responses \
    -H "content-type: application/json" \
    -H "x-api-key: YOUR_API_KEY" \
    -H "x-project-id: YOUR_PROJECT_ID" \
    -d '{
    "model": "gliner2-base-v1",
    "input": "The application is built with Python 3.11 and uses PostgreSQL 15 for storage. It runs on Kubernetes with Docker containers and communicates via gRPC.",
    "metadata": {
      "labels": [
        "programming language",
        "database",
        "technology",
        "protocol"
      ],
      "usecase": "ner",
      "threshold": 0.3
    }
  }'
  ```

  ```bash Chat Completions theme={null}
  curl https://api.zerogpu.ai/v1/chat/completions \
    -H "content-type: application/json" \
    -H "x-api-key: YOUR_API_KEY" \
    -H "x-project-id: YOUR_PROJECT_ID" \
    -d '{
    "model": "gliner2-base-v1",
    "messages": [
      {
        "role": "user",
        "content": "The application is built with Python 3.11 and uses PostgreSQL 15 for storage. It runs on Kubernetes with Docker containers and communicates via gRPC."
      }
    ],
    "metadata": {
      "labels": [
        "programming language",
        "database",
        "technology",
        "protocol"
      ],
      "usecase": "ner",
      "threshold": 0.3
    }
  }'
  ```
</CodeGroup>

```json Response theme={null}
{
  "entities": {
    "programming language": ["Python 3.11"],
    "database": ["PostgreSQL 15"],
    "technology": ["Kubernetes", "Docker", "gRPC"],
    "protocol": ["gRPC"]
  }
}
```

### Structured JSON extraction

Set `metadata.usecase` to `json` and define a `schema` of `field::type::description` entries to pull structured records out of free text.

<CodeGroup>
  ```bash Responses API theme={null}
  curl https://api.zerogpu.ai/v1/responses \
    -H "content-type: application/json" \
    -H "x-api-key: YOUR_API_KEY" \
    -H "x-project-id: YOUR_PROJECT_ID" \
    -d '{
    "model": "gliner2-base-v1",
    "input": "Best regards, John Smith, Senior Software Engineer at Acme Corp. Phone: (555) 123-4567, Email: john.smith@acme.com, Office: 123 Main Street, Suite 400, San Francisco, CA 94105",
    "metadata": {
      "schema": {
        "contact": [
          "name::str::Full name",
          "title::str::Job title",
          "company::str::Company name",
          "phone::str::Phone number",
          "email::str::Email address",
          "address::str::Office address"
        ]
      },
      "usecase": "json"
    }
  }'
  ```

  ```bash Chat Completions theme={null}
  curl https://api.zerogpu.ai/v1/chat/completions \
    -H "content-type: application/json" \
    -H "x-api-key: YOUR_API_KEY" \
    -H "x-project-id: YOUR_PROJECT_ID" \
    -d '{
    "model": "gliner2-base-v1",
    "messages": [
      {
        "role": "user",
        "content": "Best regards, John Smith, Senior Software Engineer at Acme Corp. Phone: (555) 123-4567, Email: john.smith@acme.com, Office: 123 Main Street, Suite 400, San Francisco, CA 94105"
      }
    ],
    "metadata": {
      "schema": {
        "contact": [
          "name::str::Full name",
          "title::str::Job title",
          "company::str::Company name",
          "phone::str::Phone number",
          "email::str::Email address",
          "address::str::Office address"
        ]
      },
      "usecase": "json"
    }
  }'
  ```
</CodeGroup>

```json Response theme={null}
{
  "data": {
    "contact": [
      {
        "name": "John Smith",
        "title": "Senior Software Engineer",
        "company": "Acme Corp",
        "phone": "(555) 123-4567",
        "email": "john.smith@acme.com",
        "address": null
      }
    ]
  }
}
```

### Classification

Set `metadata.usecase` to `classification` and supply a `schema` mapping each axis to its allowed labels.

<CodeGroup>
  ```bash Responses API theme={null}
  curl https://api.zerogpu.ai/v1/responses \
    -H "content-type: application/json" \
    -H "x-api-key: YOUR_API_KEY" \
    -H "x-project-id: YOUR_PROJECT_ID" \
    -d '{
    "model": "gliner2-base-v1",
    "input": "I absolutely love this product! The quality is outstanding and the customer service was incredibly helpful.",
    "metadata": {
      "schema": {
        "sentiment": [
          "positive",
          "negative",
          "neutral"
        ]
      },
      "usecase": "classification"
    }
  }'
  ```

  ```bash Chat Completions theme={null}
  curl https://api.zerogpu.ai/v1/chat/completions \
    -H "content-type: application/json" \
    -H "x-api-key: YOUR_API_KEY" \
    -H "x-project-id: YOUR_PROJECT_ID" \
    -d '{
    "model": "gliner2-base-v1",
    "messages": [
      {
        "role": "user",
        "content": "I absolutely love this product! The quality is outstanding and the customer service was incredibly helpful."
      }
    ],
    "metadata": {
      "schema": {
        "sentiment": [
          "positive",
          "negative",
          "neutral"
        ]
      },
      "usecase": "classification"
    }
  }'
  ```
</CodeGroup>

```json Response theme={null}
{
  "classification": {
    "sentiment": "positive"
  }
}
```
