Cancel a nonterminal fine-tuning job

If a real workflow binding exists, cancellation is requested first, then cancelled is persisted. Terminal jobs return 409. This does not delete history, recover all files, or immediately stop every training subprocess.

POST https://api.moi.matrixorigin.cn/v5/workspaces/{id}/finetune-jobs/{job_id}/cancel

Before you call this API

Set BASE_URL to the product API prefix https://api.moi.matrixorigin.cn/v5; use the corresponding product API URL for a dedicated deployment.

Prepare identity, training inputs, and environment. Example IDs and results are fixed illustrative values. Replace models, run_id, request_id, and compute instances before calling.

Request

curl --request POST \
  "$BASE_URL/workspaces/$WORKSPACE_ID/finetune-jobs/$JOB_ID/cancel" \
  --header "X-API-Key: $MOI_KEY" \
  --header "X-Workspace-ID: $WORKSPACE_ID"

Parameter

Location

Type

Required

Description

id

Path

string

Yes

Target workspace ID, matching X-Workspace-ID.

X-Workspace-ID

Headers

string

Yes

Workspace accessible to the current identity in the same environment.

job_id

Path

string

Yes

Fine-tuning job_id returned by successful creation.

Successful response

{
  "code": "OK",
  "msg": "OK",
  "data": {
    "job_id": "ftj-example",
    "workspace_id": "workspace-example",
    "request_id": "request-example",
    "base_model": "example/base-model",
    "status": "cancelled",
    "train_run_ids": [
      "train-run-1",
      "train-run-2"
    ],
    "holdout_run_ids": [
      "holdout-run-1"
    ],
    "recipe": {
      "training_objective": "tool_selector"
    },
    "compute_resource_id": "resource-example",
    "created_at": "2026-11-12T01:00:00Z",
    "updated_at": "2026-11-12T01:00:00Z",
    "mowl_task_id": "workflow-task-example",
    "mowl_case_id": "workflow-case-example",
    "started_at": "2026-11-12T01:00:00Z",
    "error_code": "cancelled",
    "error_message": "cancelled by user",
    "finished_at": "2026-11-12T01:00:00Z"
  }
}

Field

Type

Description

code

string

OK on success.

msg

string

Response information.

data

object

Job objects and omission rules.

Errors and next steps

Lifecycle and recovery distinguishes parameters, identity, conflicts, saved jobs, and actual training outcomes.

Last updated on