Predict.aiDocs
Trainings

Browse runs

List training runs with filters and pagination; inspect one run's full report.

List runs

curl "$API_BASE/v1/training?page=1&per_page=25&sort_column=accuracy_score&sort_direction=desc" \
  -H "Authorization: Bearer $TOKEN" \
  -H "X-Workspace-Id: $WORKSPACE_ID"
{
  "data": {
    "trainings": [
      {
        "uid": "7d81c3f0-…",
        "model": "",
        "blueprint_name": "",
        "created_at": "2026-07-14T02:00:04+00:00",
        "duration": 312.4,
        "cost": 40,
        "cost_unit": "credits",
        "executed": true,
        "message": "Training completed successfully",
        "accuracy_score": 0.94,
        "skill_score": 0.61,
        "comparison_metrics": "",
        "status": [
          { "action": "queued", "timestamp": "2026-07-14T02:00:04+00:00" },
          { "action": "started", "timestamp": "2026-07-14T02:00:19+00:00" },
          { "action": "completed", "timestamp": "2026-07-14T02:05:31+00:00" }
        ],
        "individual_comparisons": [
          { "ground_truth": [1201.5, 1187.0, ], "predicted": [1195.2, 1190.8, ] }
        ],
        "model_id": "9f2c41d8-…",
        "model_name": "Daily sales forecaster",
        "owner": "USER_ID",
        "last_status": "completed",
        "progress": null,
        "started_at": "2026-07-14T02:00:19+00:00",
        "completed_at": "2026-07-14T02:05:31+00:00",
        "adapter_id": "adp_9c2f…",
        "ready_for_promotion": true,
        "training_kind": "foundation",
        "report_summary": {
          "avg_train_loss": 0.0231,
          "rank": 8,
          "size_mb": 12.4,
          "family": "chronos_bolt",
          "backbone_slug": "base",
          "adapter_id": "adp_9c2f…"
        },
        "deployments": [
          { "promotion_id": "c4a7…", "deployment_type": "shared", "status": "deployed" }
        ]
      }
    ],
    "pagination": {
      "total_items": 38,
      "total_pages": 2,
      "current_page": 1,
      "per_page": 25
    },
    "total_count": 38,
    "page": 1,
    "per_page": 25,
    "total_pages": 2
  }
}

In training rows, model_id / model_name refer to the pipeline the run belongs to, and model is the catalog model's ID (blank for most foundation runs). A non-empty deployments array means the run is currently serving.

Query parameters

ParameterMeaning
page optionalPage number (1-indexed). Defaults to 1.
per_page optionalRows per page. Defaults to 100.
sort_column optionalField to sort by; accuracy_score sorts on the report score. Defaults to created_at.
sort_direction optionalasc or desc (default).
model_id optionalFilter to a single pipeline.
model_ids optionalComma-separated pipeline IDs.
segment_ids optionalComma-separated segment IDs — matches runs from any pipeline training on those segments.
statuses optionalComma-separated last_status values, e.g. completed,failed.

Filters combine: passing both model_ids and segment_ids returns only runs that satisfy both.

Inspect one run

