As of September 2021 the Vision API Alpha endpoint is shut down. For information on the Generally Available version of this product and its features, see the
Vision API documentation .
发送反馈
Alpha 版客户端库
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
安装 Python 客户端库
注意 :客户端库已更新,反映了 Vision Alpha 版的最新更改。这些更改不向后兼容 0.30.1 之前的客户端库版本。请参阅本主题中的最新代码示例,以查看有关如何使用新的客户端库调用 Vision Alpha 版的示例。
Python
pip install https : // storage . googleapis . com / api - client - staging / vision - python - q1alpha - mar2019 . tar . gz
身份验证
如需使用 Alpha 版客户端库,您必须创建并激活服务账号。
安装 Google Cloud CLI 。
创建服务账号 。
创建服务账号密钥 并下载 JSON 密钥文件。
将 GOOGLE_APPLICATION_CREDENTIALS
环境变量设置为指向您的服务账号密钥文件。这样一来,您的客户端库就能够使用应用默认凭据 (ADC)。
export GOOGLE_APPLICATION_CREDENTIALS = path-to-key-file
运行以下命令 来进行身份验证:
gcloud auth login
发送反馈
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可 获得了许可,并且代码示例已根据 Apache 2.0 许可 获得了许可。有关详情,请参阅 Google 开发者网站政策 。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-06-16。
需要向我们提供更多信息?
[[["易于理解","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-06-16。"],[],[],null,[]]