Search documentation
karat

+

K

User Documentation ↗
Version 2.0

Get Model Version

GET/api/v2/models/{modelRid}/versions/{modelVersionRid}
Warning

This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add preview=true to the request query parameters.

Retrieves a Model Version by its Resource Identifier (RID).

Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:models-read.

Path parameters

modelRid
string

The Resource Identifier (RID) of a Model.

modelVersionRid
string

The Resource Identifier (RID) of a Model Version.

Query parameters

preview
boolean
optional

Enables the use of preview functionality.

Response body

ModelVersion
object
Hide child attributes

Hide child attributes

rid
string

The Resource Identifier (RID) of a Model Version.

modelApi
object

The Model API is a specification that describes the inputs and outputs of a machine learning model. It is used to define the interface for the model, including the types of data that can be passed to it and the types of data that it will return.

Show child attributes

Show child attributes

condaRequirements
list<string>
optional
backingRepositories
list<rid>
optional
createdTime
string

The time at which the resource was created.

source
union
optional

The source from which this model version was created.

Show child attributes

Show child attributes

linkedExperiment
string
optional

The Experiment linked to this Model Version, if one exists.

Examples

Request

Copied!
1 2 3 curl \ \t-H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/models/ri.models.main.model.f351c142-0e4c-4b12-adc2-6e1539737ae9/versions/ri.models.main.model-version.adf94926-c3ac-41ea-beb2-4946699d08ee?preview=true"

Response

Copied!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 { "backingRepositories": [ "ri.stemma.main.repository.a1b2c3d4-e5f6-7890-abcd-ef1234567890" ], "condaRequirements": [ "numpy==1.24.0", "pandas==2.0.0" ], "linkedExperiment": "ri.models.main.experiment.abc123", "modelApi": { "inputs": [ { "name": "input_df", "required": true, "type": "tabular", "columns": [ { "name": "feature_1", "required": true, "dataType": { "type": "double" } }, { "name": "feature_2", "required": true, "dataType": { "type": "integer" } } ], "format": "PANDAS" } ], "outputs": [ { "name": "output_df", "required": true, "type": "tabular", "columns": [ { "name": "prediction", "required": true, "dataType": { "type": "double" } } ], "format": "SPARK" } ] }, "createdTime": "2003-05-06T12:34:56.789Z", "rid": "ri.models.main.model-version.adf94926-c3ac-41ea-beb2-4946699d08ee" }

Error responses

Error Name
UnsupportedModelSourceError CodeINVALID_ARGUMENT
Status Code400
DescriptionThe Model Version has a source type that is not supported by the API. This can occur when the model was created through a legacy or internal workflow that is not exposed through the public API.
Parameters
ModelVersionNotFoundError CodeNOT_FOUND
Status Code404
DescriptionThe given ModelVersion could not be found.
ParametersmodelRid, modelVersionRid