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

# Create a config training job

> Call POST /v1/training/jobs to start asynchronous managed training (config job) from a base model and datasets.

`POST /v1/training/jobs`

Starts asynchronous managed training (`config` job) and returns its job record.
You provide a dataset and configuration, and Fastino runs the training loop.
For interactive training (`interactive` job), where your application controls
each training step, follow the
[Decoder Quickstart](https://docs.fastino.ai/training/decoder-quickstart.md), which
creates an `interactive` job through
[`POST /v1/training/jobs/create-model`](https://docs.fastino.ai/api-reference/training-jobs/interactive/create-model)
or the supported Tinker SDK. This endpoint does not create interactive jobs.
After creation, both job types use their canonical IDs with the documented
`/v1/training/jobs/{job_id}` lifecycle operations.

`config` jobs train encoder models that are returned by
`GET /v1/base-models?supports_training=true` and have a compatible `config` job
dispatch route. Decoder base models return `400`; train decoders with an
`interactive` job instead.

This endpoint is limited to 20 requests per minute per user.

## Request

**X-API-Key** `string` *required*

Your Fastino API key.

**Idempotency-Key** `string`

Client-generated retry key, 1–255 characters; a UUID is recommended. Repeating the same key and body returns the original job. Reusing the key with a different body returns `422`.

**model\_name** `string` *required*

Display name for the trained model. Length: 1–100 characters.

**base\_model** `string` *required*

A trainable encoder ID returned by `GET /v1/base-models?supports_training=true`. The selected `training_type` must have a compatible dispatch route. Checkpoint UUIDs and decoder base models return `400`.

**datasets** `object[]` *required*

One or more [uploaded dataset](https://docs.fastino.ai/concepts/datasets.md) references. Each item requires `name` and may include `version`; omitted versions resolve to the latest version.

**training\_type** `string` (default: lora)

`lora` or `full`. The selected base model must support the requested type.

**validation\_data\_percentage** `number` (default: 0.2)

Fraction held out for validation, from `0` to `0.9` in increments of `0.01`.

**nr\_epochs** `integer` (default: 100)

Maximum epoch count, from `1` to `10000`; early stopping can finish sooner.

**learning\_rate** `number`

Peak learning rate from `1e-8` to `1`. Omit it to use the selected model's training recipe.

**batch\_size** `integer`

Per-device batch size from `1` to `256`. Omit it to use the model's `default_training_batch_size` from [`GET /v1/base-models?supports_training=true`](https://docs.fastino.ai/api-reference/training/base-models). A value above the model's `max_training_batch_size`, when the catalog publishes one, returns `422`. A GLiNER batch that doesn't fit the training GPU is reduced to the largest that fits; the job's `batch_size` shows the size it runs with.

**seed** `integer`

Optional reproducibility seed from `0` through `2147483647`. Set `provider_name` to `modal` when using it. A seed reduces one source of variation but does not guarantee bit-identical GPU runs.

**project\_id** `string`

Project UUID. When omitted, Fastino associates the job with the caller's default project.

**Additional training parameters**

**save\_steps** `integer` (default: 100)

Save a checkpoint every N steps, from `1` to `2147483647`.

**profile\_training** `boolean` (default: false)

Persist a structured training profile artifact.

**wandb\_api\_key** `string`

Optional Weights & Biases API key. Treat it as a secret and never put it in source control, logs, or examples.

**lora\_r** `integer`

LoRA rank from `1` to `256`. Omit it to use the model recipe.

**lora\_alpha** `integer`

Positive LoRA alpha, up to `2147483647`. Omit it to use the model recipe.

**lora\_dropout** `number`

LoRA dropout from `0` (inclusive) to `1` (exclusive). Omit it to use the model recipe.

**warmup\_ratio** `number`

Warmup fraction from `0` to `1`. Use this field to configure warmup for GLiNER jobs.

**warmup\_steps** `integer`

Absolute warmup-step count, from `1` to `2147483647`. GLiNER jobs reject this field with `422 unsupported_encoder_scheduling`; use `warmup_ratio`.

**lr\_scheduler\_type** `string`

Learning-rate schedule: `constant`, `linear`, or `cosine`. GLiNER uses `linear` when this field is omitted; only an explicit value is forwarded.

**weight\_decay** `number`

Accepted for request compatibility but not forwarded to GLiNER training. GLiNER uses its container default of `0.01`.

**early\_stopping\_patience** `integer` (default: 3)

Validation epochs without improvement before stopping, from `0` to `10000`. Set `0` to disable.

**early\_stopping\_min\_delta** `number` (default: 0.0001)

Non-negative minimum validation-loss improvement that counts as progress.

**provider\_name** `string`

Pin a compatible training provider. Omit it for automatic selection.

**encoder\_learning\_rate** `number`

GLiNER encoder learning rate from `1e-8` to `1`. Falls back to `learning_rate`.

**task\_learning\_rate** `number`

GLiNER task-head learning rate from `1e-8` to `1`. Falls back to `learning_rate`.

**gradient\_accumulation\_steps** `integer`

Positive mini-batch accumulation count, up to `2147483647`.

**auto\_data\_sizing** `boolean`

Enable GLiNER dataset auto-sizing.

**min\_samples\_per\_dataset** `integer`

GLiNER auto-sizing lower bound, from `1` to `2147483647`.

**max\_samples\_per\_dataset** `integer`

GLiNER auto-sizing upper bound, from `1` to `2147483647`.

**samples\_per\_label** `integer`

GLiNER auto-sizing scale per label, from `1` to `2147483647`.

**min\_training\_steps** `integer`

Minimum GLiNER optimizer steps, from `0` to `2147483647`.

**eval\_steps** `integer`

GLiNER2 periodic validation interval, from `1` to `2147483647` optimizer steps. Omit it to validate only at epoch end.

**max\_eval\_samples** `integer`

GLiNER2 per-dataset cap for periodic validation, from `1` to `2147483647`. Omit it for no cap.

**max\_length** `integer`

GLiNER maximum input length, from `1` to `2147483647` tokens. Omit it to use the model context limit. A value above the model's `max_training_length` from [`GET /v1/base-models?supports_training=true`](https://docs.fastino.ai/api-reference/training/base-models) returns `422`.

**max\_gold\_per\_query** `integer`

GLiNER2 maximum retained gold spans per query, from `1` to `1024`. Omit it to use `32`.

**on\_capacity\_exceeded** `string`

GLiNER2 behavior when gold spans exceed `max_gold_per_query`: `raise`, `truncate_with_warning`, or `skip_sample`. Omit it to use `raise`.

**training\_algorithm** `string` (default: sft)

Only `sft` is supported for `config` jobs. Omit it to use the default.

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

## Response

Returns `200` with the full training-job record, including a UUID `id` and initial status. The example below is abbreviated; the actual response includes all fields defined by `TrainingJobResponse`.

```json Response theme={null}
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "type": "config",
  "model_name": "my-model-name",
  "base_model": "fastino/gliner2-base-v1",
  "status": "requested",
  "training_type": "lora",
  "nr_epochs": 5,
  "learning_rate": 5e-5,
  "validation_data_percentage": 0.2
}
```

Save the `id` from this response. You will use it to poll status, retrieve metrics and artifacts, and run inference against the trained model.

A malformed body returns `422`. A valid but unavailable model, dataset, training type, or provider combination returns a request-specific `4xx` error.

Creation can return these coded conflicts:

| Status | Meaning |
| - | - |
| `402` | The account has never been funded or has exhausted its credits. |
| `403` | A payment method, account requirement, or the caller's team role blocks creation. |
| `409 duplicate_training_submission` | An identical active job was submitted in the previous 60 seconds. Poll the `job_id` from the error instead of resubmitting. |
| `409 idempotency_key_job_deleted` | The job originally created with this idempotency key was deleted. Use a new key for a new job. |
| `409` | A referenced dataset retired between validation and job insertion. Resolve the dataset and retry with a new key. |
| `422 idempotency_key_reused` | The same `Idempotency-Key` was used with a different request body. Use the original body to replay, or a new key for a new job. |
| `422 catalog_training_shape_exceeded` | `batch_size` is above the model's `max_training_batch_size`, or `max_length` is above its `max_training_length`. Read both from `GET /v1/base-models?supports_training=true` and send values within them. |
| `429` | The request rate or active `config` job limit was exceeded. A user can have at most 25 active `config` jobs. |
| `503` | Billing state could not be checked or all training providers are at capacity. Retry later with the same `Idempotency-Key`. |

The same `Idempotency-Key` and identical body replay the original job instead of creating another. A changed body with the same key returns `422`.

The 60-second identical-submission check is separate from idempotency-key
replay. After that window, sending the same body without reusing the original
key creates and bills another job. If the requested model name is already
taken, the next job receives a suffix such as `<name>_2`.

A decoder base model returns `400`:

```json theme={null}
{
  "error": {
    "message": "Decoder training on this route is retired: 'Qwen/Qwen3.6-35B-A3B' cannot be trained here. Train decoders step by step with the training job routes under /v1/training/jobs (see https://docs.fastino.ai/training/quickstart).",
    "type": "invalid_request_error",
    "param": null,
    "code": null
  }
}
```

To train a decoder, create an `interactive` job with
[`POST /v1/training/jobs/create-model`](https://docs.fastino.ai/api-reference/training-jobs/interactive/create-model)
and follow the [Decoder Quickstart](https://docs.fastino.ai/training/decoder-quickstart.md).

## Authorization

Requires the Owner, Admin, or Editor team role. Other roles receive `403 Forbidden`.


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