diff --git a/src/machine-learning/machine-learning-api-client.ts b/src/machine-learning/machine-learning-api-client.ts index 855126b206..dcf59a55ff 100644 --- a/src/machine-learning/machine-learning-api-client.ts +++ b/src/machine-learning/machine-learning-api-client.ts @@ -21,7 +21,7 @@ import * as utils from '../utils/index'; import * as validator from '../utils/validator'; import { FirebaseApp } from '../firebase-app'; -const ML_V1BETA1_API = 'https://mlkit.googleapis.com/v1beta1'; +const ML_V1BETA2_API = 'https://firebaseml.googleapis.com/v1beta2'; const FIREBASE_VERSION_HEADER = { 'X-Firebase-Client': 'fire-admin-node/', }; @@ -253,7 +253,7 @@ export class MachineLearningApiClient { private getUrl(): Promise { return this.getProjectIdPrefix() .then((projectIdPrefix) => { - return `${ML_V1BETA1_API}/${this.projectIdPrefix}`; + return `${ML_V1BETA2_API}/${this.projectIdPrefix}`; }); } diff --git a/test/unit/machine-learning/machine-learning-api-client.spec.ts b/test/unit/machine-learning/machine-learning-api-client.spec.ts index 36b7cc214d..61dec42b66 100644 --- a/test/unit/machine-learning/machine-learning-api-client.spec.ts +++ b/test/unit/machine-learning/machine-learning-api-client.spec.ts @@ -32,7 +32,7 @@ const expect = chai.expect; describe('MachineLearningApiClient', () => { - const BASE_URL = 'https://mlkit.googleapis.com/v1beta1'; + const BASE_URL = 'https://firebaseml.googleapis.com/v1beta2'; const MODEL_ID = '1234567'; const MODEL_RESPONSE = {