Training

Send a training event

Changed on

Receives callbacks from an existing training process; does not provision compute. For initial training_started registration, supply project and optionally name (defaults to train); an existing username prefix selects that workspace and requires editor access; other paths belong to the caller. Retain the returned modelId, runId, and modelSlug; send modelId on subsequent events. modelUrl links to the model. Honor cancelled=true responses. checkpoint_saved promotes an uploaded checkpoint only for its runId. This contract covers Bearer API-key callbacks, including assigned workers. Existing signed cloud callbacks instead use X-Alpha-Job-Id (model ID) and X-Alpha-Signature (HMAC-SHA256 of the exact request body with the job webhook secret).

post/api/webhooks/training/metrics

Request

  • Base URL
    https://platform.ultralytics.com
  • Auth
    HTTP bearer

Request body

modelIdstring
projectstring
namestring
event'training_started' | 'training_progress' | 'epoch_end' | 'system_metrics' | 'console_output' | 'checkpoint_saved' | 'training_complete' | 'training_failed' required
dataobject required

Event-specific callback data, preserving original field names and nested values. training_started: trainArgs, epochs, device, environment, modelInfo. epoch_end: epoch, metrics, system, fitness, modelInfo, total_epochs or epochs_total. system_metrics: cpu, memory, disk, diskIo, network, gpus. console_output: content, lineCount, chunkId, progress. checkpoint_saved: runId, modelPath (the upload response gcsPath), uploadPath. training_complete: runId, results, classNames, plots. training_failed: error, code, instanceId. training_progress: liveness data. Worker callbacks include runId when available.

Response

Event acknowledged

receivedtrue required
eventstring required
mode'cloud' | 'remote'
modelIdstring
runIdinteger

Run start time in Unix milliseconds; retain for checkpoints

modelSlugstring

Final model slug assigned during registration

modelUrlstring

Platform URL of the registered model

cancelledboolean

Stop training when true, including during startup

action'training_terminated'
reasonstring
warningstring
ignored'stale_instance'

Changes