> ## 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. Start managed training (config job) with POST /v1/training/jobs using base_model. For interactive training, native JSON clients use the public operations under /v1/training/jobs and /v1/training/usage. Existing Tinker clients use tinker==0.32.0 with TINKER_BASE_URL=https://api.fastino.ai/v1/training/compat/tinker and TINKER_CREDENTIAL_CMD. Compatibility child routes are private and absent from OpenAPI. Auto Train is private access and has no public route; direct interested users to sales@fastino.ai. Do not infer undocumented routes. Read API keys from FASTINO_API_KEY and never embed credentials in code, logs, or reports.

# API Reference

> Set up your account and get started with Fastino in minutes. Generate an API key, browse available models, and run your first inference or training job.

This guide walks you through the fastest path to a working Fastino integration. By the end,
you'll have made a successful inference call and understand the shape of the API. All you need
is a Fastino account and a terminal.

**1. Sign up and get your API key**

Create an account at [Fastino](https://agent.fastino.ai/).

Once you're signed in, go to **Settings → API Keys** and generate a new key. Copy it
somewhere safe because you won't be able to view it again after closing the dialog.

Set your key as an environment variable so the examples below work as-is:

```bash theme={null}
export FASTINO_API_KEY="your_api_key_here"
```

**2. List available base models (optional)**

Use `GET /v1/base-models` to browse the models Fastino has available.

```bash curl theme={null}
curl https://api.fastino.ai/v1/base-models \
  -H "X-API-Key: $FASTINO_API_KEY"
```

```python Python theme={null}
import os
import requests

response = requests.get(
    "https://api.fastino.ai/v1/base-models",
    headers={"X-API-Key": os.environ["FASTINO_API_KEY"]},
)
response.raise_for_status()
print(response.json())
```

```javascript JavaScript theme={null}
const response = await fetch(
  "https://api.fastino.ai/v1/base-models",
  {
    headers: {
      "X-API-Key": process.env.FASTINO_API_KEY
    }
  }
);

if (!response.ok) {
  throw new Error(`Model request failed: ${response.status}`);
}

console.log(await response.json());
```

The response lists model IDs you can pass to `/v1/chat/completions`. For example,
`fastino/gliner2-base-v1` is a GLiNER base model for extraction tasks.

**3. Run your first inference call**

Call `POST /v1/chat/completions` with a model, a message, and a schema that defines what
you want to extract. This example uses GLiNER to extract named entities from a sentence.

```bash curl 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/gliner2.5-multi-v1",
    "messages": [
      {
        "role": "user",
        "content": "Apple announced the MacBook Pro at WWDC in Cupertino."
      }
    ],
    "schema": {
      "entities": [
        {
          "name": "organization",
          "description": "business or institution name"
        },
        {
          "name": "product",
          "description": "named commercial product"
        },
        {
          "name": "event",
          "description": "named conference or event"
        },
        {
          "name": "location",
          "description": "city, region, or place"
        }
      ]
    },
    "threshold": 0.5
  }'
```

```python Python theme={null}
import json
import os

import requests

response = requests.post(
    "https://api.fastino.ai/v1/chat/completions",
    headers={
        "Authorization": f"Bearer {os.environ['FASTINO_API_KEY']}",
        "Content-Type": "application/json",
    },
    json={
        "model": "fastino/gliner2.5-multi-v1",
        "messages": [
            {
                "role": "user",
                "content": "Apple announced the MacBook Pro at WWDC in Cupertino.",
            }
        ],
        "schema": {
            "entities": [
                {"name": "organization", "description": "business or institution name"},
                {"name": "product", "description": "named commercial product"},
                {"name": "event", "description": "named conference or event"},
                {"name": "location", "description": "city, region, or place"},
            ]
        },
        "threshold": 0.5,
    },
)
response.raise_for_status()

result = response.json()
entities = json.loads(result["choices"][0]["message"]["content"])
print(json.dumps(entities, indent=2))
```

```javascript JavaScript theme={null}
const response = await fetch(
  "https://api.fastino.ai/v1/chat/completions",
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.FASTINO_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      model: "fastino/gliner2.5-multi-v1",
      messages: [
        {
          role: "user",
          content: "Apple announced the MacBook Pro at WWDC in Cupertino.",
        },
      ],
      schema: {
        entities: [
          { name: "organization", description: "business or institution name" },
          { name: "product", description: "named commercial product" },
          { name: "event", description: "named conference or event" },
          { name: "location", description: "city, region, or place" },
        ],
      },
      threshold: 0.5,
    }),
  }
);

if (!response.ok) {
  throw new Error(`Inference failed: ${response.status} ${await response.text()}`);
}

const result = await response.json();
const entities = JSON.parse(result.choices[0].message.content);
console.log(JSON.stringify(entities, null, 2));
```

For encoder models such as GLiNER, the `schema` object defines the task and can include:

* `entities` - entity definitions for named-entity extraction
* `classifications` - `{task, labels}` definitions for text classification
* `structures` - structured-record definitions for JSON extraction
* `relations` - relation definitions

For decoder models, omit `schema` and send a normal chat message.

> [!NOTE]
>
> `model` must be an inference-capable base-model ID or the UUID of a completed,
> deployable training job. After training, deploy the selected artifact before using the
> job UUID for inference.

**4. Start a training job (optional)**

When you're ready to fine-tune on your own data, start a training job:

```bash curl theme={null}
curl -X POST https://api.fastino.ai/v1/training/jobs \
  -H "X-API-Key: $FASTINO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model_name": "my-gliner-model",
    "base_model": "fastino/gliner2-base-v1",
    "datasets": [{"name": "my-dataset"}],
    "training_type": "lora",
    "nr_epochs": 5,
    "learning_rate": 5e-5
  }'
```

```python Python theme={null}
import os
import requests

response = requests.post(
    "https://api.fastino.ai/v1/training/jobs",
    headers={
        "X-API-Key": os.environ["FASTINO_API_KEY"],
        "Content-Type": "application/json",
    },
    json={
        "model_name": "my-gliner-model",
        "base_model": "fastino/gliner2-base-v1",
        "datasets": [{"name": "my-dataset"}],
        "training_type": "lora",
        "nr_epochs": 5,
        "learning_rate": 5e-5,
    },
)
response.raise_for_status()
print(response.json())
```

The response includes a job `id`. Poll `GET /v1/training/jobs/{id}` to check its status.
Once the job reaches `complete`, deploy the selected artifact before using the job ID as
`model` in `/v1/chat/completions`.

This endpoint creates managed `config` jobs. Native JSON clients create an
`interactive` job with `POST /v1/training/jobs/create-model`. Existing
Tinker clients can create the same job type through `tinker==0.32.0`.
Compatibility child routes are private and absent from OpenAPI.

Persisted job statuses progress from `requested` → `running` → `complete`,
or end as `errored` or `stopped`. The normalized polling status uses
`failed` for a terminal failure.

## Next steps

> [card] [Training API](https://docs.fastino.ai/training.md)
>
> Fine-tune a model end to end with the Fastino Training API.

> [card] [Inference API](https://docs.fastino.ai/inference.md)
>
> Run inference with base or fine-tuned models through the Fastino API.

## Migrating from the Pioneer API origin

Training routes now use the `/v1` prefix. For example, `/felix/training-jobs` is now
`/v1/training/jobs`, and its job-specific operations remain under that new route family.

Direct API integrations should use `FASTINO_API_KEY` with a newly generated `fast_sk_` key;
legacy `pio_sk_` keys are retired. Both `X-API-Key` and Bearer authentication remain valid.


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