> ## 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/openapi.json as the source of truth for customer-facing Fastino API routes. Only call operations present in that specification. Do not infer or call undocumented routes. Direct Fastino API integrations use https://api.fastino.ai, /v1 routes, and FASTINO_API_KEY.

# 终止训练任务

> 终止 Fastino 训练任务并删除其所有检查点。

`POST /v1/training-jobs/{job_id}/terminate`

如果提供方任务仍处于活动状态,则将其停止,删除每一个检查点,并将任务标记为已终止。

<Warning>
  终止操作不可撤销。如果您需要保留检查点,请使用停止端点。
</Warning>

## 请求

<ParamField header="X-API-Key" type="string" required>
  您的 Fastino API 密钥。
</ParamField>

<ParamField path="job_id" type="string" required>
  训练任务 UUID。
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.fastino.ai/v1/training-jobs/YOUR_TRAINING_JOB_ID/terminate \
    -H "X-API-Key: $FASTINO_API_KEY"
  ```
</RequestExample>

## 响应

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "message": "Training job terminated",
    "job_id": "YOUR_TRAINING_JOB_ID",
    "deleted_checkpoints": 3
  }
  ```
</ResponseExample>

未知任务或无法终止的任务返回请求相关的 `4xx` 错误。
