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"from predictai import PredictAI
client = PredictAI(token="pa_live_…", workspace_id="ws_…")
data = client.trainings.get_training(params={
"page": 1,
"per_page": 25,
"sort_column": "accuracy_score",
"sort_direction": "desc",
})
import { PredictAI } from "@predictai/sdk";
const client = new PredictAI({ token: "pa_live_…", workspaceId: "ws_…" });
const data = await client.trainings.getTraining({
params: {
page: 1,
per_page: 25,
sort_column: "accuracy_score",
sort_direction: "desc",
},
});
{
"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
| Parameter | Meaning |
|---|---|
page optional | Page number (1-indexed). Defaults to 1. |
per_page optional | Rows per page. Defaults to 100. |
sort_column optional | Field to sort by; accuracy_score sorts on the report score. Defaults to created_at. |
sort_direction optional | asc or desc (default). |
model_id optional | Filter to a single pipeline. |
model_ids optional | Comma-separated pipeline IDs. |
segment_ids optional | Comma-separated segment IDs — matches runs from any pipeline training on those segments. |
statuses optional | Comma-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"from predictai import PredictAI
client = PredictAI(token="pa_live_…", workspace_id="ws_…")
data = client.trainings.get_training_by_training_id(TRAINING_ID)
import { PredictAI } from "@predictai/sdk";
const client = new PredictAI({ token: "pa_live_…", workspaceId: "ws_…" });
const data = await client.trainings.getTrainingByTrainingId(TRAINING_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"from predictai import PredictAI
client = PredictAI(token="pa_live_…", workspace_id="ws_…")
data = client.trainings.get_training_by_training_id_download(TRAINING_ID)
import { PredictAI } from "@predictai/sdk";
const client = new PredictAI({ token: "pa_live_…", workspaceId: "ws_…" });
const data = await client.trainings.getTrainingByTrainingIdDownload(TRAINING_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:
| Training | File |
|---|---|
| Custom — scikit-learn / XGBoost | the serialized model.onnx (served format) |
| Custom — PyTorch | the TorchScript model.pt |
| Custom — TensorFlow | the SavedModel directory, zipped (….savedmodel.zip, built on first request and cached) |
| BYOM | the 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.
| Status | Why | Example message |
|---|---|---|
403 | Foundation training | error.code not_downloadable |
404 | Artifact gone from storage (cleaned up, or the run predates artifact storage) | "Model artifact not found in storage…" |
409 | Run still in progress or failed before serialization | error.code not_downloadable, includes last_status |
Errors
The list and detail routes return errors as { "status": "<message>" }:
| Status | Why | Example message |
|---|---|---|
400 | X-Workspace-Id header missing | "Workspace ID is missing" |
401 | Token missing or invalid | "User context not found" |
403 | No access to this workspace | "Access denied to this workspace" |
404 | Training doesn't exist in this workspace | "Training with ID … not found" |