curl "$API_BASE/v1/training/$TRAINING_ID" \
  -H "Authorization: Bearer $TOKEN" \
  -H "X-Workspace-Id: $WORKSPACE_ID"
{
  "data": {
    "uid": "7d81c3f0-…",
    "model_id": "9f2c41d8-…",
    "model_info": {
      "uid": "9f2c41d8-…",
      "name": "Daily sales forecaster",
      "description": "",
      "model": "",
      "segment": "SEGMENT_ID",
      "in_training": false,
      "forecast_horizon": 14
    },
    "model": "",
    "blueprint_info": {},
    "workspace_id": "WORKSPACE_ID",
    "owner": "USER_ID",
    "created_at": "2026-07-14T02:00:04+00:00",
    "started_at": "2026-07-14T02:00:19+00:00",
    "completed_at": "2026-07-14T02:05:31+00:00",
    "duration": 312.4,
    "cost": 40,
    "cost_unit": "credits",
    "framework": "PyTorch",
    "model_type": "Foundation LoRA (Chronos Bolt / base)",
    "model_size": "12.40 MB",
    "executed": true,
    "message": "Training completed successfully",
    "status": [  ],
    "last_status": "completed",
    "progress": null,
    "queued": false,
    "training_kind": "foundation",
    "ready_for_promotion": true,
    "adapter_id": "adp_9c2f…",
    "adapter_info": {
      "kind": "foundation",
      "adapter_id": "adp_9c2f…",
      "family": "chronos_bolt",
      "backbone_slug": "base",
      "intensity": "adapt",
      "rank": 8,
      "lookback": 512,
      "horizon": 14,
      "size_mb": 12.4,
      "avg_train_loss": 0.0231,
      "n_batches": 400,
      "visibility": "private",
      "created_at": "2026-07-14T02:05:29+00:00"
    },
    "report": {
      "accuracy_score": 0.94,
      "skill_score": 0.61,
      "comparison_metrics": "",
      "individual_comparisons": [  ],
      "feature_importance": [],
      "model_parameters": {},
      "training_metrics": {},
      "epochs": 0,
      "final_loss": 0,
      "metrics": { "avg_train_loss": 0.0231, "n_batches": 400 },
      "avg_train_loss": 0.0231,
      "rank": 8,
      "size_mb": 12.4,
      "family": "chronos_bolt",
      "backbone_slug": "base",
      "adapter_id": "adp_9c2f…",
      "val_mse": 1843.2,
      "val_mae": 31.7,
      "val_n_windows": 12,
      "val_quantile_used": 0.5
    },
    "configuration": {},
    "environment": {},
    "epochs_status": [],
    "has_epochs": false,
    "deployments": [
      { "promotion_id": "c4a7…", "deployment_type": "shared", "status": "deployed" }
    ]
  }
}

The detail response resolves everything a run touched — pipeline (model_info), catalog model (blueprint_info), fine-tuned adapter (adapter_info) — inline, so you never need a second call. Custom-model runs additionally populate epochs_status and has_epochs: true; see Concepts for how to read the scores.

Download the trained model

Every non-foundation run's artifact is yours to export — your models are never locked in:

curl "$API_BASE/v1/training/$TRAINING_ID/download" \
  -H "Authorization: Bearer $TOKEN" \
  -H "X-Workspace-Id: $WORKSPACE_ID"
{
  "data": {
    "download_url": "https://celmind-models.s3.amazonaws.com/…&X-Amz-Expires=3600…",
    "filename": "7d81c3f0-4a2e-4c9b-9f10-2b8d5e6a7c31.onnx",
    "format": "sklearn",
    "expires_in_seconds": 3600
  }
}

The URL is valid for one hour; request a fresh one any time. The file saves under the training's ID (the link carries a Content-Disposition header, so the name is applied automatically). What you get depends on how the model was trained:

TrainingFile
Custom — scikit-learn / XGBoostthe serialized model.onnx (served format)
Custom — PyTorchthe TorchScript model.pt
Custom — TensorFlowthe SavedModel directory, zipped (….savedmodel.zip, built on first request and cached)
BYOMthe original file you uploaded

Foundation runs are not downloadable: a fine-tuning run produces a small adapter on top of the foundation model's shared pretrained weights, which aren't a per-training artifact. Those requests return 403 not_downloadable.

StatusWhyExample message
403Foundation trainingerror.code not_downloadable
404Artifact gone from storage (cleaned up, or the run predates artifact storage)"Model artifact not found in storage…"
409Run still in progress or failed before serializationerror.code not_downloadable, includes last_status

Errors

The list and detail routes return errors as { "status": "<message>" }:

StatusWhyExample message
400X-Workspace-Id header missing"Workspace ID is missing"
401Token missing or invalid"User context not found"
403No access to this workspace"Access denied to this workspace"
404Training doesn't exist in this workspace"Training with ID … not found"

On this page