> ## 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.

# Stop a training job

> Stop a running Fastino training job while preserving existing checkpoints.

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

Stops a running job and preserves checkpoints created before the stop.

## Request

<ParamField header="X-API-Key" type="string" required>
  Your Fastino API key.
</ParamField>

<ParamField path="job_id" type="string" required>
  Training-job UUID.
</ParamField>

The JSON body is optional.

<ParamField body="reason" type="string">
  Why the job was stopped.
</ParamField>

<ParamField body="scores" type="object">
  Numeric metrics used to make the stop decision.
</ParamField>

<ParamField body="checkpoint" type="string">
  Checkpoint path or step associated with the stop.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.fastino.ai/v1/training-jobs/YOUR_TRAINING_JOB_ID/stop \
    -H "X-API-Key: $FASTINO_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"reason": "Validation loss stopped improving"}'
  ```
</RequestExample>

## Response

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

An unknown job or a job that cannot be stopped returns a request-specific `4xx` error.
