GLiNER-2-XL
Inferencing with GLiNER 2
GLiNER 2 unifies information-extraction tasks in one efficient forward pass and is optimized for CPU-based inference.
POST /gliner-2
Run fast, schema-driven entity extraction, text classification, and structured data parsing through the GLiNER 2 inference endpoint.
Purpose
Use this endpoint to perform Named Entity Recognition, Text Classification, or Structured Data Extraction directly via API without local model setup.
Typical use-cases:
Extract entities such as people, organizations, products, or places.
Classify text (sentiment, topic, intent).
Parse structured fields from unstructured text (invoices, contracts, medical records, etc.).
Endpoint
Headers
Request Body
Field | Type | Required | Description |
|---|---|---|---|
| string | Yes | The input text to analyze. |
| object / list | Yes | Entity labels, class labels, or structured-field schema depending on task. |
| float | Optional | Confidence threshold (default 0.5). |
Example 1 – Entity Extraction
Response
Example 2 – Text Classification
Response
Example 3 – Structured Extraction
Response
Error Responses
HTTP Code | Error Code | Description |
|---|---|---|
400 |
| Missing or malformed fields. |
401 |
| Missing or invalid token. |
500 |
| Internal inference error. |
Best Practices
Keep text under 8 KB per call for best latency.
Reuse the same model ID for batch requests to leverage warm caching.
Use
threshold ≥ 0.7for precision-critical domains (e.g., finance or healthcare).Combine GLiNER 2 output with Fastino Personalization API for user-specific extraction context.
SummaryPOST /gliner-2 provides unified, production-ready information extraction through Fastino’s hosted GLiNER 2 engine — efficient, accurate, and LLM-compatible.
Join our Discord Community