Skip to main content

Get Model Version

Page Outline

Retrieves the full detail record for a single model version, including training metadata and evaluation metrics.

Base Path: /api/v1/models

Method: GET

Path: /{model_id}/versions/{version_id}

Auth: Requires a valid Bearer token (Authorization: Bearer <JWT>)

Path Parameters

ParameterTypeDescription
model_idstringUnique identifier of the parent model
version_idstringUnique identifier of the version (e.g., ver-001)

Behavior

  • Returns HTTP 404 if the version does not exist or does not belong to the given model_id.
  • Returns HTTP 403 if the caller lacks read access to the model.
  • The hyperparameters field contains the exact training configuration used to produce this version.
  • The artifacts field lists storage paths for the serialized model files (e.g., pickle, ONNX).

Response

Returns a full ModelVersion object.

{
"version_id": "ver-001",
"model_id": "mdl-7f3a19bc",
"version_number": 3,
"is_promoted": true,
"status": "ready",
"algorithm": "xgboost",
"hyperparameters": {
"n_estimators": 200,
"max_depth": 6,
"learning_rate": 0.05
},
"metrics": {
"accuracy": 0.934,
"f1_score": 0.921,
"roc_auc": 0.967
},
"artifacts": {
"model_file": "s3://rivergen-models/mdl-7f3a19bc/v3/model.pkl",
"onnx_file": "s3://rivergen-models/mdl-7f3a19bc/v3/model.onnx"
},
"trained_at": "2026-03-13T14:22:10Z",
"trained_by": "user-001",
"training_duration_seconds": 312
}