> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fastino.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use https://docs.fastino.ai/llms.txt to discover and navigate pages. Use https://docs.fastino.ai/llms-full.txt when you need the complete documentation corpus. Use https://docs.fastino.ai/openapi.json as the source of truth for customer-facing routes. For GLiDE decision inference, call POST https://api.fastino.ai/v1/systemone with model fastino/GLiDE. Do not infer undocumented routes. Read API keys from FASTINO_API_KEY and never embed credentials in code, logs, or reports.

# Native GLiNER-2-Inferenz

> Führen Sie synchrone native GLiNER-2-Extraktion und -Klassifikation mit dem vereinheitlichten GLiNER-Schema aus, inklusive Beispielanfragen und -antworten.

`POST /v1/gliner-2`

Führen Sie synchrone native GLiNER-2-Extraktion und -Klassifikation aus. Das OpenAPI-Panel auf dieser
Seite ist die verbindliche Quelle für alle Anfrage- und Antwortfelder.

Verwenden Sie `POST /v1/chat/completions`, wenn Sie ein benanntes gehostetes Modell, ein feinabgestimmtes Modell,
die Persistierung von Inferenzen oder den OpenAI-kompatiblen Umschlag benötigen. Dieser native Endpunkt wählt
das Fastino-GLiNER-2-Basismodell automatisch für Sie aus.

## Anfrageschema

Die Anfrage erfordert:

* `text`: einen String oder ein Array von Strings.
* `schema`: das vereinheitlichte GLiNER-Schema-Dictionary. Das bisherige flache Label-Array ist veraltet.

Sie akzeptiert außerdem `threshold`, `include_confidence`, `include_spans` und `format_results`.
Lassen Sie `task` weg; es ist ein veralteter Legacy-Hinweis, und das Schema bestimmt die Operation.

## Beispiel für Entitätsextraktion

```bash theme={null}
curl -X POST "https://api.fastino.ai/v1/gliner-2" \
  -H "X-API-Key: $FASTINO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Apple CEO Tim Cook introduced the iPhone in Cupertino.",
    "schema": {
      "entities": [
        {"name": "person", "description": "named individual"},
        {"name": "organization", "description": "business or institution"},
        {"name": "product", "description": "named commercial product"},
        {"name": "location", "description": "city, region, or place"}
      ]
    },
    "threshold": 0.5,
    "include_confidence": true,
    "include_spans": true
  }'
```

## Beispiel für Klassifikation

```bash theme={null}
curl -X POST "https://api.fastino.ai/v1/gliner-2" \
  -H "X-API-Key: $FASTINO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "The replacement arrived quickly and works perfectly.",
    "schema": {
      "classifications": [
        {
          "task": "sentiment",
          "labels": ["positive", "negative", "neutral"],
          "multi_label": false,
          "top_k": 1
        }
      ]
    }
  }'
```

Jede klassische Klassifikation erfordert mindestens zwei Labels. Für alle unterstützten Formen von Entitäten,
Klassifikationen, Strukturen, Relationen, Datensätzen, Attributen und eingeschränkten Klassifikationen
verwenden Sie die vollständige
[GLiNER-Schema-Referenz für `POST /v1/chat/completions`](/de/api-reference/inference/chat-completions).

## Antwortschema

Eine erfolgreiche Antwort enthält:

* `result`: das am Schema ausgerichtete Extraktions- oder Klassifikationsergebnis.
* `token_usage`: die Anzahl der verarbeiteten Eingabe-Token.

```json theme={null}
{
  "result": {
    "entities": [
      {
        "text": "Apple",
        "label": "organization",
        "score": 0.99,
        "start": 0,
        "end": 5
      }
    ]
  },
  "token_usage": 10
}
```

Wenn `text` ein Array ist, ist `result` ein Array in derselben Reihenfolge wie die Eingabe. Senden Sie diese
Batch-Form nicht über `POST /v1/chat/completions`; übermitteln Sie diese Konversationen stattdessen einzeln.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.