Depending on your application language, you may need to use a beta-specific client library to use the Vision API beta features.
Installing the client library
If you are using Maven, add this to your pom.xml file:
<dependency> <groupId>com.google.cloud</groupId> <artifactId>grpc-google-cloud-vision-v1p4beta1</artifactId> <version>0.51.0</version> </dependency>
If you are using Gradle, add this to your dependencies:
If you are using SBT, add this to your dependencies:
libraryDependencies += "com.google.cloud" % "google-cloud-vision" % "1.68.0"
If you're using IntelliJ or Eclipse, you can add client libraries to your project using these IDE plugins:
Besides adding client libraries, the plugins provide additional functionality, such as service account key management. Refer to the documentation for each plugin for more details.
Beta features are available from the regular Vision API client library for Node.js.
Install the client library with the following command:
npm install --save @google-cloud/vision
In your Node.js application, specify the beta version of the API with the following line to use the client library:
const vision = require('@google-cloud/vision');
Beta features are available from the regular Vision API client library for Python.
requirements.txt should include:
In your Python application, import the
v1p4beta1 version of the API:
from google.cloud import vision_v1p4beta1 as vision