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

# Detener un trabajo de entrenamiento

> Detén un trabajo de entrenamiento en ejecución de Fastino preservando los checkpoints existentes.

Detiene un trabajo en ejecución y preserva los checkpoints creados antes de la detención.

## Solicitud

<ParamField header="X-API-Key" type="string" required>
  Tu clave de API de Fastino.
</ParamField>

<ParamField path="job_id" type="string" required>
  UUID del trabajo de entrenamiento.
</ParamField>

El cuerpo JSON es opcional.

<ParamField body="reason" type="string">
  Por qué se detuvo el trabajo.
</ParamField>

<ParamField body="scores" type="object">
  Métricas numéricas usadas para tomar la decisión de detención.
</ParamField>

<ParamField body="checkpoint" type="string">
  Ruta o paso del checkpoint asociado con la detención.
</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>

## Respuesta

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

Un trabajo desconocido o un trabajo que no puede detenerse devuelve un error `4xx` específico de la solicitud.
