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

# 提交托管编码器计划

> 向新的交互式编码器任务提交 GLiNER2 托管训练计划，然后轮询返回的 future_id，直到计划完成。

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

通过一次调用，在交互式编码器任务上运行完整的 GLiNER2 训练计划。
计划由 GLiNER2 库的 `ManagedTrainingPlan` 生成，包含训练和评估示例、精确的批次安排、评估设置以及计划内容的指纹。响应是一个 future。可通过以下接口读取其状态，并在完成后读取选定的检查点和续训检查点：
[`GET /v1/training/jobs/{job_id}/futures/{future_id}`](https://docs.fastino.ai/cn/api-reference/training-jobs/interactive/get-future).

* Fastino 托管 API 不提供交互式编码器任务，因此托管计划无法在其上运行。如需在托管 API 上训练 GLiNER 模型，请使用 [`POST /v1/training/jobs`](https://docs.fastino.ai/cn/api-reference/training-jobs/create) 并提供数据集。
* 在提供交互式编码器任务的环境中，将计划发送到使用 [`POST /v1/training/jobs/create-model`](https://docs.fastino.ai/cn/api-reference/training-jobs/interactive/create-model)、编码器基础模型和 `encoder_config` 创建的新编码器任务。计划必须与任务的编码器和 LoRA 设置一致，这些设置不可更改。
* 一个计划会占用任务，直到计划完成或任务停止。在此期间，该任务上的其他交互式操作会被拒绝。
* 再次发送同一计划会返回同一个 future。向同一任务发送不同的计划会返回 `409`。
* 计划最大为 8 MiB。
* 此路由不会转换由数据集创建的训练任务。

## 请求

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

您的 Fastino API 密钥。

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

交互式编码器任务 ID。

**version** `integer` *required*

计划格式版本。始终为 `1`。

**fingerprint** `string` *required*

计划内容的 SHA-256，为 64 个小写十六进制字符。由 GLiNER2 库计算。内容与指纹不一致的计划会被拒绝。

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

GLiNER2 库给出的计划源指纹，为 64 个小写十六进制字符。

**architecture** `string` *required*

`span` 或 `boundary`。

**word\_splitter** `string`

`whitespace`、`mixed` 或 `mixed_unicode_v1`。省略或发送 `null` 表示使用默认值。

**config** `object` *required*

计划的训练配置，由 GLiNER2 库生成。

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

优化器更新次数，1 到 1,000,000。必须等于 `update: true` 的批次数。

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

训练示例，至少一个。每个示例包含 `input`（string）和 `output`（object），用于编码器支持的任务。

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

精确的批次安排，至少一个批次。最后一个批次必须为 `update: true`。

**属性**

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

`examples` 中的位置，每个批次 1 到 64 个。每个位置都必须小于示例数量。

**epoch** `integer` *required*

轮次编号，从 `0` 开始。

**update** `boolean` *required*

该批次之后是否执行优化器更新。

**evaluate** `boolean` *required*

该批次之后是否运行评估。

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

评估示例，格式与 `examples` 相同。可以为空。

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

评估批次大小，1 到 64。

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

是否保留评估指标最佳的检查点。

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

评估指标是否越高越好。

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

训练停止前允许的无改进评估次数，至少为 `1`。发送 `null` 可关闭提前停止。

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

评估指标中计为改进的最小变化，至少为 `0`。

## 响应

`202 Accepted`

**future\_id** `string`

使用以下接口轮询：
[`GET /v1/training/jobs/{job_id}/futures/{future_id}`](https://docs.fastino.ai/cn/api-reference/training-jobs/interactive/get-future).

**job\_id** `string`

运行该计划的任务。

**type** `string`

该 future 跟踪的调用类型。

## 错误

| 状态 | 含义 |
| - | - |
| `409` | 任务已停止、其会话处于非活动状态，或已向其发送了不同的计划。 |
| `413` | 计划超过 8 MiB。 |
| `422` | 请求体无效：指纹与内容不一致、`update` 批次数不等于 `max_steps`、最后一个批次没有更新、某个批次引用了不存在的示例，或某个示例与编码器不匹配。 |


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