> ## 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.

# Call GLiNER 2.5 Decide

> Authenticate and make a first schema-defined classification request with GLiNER 2.5 Decide.

Call GLiNER 2.5 Decide through Fastino's OpenAI-compatible Chat Completions endpoint. Put the text to classify in a user message and define the permitted labels in a `classifications` schema.

```text theme={null}
POST https://api.fastino.ai/v1/chat/completions
```

## Set up your API key

Create a key in [Fastino Settings](https://agent.fastino.ai/api-keys), then expose it to your process:

<CodeGroup>
  ```bash macOS/Linux theme={null}
  export FASTINO_API_KEY="your_api_key_here"
  ```

  ```powershell Windows theme={null}
  setx FASTINO_API_KEY "your_api_key_here"
  ```
</CodeGroup>

## Make a classification request

```bash theme={null}
curl -X POST "https://api.fastino.ai/v1/chat/completions" \
  -H "Authorization: Bearer $FASTINO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "fastino/GLiNER-2.5-Decide",
    "messages": [
      {
        "role": "user",
        "content": "My subscription renewed after I cancelled it. Please refund the charge."
      }
    ],
    "schema": {
      "classifications": [
        {
          "task": "intent",
          "labels": ["refund_request", "cancel_subscription", "login_problem"],
          "multi_label": false
        }
      ]
    },
    "store": false
  }'
```

Every classification task requires at least one label. With `multi_label: false`, Decide returns the highest-scoring label.

## Read the response

A successful response uses the Chat Completions envelope. The classification result is a JSON string inside `choices[0].message.content`:

```json theme={null}
{
  "model": "fastino/GLiNER-2.5-Decide",
  "choices": [
    {
      "message": {
        "role": "assistant",
        "content": "{\"intent\": {\"label\": \"refund_request\", \"confidence\": 0.999862551689148}}"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 13,
    "completion_tokens": 22,
    "total_tokens": 35
  },
  "token_usage": 35
}
```

Parse the message content before reading the task result:

```python theme={null}
import json

# `body` is the decoded JSON response body.
result = json.loads(body["choices"][0]["message"]["content"])
intent = result["intent"]["label"]
confidence = result["intent"]["confidence"]
```

## Next steps

<CardGroup cols={2}>
  <Card title="Classification" icon="brackets-curly" href="/concepts/gliner-2-5-decide-schema">
    Add multi-label behavior and multiple tasks, then consume their result shapes.
  </Card>

  <Card title="API reference" icon="book" href="/api-reference/inference/chat-completions">
    Inspect the exhaustive `POST /v1/chat/completions` contract.
  </Card>
</CardGroup>


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