Skip to main content
Classification assigns each text one label per task, from label sets you define. One request can run several tasks at once, such as topic and priority, and the text can be in any supported language.

Request

The message below is Spanish. The labels stay in English.

Request schema

Response

GLiNER returns the result as a JSON string in choices[0].message.content. Parsed, it looks like this. Measured against https://api.fastino.ai; confidence values vary slightly between calls.

Response schema

Tasks are scored together, so adding or removing a task can shift the other tasks’ confidence values slightly.

Act on the answer

Adapt it

  • Keep labels mutually exclusive for single-label tasks. Overlapping labels split confidence.
  • Use multi_label: true for tags that can co-occur, such as product areas mentioned in one message.
  • Use clear, short label names. Downstream code reads them as values.
  • For decisions that need rules, scales, or yes or no answers about a situation, use GLiDE instead.

Call GLiNER

Every GLiNER schema type and how to read its result.

Chat Completions API reference

Every field, limit, and error for POST /v1/chat/completions.