queued 或 running 的任务。其他状态返回 409 Conflict。成功后任务转为 cancelled,并在可能时退还预扣费用。
方法与路径
认证
路径参数
string
required
任务标识符。
请求体
无。响应
返回202:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
取消仍处于 queued 或 running 的训练任务。返回 202 以及更新后的 job_id 与 status。
queued 或 running 的任务。其他状态返回 409 Conflict。成功后任务转为 cancelled,并在可能时退还预扣费用。
POST /v1/jobs/:id/cancel
Authorization: Bearer <jwt-or-api-key>
202:
{
"code": 0,
"data": {
"job_id": "jb_abc123def456",
"status": "cancelled"
},
"message": ""
}
curl -s -X POST http://localhost:8001/v1/jobs/jb_abc123def456/cancel \
-H "Authorization: Bearer $PIN_API_TOKEN"
| Code | HTTP | 含义 |
|---|---|---|
| 401 | 401 | 缺失或无效的 Bearer 令牌。 |
| 404 | 404 | 任务不存在或不属于你。 |
| 409 | 409 | 当前状态不可取消(非 queued 或 running)。 |
Was this page helpful?