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.

Table 1. Endpoint details
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.

Table 2. Path parameters
Name Type Description
model_id string The unique identifier of the model.
version integer The specific version number of the model artifact to download.
Table 3. Headers
Name Type Descripion
accept string

Required

Must be set to multipart/form-data to receive the artifact as a downloadable file.

Authorization string

Required

Bearer token for authentication. Format: Bearer [***YOUR TOKEN***].

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.

For more information on possible reponses, see the tables.
Table 4.
Header Value Description
content-disposition

attachment

filename: churnpredictor-2.tar.gz

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.
Table 5.
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.