> [!WARNING]
> **Deprecated:** Firebase ML is deprecated and will be shut down on June 15, 2027. New projects shouldn't use it and existing projects should begin migrating away.
>
> If you're using Firebase ML to host models for local inference,
> [migrate
> your apps to use Cloud Storage instead](https://firebase.google.com/docs/ml/migrate-to-cloud-storage).
>
> If you're using Firebase ML to call Cloud Vision APIs, you should either
> migrate your app to use
> [Firebase AI Logic](https://firebase.google.com/docs/ai-logic/analyze-images)
> to analyze images, or modify your app to directly access the
> [Cloud Vision API](https://cloud.google.com/vision/docs)
> endpoints.

This document explains how to migrate your app away from ML Kit for Firebase to
our recommended on-device and cloud-based machine learning APIs.
The current set of APIs is now split into the following two products:

- A product called [**ML Kit**](https://developers.google.com/ml-kit/guides), which contains all
  the on-device APIs.

- [**Firebase Machine Learning**](https://firebase.google.com/docs/ml), focused on cloud-based APIs
  and custom model deployment. Firebase ML is being turned down.

  - To host custom models, use [Cloud Storage](https://firebase.google.com/docs/storage) instead.
  - For local inference, use [LiteRT](https://developers.google.com/edge/litert).

This framework also makes it easier to integrate ML Kit into your app if you
only need an on-device solution.

## Where to access on-device and custom model APIs

This section describes where to access the on-device and custom model APIs that
were part of ML Kit for Firebase.

### On-device base APIs

The following APIs are in the standalone ML Kit SDK.

- Barcode scanning
- Face detection
- Image labeling
- Object detection and tracking
- Text recognition
- Language ID
- Smart reply
- Translate
- AutoML Vision Edge inference API

The existing on-device base APIs in the ML Kit for Firebase SDK are
deprecated and will stop working on June 15, 2027.

If you are using these APIs in your app today, migrate to the
ML Kit SDK, by following the
**[ML Kit migration guide for Android](https://developers.google.com/ml-kit/migration/android)** and the
**[ML Kit migration guide for iOS](https://developers.google.com/ml-kit/migration/ios)**.

### Custom model APIs

To host custom models, use [Cloud Storage](https://firebase.google.com/docs/storage). To download models,
your app must include code to download models from your Cloud Storage bucket.

The existing custom model interpreter in the ML Kit for Firebase SDK is
deprecated and will be turned down. We recommend using the [LiteRT](https://developers.google.com/edge/litert)
runtime directly for inference. Alternatively, if you only want to use custom
models for image labeling and object detection and tracking APIs, you can now
use [custom models](https://developers.google.com/ml-kit/custom-models) in these APIs in ML Kit directly.

If you're migrating from Firebase ML to Cloud Storage, see the
[migration guide](https://firebase.google.com/docs/ml/migrate-to-cloud-storage) for detailed instructions.

## Frequently asked questions

### Why this change?

We are making this change to clarify what solutions the product is offering.
With this change, the ML Kit SDK is fully focused on on-device machine
learning where all data processing happens on-device and is available to
developers at no cost. The previously deprecated cloud services that were part
of Firebase ML Kit are available through Google Cloud directly. Cloud services
available through Firebase ML will be turned down in June 2027.

For on-device APIs, the ML Kit SDK makes it easier for developers to
integrate ML Kit into their app. Going forward, you just need to add
dependencies to the app's project and then start using the API. There is no
need to set up a Firebase project just to use on-device APIs.

### What happens to my models that are being hosted with Firebase?

Your Firebase ML hosted models will be available until the service shuts down
on June 15, 2027.

Follow the migration guide to transfer your Firebase ML hosted models to
[Cloud Storage](https://firebase.google.com/docs/storage) and update your app.

### What benefits do I get from migrating to the new ML Kit SDK?

Migrating to the new SDK will ensure your applications benefit from the latest
bug fixes and improvements to the on-device APIs. For example, here are a
couple of changes in the first release:

- You can now use the [custom image labeling](https://developers.google.com/ml-kit/vision/image-labeling#custom-tflite) and
  [custom object detection and tracking](https://developers.google.com/ml-kit/vision/object-detection#custom-tflite) APIs to
  integrate custom image classification models in your apps and build
  real-time interactive user experiences.

- [Android Jetpack Lifecycle](https://developer.android.com/reference/androidx/lifecycle/Lifecycle) support is added to all APIs.
  You can now use `addObserver` to automatically manage the initiation and
  teardown of ML Kit APIs as the app goes through screen rotation or closure
  by the user / system. This makes integration with CameraX easier.

A full list of the latest changes can be found in the
[ML Kit SDK release notes](https://developers.google.com/ml-kit/release-notes).

### I am using ML Kit for Firebase today, when do I need to migrate over?

Firebase ML will be turned down on June 15, 2027.

- You must migrate ML Kit for Firebase SDK to the ML Kit SDK.

- If you are using **Cloud APIs** through the ML Kit for Firebase SDK, you
  must switch to use the Cloud Vision APIs directly.

- If you are using Firebase ML **Custom Model Deployment**, you must migrate
  your custom models to Cloud Storage.