Downloading MLFlow models using API endpoint
The API endpoint allows you to download a model artifact for a specific model version in the Cloudera AI Registry.
It supports only models that use the MLFLOW repository type, other repository types are not compatible.
| Attribute | Value |
|---|---|
| HTTP Method | GET |
| URI | /models/[***MODEL ID***]/versions/[***MODEL VERSION***]/artifact |
| Description | Downloads the model artifact, for example, a compressed file containing the model files, for a specified model version. |
| Supported Repo Type | mlflow |
| Authentication |
Required (Bearer Token) Ensure the provided Bearer Token has the necessary permissions to access the specified model and version in the Cloudera AI Registry. |
| Name | Type | Description |
|---|---|---|
model_id |
string | The unique identifier of the model. |
version |
integer | The specific version number of the model artifact to download. |
| Name | Type | Descripion |
|---|---|---|
accept |
string |
Required Must be set to |
Authorization |
string |
Required Bearer token for authentication. Format: |
Example: Downloading MLFlow models using API endpoint
The following example demonstrates how to use cURL to download the
artifact for model ID ya9m-xegj-6oci-4jag, version 2.
curl -X 'GET' \
'https://registry-9901.apps.ram919-tst.kcloud.cloudera.com/api/v2/models/ya9m-xegj-6oci-4jag/versions/2/artifact' \
-H 'accept: multipart/form-data' \
-H 'Authorization: Bearer eyJraNi.......YWxnIjoi' \
--output churnpredictor-2.tar.gz
The --output churnpredictor-2.tar.gz flag is added to the
cURL example to save the downloaded artifact to disk. The
actual file extension may vary depending on how the MLflow artifact was packaged,
commonly as a .tar.gz file.
For MLflow models, the artifact is typically a directory structure that the registry compresses for transfer. The downloaded content corresponds to the artifact path stored in MLflow for that run.
| Header | Value | Description |
|---|---|---|
content-disposition |
attachment filename: |
Instructs the browser or client to download the response as a
file attachment rather than display it inline. The filename
parameter specifies the suggested name for the downloaded file,
using the format
model-name-versionnumber.tar.gz |
content-type |
application/octet-stream |
Indicates the response body is a raw binary stream with no specific media type. This is the generic MIME type used for file downloads when the exact format is not declared. |
date |
Mon, 30 Mar 2026 21:06:04 GMT | The date and time when the server generated the response, expressed in UTC (GMT) format. It follows the HTTP date format defined in RFC 7231 HTTP/1.1: Semantics and Content. |
| Status code | Description |
|---|---|
401 Unauthorized |
Invalid or missing Authorization
header. |
404 Not Found |
The specified model_id or
version does not exist, or the model is not
of the mlflow type. |
500 Internal Server Error |
An unexpected server-side error occurred. |
