---
title: "Cancel a training"
method: POST
path: "/trainings/{training_id}/cancel"
---

# Cancel a training

`POST /trainings/{training_id}/cancel`

## Path parameters

- `training_id` string, required

## Response `200`

Success

- SchemasTrainingResponse
  - `completed_at` string, date-time — The time when the training completed
  - `created_at` string, date-time — The time when the training was created
  - `error` string, nullable — Error message if the training failed
  - `id` string — The unique ID of the training
  - `input` object — The input parameters used for the training
  - `logs` string — The logs from the training process
  - `metrics` object — Metrics about the training process
    - `predict_time` number — The amount of CPU or GPU time, in seconds, that the training used while running
    - `total_time` number — The total time, in seconds, that the training took to complete
  - `model` string — The name of the model in the format owner/name
  - `output` object — The output of the training process
    - `version` string — The version of the model created by the training
    - `weights` string — The weights of the trained model
  - `source` 'web' | 'api' — How the training was created
  - `started_at` string, date-time — The time when the training started
  - `status` 'starting' | 'processing' | 'succeeded' | 'failed' | 'canceled' — The current status of the training
  - `urls` object — URLs for interacting with the training
    - `cancel` string, uri — URL to cancel the training
    - `get` string, uri — URL to get the training details
  - `version` string — The ID of the model version used for training

---

[API](https://skmtc.net/replicate/apis/replicate-http-api.md) · [All operations](https://skmtc.net/replicate/apis/replicate-http-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/replicate/replicate-http-api/versions/7a537f433b0b/schema)
