gliner

Process text using GLiNER-2 base model via InferenceService.

task is optional — when omitted the unified schema path is used. Legacy task names are still accepted but deprecated.

post/v1/gliner-2

Request

Request body

format_resultsboolean nullable
include_confidenceboolean nullable
include_spansboolean nullable
taskstring nullable

Deprecated legacy task hint. One of: 'extract_entities', 'classify_text', 'extract_json', 'schema'. Omit for the unified GLiNER2 path. Submitting a legacy task value still succeeds but the response carries Deprecation: true and a Sunset header.

thresholdnumber nullable
truncate_overflow_textboolean

Encoder (GLiNER) models only. When the text is longer than the model's max_input_tokens, cut it to fit instead of rejecting the request with input_too_long. Off by default. A response whose input was cut reports x_fastino.truncated: true; entities past the cut are not returned. Token usage still counts the full submitted text. Texts over 50,000 characters are rejected before truncation applies. Not supported for full fine-tuned encoder models, which still reject.

Response

Successful Response

token_usageinteger required

Changes

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status

    • info

      api operation id gliner2_process_gliner_2_post removed and replaced with gliner2_process_v1_gliner_2_post