> ## 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 训练任务分配到某个项目,或从项目中取消分配。

`PATCH /v1/training-jobs/{job_id}`

仅更新任务的 `project_id`。

## 请求

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

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

<ParamField body="project_id" type="string | null">
  要分配的项目 UUID。发送 `null` 以取消分配该任务。
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH https://api.fastino.ai/v1/training-jobs/YOUR_TRAINING_JOB_ID \
    -H "X-API-Key: $FASTINO_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"project_id": "YOUR_PROJECT_ID"}'
  ```
</RequestExample>

## 响应

返回 `200`,包含 `success` 和 `message`。

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "message": "Training job project updated"
  }
  ```
</ResponseExample>

<Note>
  这只会改变训练任务的项目归属标记。它不会迁移相关的部署、推理或评估运行。
</Note>

未知的请求字段(包括训练任务的其他字段)会返回 `422`。不可用的任务或项目会返回请求相关的 `4xx` 错误。
