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

# Submit a managed encoder plan

> Submit a GLiNER2 managed training plan to a fresh interactive encoder job, then poll the returned future_id until the plan finishes.

`POST /v1/training/jobs/{job_id}/managed-plan`

Runs a whole GLiNER2 training plan on an interactive encoder job in one call.
The GLiNER2 library's `ManagedTrainingPlan` writes the plan: the training and
evaluation examples, the exact batch schedule, the evaluation settings, and a
fingerprint of the plan's contents. The response is a future. Read its status,
and the selected and continuation checkpoints once it finishes, from
[`GET /v1/training/jobs/{job_id}/futures/{future_id}`](https://docs.fastino.ai/api-reference/training-jobs/interactive/get-future).

* Fastino's hosted API doesn't offer interactive encoder jobs, so managed
  plans don't run there. To train a GLiNER model on the hosted API, use
  [`POST /v1/training/jobs`](https://docs.fastino.ai/api-reference/training-jobs/create) with a dataset.
* Where interactive encoder jobs are offered, send the plan to a fresh encoder
  job created with [`POST /v1/training/jobs/create-model`](https://docs.fastino.ai/api-reference/training-jobs/interactive/create-model), an encoder base model and `encoder_config`. The
  plan must match the job's encoder and LoRA settings, which can't change.
* One plan owns the job until the plan finishes or the job stops. Other
  interactive operations on the job are refused meanwhile.
* Sending the same plan again returns the same future. Sending a different plan
  to the same job returns `409`.
* A plan can be at most 8 MiB.
* This route doesn't convert a training job created from datasets.

## Request

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

Your Fastino API key.

**job\_id** `string` *required*

Interactive encoder job ID.

**version** `integer` *required*

Plan format version. Always `1`.

**fingerprint** `string` *required*

SHA-256 of the plan's contents, as 64 lowercase hexadecimal characters. The
GLiNER2 library computes it. A plan whose contents don't match its
fingerprint is rejected.

**source\_fingerprint** `string` *required*

The plan's source fingerprint from the GLiNER2 library, as 64 lowercase
hexadecimal characters.

**architecture** `string` *required*

`span` or `boundary`.

**word\_splitter** `string`

`whitespace`, `mixed` or `mixed_unicode_v1`. Omit it or send `null` for the
default.

**config** `object` *required*

The plan's training configuration, as written by the GLiNER2 library.

**max\_steps** `integer` *required*

Number of optimizer updates, from 1 through 1,000,000. It must equal the
number of batches with `update: true`.

**examples** `object[]` *required*

Training examples, at least one. Each has `input` (string) and `output`
(object) for a task the encoder supports.

**batches** `object[]` *required*

The exact batch schedule, at least one batch. The last batch must have
`update: true`.

**properties**

**indices** `integer[]` *required*

Positions in `examples`, from 1 to 64 per batch. Each must be less than
the number of examples.

**epoch** `integer` *required*

Epoch number, from `0`.

**update** `boolean` *required*

Whether an optimizer update follows this batch.

**evaluate** `boolean` *required*

Whether evaluation runs after this batch.

**eval\_examples** `object[]` *required*

Evaluation examples, in the same shape as `examples`. May be empty.

**eval\_batch\_size** `integer` *required*

Evaluation batch size, from 1 through 64.

**save\_best** `boolean` *required*

Whether to keep the checkpoint with the best evaluation metric.

**greater\_is\_better** `boolean` *required*

Whether a higher evaluation metric is better.

**early\_stopping\_patience** `integer | null` *required*

Evaluations without improvement before training stops, at least `1`. Send
`null` to turn early stopping off.

**early\_stopping\_threshold** `number` *required*

Smallest change in the evaluation metric that counts as an improvement, at
least `0`.

## Response

`202 Accepted`

**future\_id** `string`

Poll it with
[`GET /v1/training/jobs/{job_id}/futures/{future_id}`](https://docs.fastino.ai/api-reference/training-jobs/interactive/get-future).

**job\_id** `string`

The job the plan runs on.

**type** `string`

The kind of call the future tracks.

## Errors

| Status | Meaning |
| - | - |
| `409` | The job is stopped, its session is inactive, or a different plan was already sent to it. |
| `413` | The plan is larger than 8 MiB. |
| `422` | The body is invalid: the fingerprint doesn't match the contents, the number of `update` batches doesn't equal `max_steps`, the last batch has no update, a batch names an example that doesn't exist, or an example doesn't fit the encoder. |


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