Skip to main content
POST
Native GLiNER-2 inference
POST /v1/gliner-2 Run synchronous native GLiNER-2 extraction and classification. The OpenAPI panel on this page is the source of truth for every request field and response field. Use POST /v1/chat/completions when you need a named hosted model, a fine-tuned model, inference persistence, or the OpenAI-compatible envelope. This native endpoint selects the Fastino GLiNER-2 base model for you.

Request schema

The request requires:
  • text: one string or an array of strings.
  • schema: the unified GLiNER schema dictionary. The legacy flat label array is deprecated.
It also accepts threshold, include_confidence, include_spans, and format_results. Omit task; it is a deprecated legacy hint and the schema identifies the operation.

Entity extraction example

Classification example

Each classic classification requires at least two labels. For every supported entity, classification, structure, relation, record, attribute, and constrained-classification shape, use the complete POST /v1/chat/completions GLiNER schema reference.

Response schema

A successful response contains:
  • result: the schema-shaped extraction or classification result.
  • token_usage: the number of input tokens processed.
When text is an array, result is an array in the same input order. Do not send that batch shape through POST /v1/chat/completions; submit those conversations separately.