> ## 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.

# gliner2-base-v1

> Model details for 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)


## OpenAPI

````yaml api-reference/openapi/playgrounds/gliner2-base-v1.openapi.json POST /responses
openapi: 3.1.0
info:
  title: gliner2-base-v1 playground
  version: '1.0'
  description: >-
    Interactive playground for **gliner2-base-v1**.

    Model is always `gliner2-base-v1` on this page (shown in the form, not
    editable).

    Use the **request example** selector to switch use cases (JSON, NER, PII,
    etc.).

    Authentication: `x-api-key` (required) and `x-project-id` (optional).
servers:
  - url: https://api.zerogpu.ai/v1
    description: Production
security:
  - ApiKey: []
paths:
  /responses:
    post:
      tags:
        - gliner2-base-v1
      summary: 'gliner2-base-v1: Responses'
      operationId: createResponse_gliner2-base-v1
      parameters:
        - name: x-project-id
          in: header
          required: false
          schema:
            type: string
          description: >-
            Optional project identifier. Scopes the request to a specific
            project when provided.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateResponseRequest'
                - type: object
                  properties:
                    model:
                      type: string
                      const: gliner2-base-v1
                      default: gliner2-base-v1
                      example: gliner2-base-v1
                      description: >-
                        Model identifier (fixed for this playground). Use
                        request examples to change use cases.
            examples:
              ner:
                summary: Entity Extraction
                value:
                  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.
                  model: gliner2-base-v1
                  metadata:
                    labels:
                      - programming language
                      - database
                      - technology
                      - protocol
                    usecase: ner
                    threshold: 0.3
              json:
                summary: Structured Data Extraction
                value:
                  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
                  model: gliner2-base-v1
                  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
              classification:
                summary: Text Classification
                value:
                  input: >-
                    I absolutely love this product! The quality is outstanding
                    and the customer service was incredibly helpful.
                  model: gliner2-base-v1
                  metadata:
                    schema:
                      sentiment:
                        - positive
                        - negative
                        - neutral
                    usecase: classification
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
              examples:
                ner:
                  summary: Entity Extraction
                  value:
                    entities:
                      programming language:
                        - Python 3.11
                      database:
                        - PostgreSQL 15
                      technology:
                        - Kubernetes
                        - Docker
                        - gRPC
                      protocol:
                        - gRPC
                json:
                  summary: Structured Data Extraction
                  value:
                    data:
                      contact:
                        - name: John Smith
                          title: Senior Software Engineer
                          company: Acme Corp
                          phone: (555) 123-4567
                          email: john.smith@acme.com
                          address: null
                classification:
                  summary: Text Classification
                  value:
                    classification:
                      sentiment: positive
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '420':
          description: Insufficient quota
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
components:
  schemas:
    CreateResponseRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          const: gliner2-base-v1
          default: gliner2-base-v1
          example: gliner2-base-v1
          description: >-
            Model identifier (fixed for this playground). Use request examples
            to change use cases.
        input:
          type: string
          minLength: 1
          format: textarea
          maxLength: 131072
          description: Multi-line text or document content to send to the model.
        metadata:
          type: object
          description: >-
            Use-case options for the model. Three use cases are supported:

            - `ner` — extract entities for the given `labels`.

            - `json` — extract structured fields defined by a `schema`.

            - `classification` — assign labels from candidate sets defined by a
            `schema`.
          additionalProperties: true
          properties:
            usecase:
              type: string
              enum:
                - ner
                - json
                - classification
              default: ner
              description: >-
                Which operation to run and which other fields apply: `ner` uses
                `labels`; `json` and `classification` use `schema`.
            labels:
              type: array
              items:
                type: string
              example:
                - programming language
                - database
                - technology
                - protocol
              description: >-
                Entity types to extract, used when `usecase` is `ner`. Each
                label becomes a key in the returned `entities` object.
            threshold:
              type: number
              minimum: 0
              maximum: 1
              default: 0.5
              description: >-
                Minimum confidence score (0–1) an entity must reach to be
                returned (used with `ner`). Lower values surface more,
                lower-confidence matches.
            schema:
              type: object
              additionalProperties:
                type: array
                items:
                  type: string
              description: >-
                Extraction/classification definition, used when `usecase` is
                `json` or `classification`. For `json`, each group maps to field
                definitions in `name::type::description` form (e.g.
                `"email::str::Email address"`). For `classification`, each group
                maps to a list of candidate labels (e.g. `["positive",
                "negative", "neutral"]`).
              example:
                contact:
                  - name::str::Full name
                  - email::str::Email address
                  - phone::str::Phone number
    Response:
      type: object
      additionalProperties: true
    ErrorResponse:
      type: object
      additionalProperties: true
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key

````