> > [!WARNING]
> > **Warning:** This API is now obsolete.
>
> Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom models, you must migrate to another solution. You can use Cloud Storage for Firebase as an alternative for hosting custom models. For more info, see https://firebase.google.com/docs/ml/migrate-to-cloud-storage

The Firebase `MachineLearning` service interface.

**Signature:**

    export declare class MachineLearning 

## Properties

| Property | Modifiers | Type | Description |
|---|---|---|---|
| [app](https://firebase.google.com/docs/reference/admin/node/firebase-admin.machine-learning.machinelearning#machinelearningapp) |   | App | The [App](https://firebase.google.com/docs/reference/admin/node/firebase-admin.app.app#app_interface) associated with the current `MachineLearning` service instance. |

## Methods

| Method | Modifiers | Description |
|---|---|---|
| [createModel(model)](https://firebase.google.com/docs/reference/admin/node/firebase-admin.machine-learning.machinelearning#machinelearningcreatemodel) |   | Creates a model in the current Firebase project. |
| [deleteModel(modelId)](https://firebase.google.com/docs/reference/admin/node/firebase-admin.machine-learning.machinelearning#machinelearningdeletemodel) |   | Deletes a model from the current project. |
| [getModel(modelId)](https://firebase.google.com/docs/reference/admin/node/firebase-admin.machine-learning.machinelearning#machinelearninggetmodel) |   | Gets the model specified by the given ID. |
| [listModels(options)](https://firebase.google.com/docs/reference/admin/node/firebase-admin.machine-learning.machinelearning#machinelearninglistmodels) |   | Lists the current project's models. |
| [publishModel(modelId)](https://firebase.google.com/docs/reference/admin/node/firebase-admin.machine-learning.machinelearning#machinelearningpublishmodel) |   | Publishes a Firebase ML model.A published model can be downloaded to client apps. |
| [unpublishModel(modelId)](https://firebase.google.com/docs/reference/admin/node/firebase-admin.machine-learning.machinelearning#machinelearningunpublishmodel) |   | Unpublishes a Firebase ML model. |
| [updateModel(modelId, model)](https://firebase.google.com/docs/reference/admin/node/firebase-admin.machine-learning.machinelearning#machinelearningupdatemodel) |   | Updates a model's metadata or model file. |

## MachineLearning.app

The [App](https://firebase.google.com/docs/reference/admin/node/firebase-admin.app.app#app_interface) associated with the current `MachineLearning` service instance.

**Signature:**

    get app(): App;

## MachineLearning.createModel()

> > [!WARNING]
> > **Warning:** This API is now obsolete.
>
> Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom models, you must migrate to another solution. You can use Cloud Storage for Firebase as an alternative for hosting custom models. For more info, see https://firebase.google.com/docs/ml/migrate-to-cloud-storage

Creates a model in the current Firebase project.

**Signature:**

    createModel(model: ModelOptions): Promise<Model>;

### Parameters

| Parameter | Type | Description |
|---|---|---|
| model | [ModelOptions](https://firebase.google.com/docs/reference/admin/node/firebase-admin.machine-learning#modeloptions) | The model to create. |

**Returns:**

Promise\<[Model](https://firebase.google.com/docs/reference/admin/node/firebase-admin.machine-learning.model#model_class)\>

A Promise fulfilled with the created model.

## MachineLearning.deleteModel()

> > [!WARNING]
> > **Warning:** This API is now obsolete.
>
> Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom models, you must migrate to another solution. You can use Cloud Storage for Firebase as an alternative for hosting custom models. For more info, see https://firebase.google.com/docs/ml/migrate-to-cloud-storage

Deletes a model from the current project.

**Signature:**

    deleteModel(modelId: string): Promise<void>;

### Parameters

| Parameter | Type | Description |
|---|---|---|
| modelId | string | The ID of the model to delete. |

**Returns:**

Promise\<void\>

## MachineLearning.getModel()

> > [!WARNING]
> > **Warning:** This API is now obsolete.
>
> Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom models, you must migrate to another solution. You can use Cloud Storage for Firebase as an alternative for hosting custom models. For more info, see https://firebase.google.com/docs/ml/migrate-to-cloud-storage

Gets the model specified by the given ID.

**Signature:**

    getModel(modelId: string): Promise<Model>;

### Parameters

| Parameter | Type | Description |
|---|---|---|
| modelId | string | The ID of the model to get. |

**Returns:**

Promise\<[Model](https://firebase.google.com/docs/reference/admin/node/firebase-admin.machine-learning.model#model_class)\>

A Promise fulfilled with the model object.

## MachineLearning.listModels()

> > [!WARNING]
> > **Warning:** This API is now obsolete.
>
> Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom models, you must migrate to another solution. You can use Cloud Storage for Firebase as an alternative for hosting custom models. For more info, see https://firebase.google.com/docs/ml/migrate-to-cloud-storage

Lists the current project's models.

**Signature:**

    listModels(options?: ListModelsOptions): Promise<ListModelsResult>;

### Parameters

| Parameter | Type | Description |
|---|---|---|
| options | [ListModelsOptions](https://firebase.google.com/docs/reference/admin/node/firebase-admin.machine-learning.listmodelsoptions#listmodelsoptions_interface) | The listing options. |

**Returns:**

Promise\<[ListModelsResult](https://firebase.google.com/docs/reference/admin/node/firebase-admin.machine-learning.listmodelsresult#listmodelsresult_interface)\>

A promise that resolves with the current (filtered) list of models and the next page token. For the last page, an empty list of models and no page token are returned.

## MachineLearning.publishModel()

> > [!WARNING]
> > **Warning:** This API is now obsolete.
>
> Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom models, you must migrate to another solution. You can use Cloud Storage for Firebase as an alternative for hosting custom models. For more info, see https://firebase.google.com/docs/ml/migrate-to-cloud-storage

Publishes a Firebase ML model.

A published model can be downloaded to client apps.

**Signature:**

    publishModel(modelId: string): Promise<Model>;

### Parameters

| Parameter | Type | Description |
|---|---|---|
| modelId | string | The ID of the model to publish. |

**Returns:**

Promise\<[Model](https://firebase.google.com/docs/reference/admin/node/firebase-admin.machine-learning.model#model_class)\>

A Promise fulfilled with the published model.

## MachineLearning.unpublishModel()

> > [!WARNING]
> > **Warning:** This API is now obsolete.
>
> Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom models, you must migrate to another solution. You can use Cloud Storage for Firebase as an alternative for hosting custom models. For more info, see https://firebase.google.com/docs/ml/migrate-to-cloud-storage

Unpublishes a Firebase ML model.

**Signature:**

    unpublishModel(modelId: string): Promise<Model>;

### Parameters

| Parameter | Type | Description |
|---|---|---|
| modelId | string | The ID of the model to unpublish. |

**Returns:**

Promise\<[Model](https://firebase.google.com/docs/reference/admin/node/firebase-admin.machine-learning.model#model_class)\>

A Promise fulfilled with the unpublished model.

## MachineLearning.updateModel()

> > [!WARNING]
> > **Warning:** This API is now obsolete.
>
> Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom models, you must migrate to another solution. You can use Cloud Storage for Firebase as an alternative for hosting custom models. For more info, see https://firebase.google.com/docs/ml/migrate-to-cloud-storage

Updates a model's metadata or model file.

**Signature:**

    updateModel(modelId: string, model: ModelOptions): Promise<Model>;

### Parameters

| Parameter | Type | Description |
|---|---|---|
| modelId | string | The ID of the model to update. |
| model | [ModelOptions](https://firebase.google.com/docs/reference/admin/node/firebase-admin.machine-learning#modeloptions) | The model fields to update. |

**Returns:**

Promise\<[Model](https://firebase.google.com/docs/reference/admin/node/firebase-admin.machine-learning.model#model_class)\>

A Promise fulfilled with the updated model.