尽管您可以通过发出直接请求来使用 Video Intelligence,不过我们提供了几种常用语言的客户端库。Video Intelligence 客户端库基于 Google Cloud 客户端库构建。这种通用基础架构提供了可实现 API 专属库的功能,另外还提供了在使用任何 Cloud API 时可以直接使用的类型和方法。
可用的客户端库
Video Intelligence 为以下语言提供了客户端库和指南:
Python
如需向 Video Intelligence 进行身份验证,请设置应用默认凭据。
如需了解详情,请参阅为本地开发环境设置身份验证。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-28。"],[],[],null,["# Client libraries\n\nWhile you can use Video Intelligence by making direct requests,\nwe provide client libraries for several popular languages.\nVideo Intelligence client libraries are built on\n[Google Cloud Client Libraries](https://cloud.google.com/apis/docs/cloud-client-libraries).\nThis common infrastructure provides functionality for API-specific library implementations,\nbut it also provides types and methods that you may use directly when using any Cloud API.\n\nAvailable client libraries\n--------------------------\n\n\nVideo Intelligence provides client libraries and guides for the following languages: \n\n### Python\n\n\nTo authenticate to Video Intelligence, set up Application Default Credentials.\nFor more information, see\n\n[Set up authentication for a local development environment](/docs/authentication/set-up-adc-local-dev-environment).\n\n\nThis page provides reference documentation and related resources for the\nVideo Intelligence Python client library.\n\n### Installation\n\n\nTo install the client library:\n\n```\npip install --upgrade google-cloud-videointelligence\n```\n\n### Java\n\n\nTo authenticate to Video Intelligence, set up Application Default Credentials.\nFor more information, see\n\n[Set up authentication for a local development environment](/docs/authentication/set-up-adc-local-dev-environment).\n\n\nThis page provides reference documentation and related resources for the\nVideo Intelligence Java client library.\n\n### Installation\n\n\nTo install the client library:\n\nIf you are using [Maven](https://maven.apache.org/), add\nthe following to your `pom.xml` file. For more information about\nBOMs, see [The Google Cloud Platform Libraries BOM](https://cloud.google.com/java/docs/bom). \n\n \u003cdependencyManagement\u003e\n \u003cdependencies\u003e\n \u003cdependency\u003e\n \u003cgroupId\u003ecom.google.cloud\u003c/groupId\u003e\n \u003cartifactId\u003elibraries-bom\u003c/artifactId\u003e\n \u003cversion\u003e26.66.0\u003c/version\u003e\n \u003ctype\u003epom\u003c/type\u003e\n \u003cscope\u003eimport\u003c/scope\u003e\n \u003c/dependency\u003e\n \u003c/dependencies\u003e\n \u003c/dependencyManagement\u003e\n\n \u003cdependencies\u003e\n \u003cdependency\u003e\n \u003cgroupId\u003ecom.google.cloud\u003c/groupId\u003e\n \u003cartifactId\u003egoogle-cloud-video-intelligence\u003c/artifactId\u003e\n \u003c/dependency\u003e\n \u003c/dependencies\u003e\n\nIf you are using [Gradle](https://gradle.org/),\nadd the following to your dependencies: \n\n implementation 'com.google.cloud:google-cloud-video-intelligence:2.71.0'\n\nIf you are using [sbt](https://www.scala-sbt.org/), add\nthe following to your dependencies: \n\n libraryDependencies += \"com.google.cloud\" % \"google-cloud-video-intelligence\" % \"2.71.0\"\n\nIf you're using Visual Studio Code, IntelliJ, or Eclipse, you can add client libraries to your\nproject using the following IDE plugins:\n\n- [Cloud Code for VS Code](/code/docs/vscode/client-libraries)\n- [Cloud Code for IntelliJ](/code/docs/intellij/client-libraries)\n- [Cloud Tools for Eclipse](/eclipse/docs/libraries)\n\nThe plugins provide additional functionality, such as key management for service accounts. Refer\nto each plugin's documentation for details.\n| **Note:** Cloud Java client libraries do not currently support Android.\n\n### Node.js\n\n\nTo authenticate to Video Intelligence, set up Application Default Credentials.\nFor more information, see\n\n[Set up authentication for a local development environment](/docs/authentication/set-up-adc-local-dev-environment).\n\n\nThis page provides reference documentation and related resources for the\nVideo Intelligence Node.js client library.\n\n### Installation\n\n\nTo install the client library:\n\n\nFor more information, see [Setting Up a Node.js Development Environment](https://cloud.google.com/nodejs/docs/setup).\n\n```\nnpm install @google-cloud/video-intelligence\n```\n\n### C++\n\n\nTo authenticate to Video Intelligence, set up Application Default Credentials.\nFor more information, see\n\n[Set up authentication for a local development environment](/docs/authentication/set-up-adc-local-dev-environment).\n\n\nThis page provides reference documentation and related resources for the\nVideo Intelligence C++ client library.\n\n### Installation\n\n\nTo install the client library:\n\n\nFor more information, see [Setting Up a C++ Development Environment](/cpp/docs/setup).\n\n### Go\n\n\nTo authenticate to Video Intelligence, set up Application Default Credentials.\nFor more information, see\n\n[Set up authentication for a local development environment](/docs/authentication/set-up-adc-local-dev-environment).\n\n\nThis page provides reference documentation and related resources for the\nVideo Intelligence Go client library.\n\n### Installation\n\n\nTo install the client library:\n\n\nFor more information, see [Setting Up a Go Development Environment](https://cloud.google.com/go/docs/setup).\n\n```\ngo get cloud.google.com/go/videointelligence/apiv1\n```\n\n### PHP\n\n\nTo authenticate to Video Intelligence, set up Application Default Credentials.\nFor more information, see\n\n[Set up authentication for a local development environment](/docs/authentication/set-up-adc-local-dev-environment).\n\n\nThis page provides reference documentation and related resources for the\nVideo Intelligence PHP client library.\n\n### Installation\n\n\nTo install the client library:\n\n```\ncomposer require google/cloud-videointelligence\n```\n\n### Ruby\n\n\nTo authenticate to Video Intelligence, set up Application Default Credentials.\nFor more information, see\n\n[Set up authentication for a local development environment](/docs/authentication/set-up-adc-local-dev-environment).\n\nThe Ruby client libraries for Video Intelligence are\ncurrently released as Beta.\n\n\nThis page provides reference documentation and related resources for the\nVideo Intelligence Ruby client library.\n\n### Installation\n\n\nTo install the client library:\n\n\nFor more information, see [Setting Up a Ruby Development Environment](https://cloud.google.com/ruby/docs/setup).\n\n```\ngem install google-cloud-video_intelligence\n```\n\nAuthentication and access control\n---------------------------------\n\n\nThe Video Intelligence quickstart guides provide basic information\non authentication and access control.\nFor more detailed information, see the following:\n\n- [Authentication methods](/docs/authentication)\n- [Understanding roles](/iam/docs/understanding-roles)"]]