Cloud Vision API

在应用中集成 Google Vision 功能,包括图像标记、面部/徽标/地标检测、光学字符识别 (OCR) 以及露骨内容的检测。

服务:vision.googleapis.com

我们建议您使用 Google 提供的客户端库来调用此服务。如果您的应用需要使用您自己的库来调用此服务,则在发出 API 请求时应使用以下信息。

发现文档

发现文档是用于说明和使用 REST API 的机器可读规范。它用于构建客户端库、IDE 插件以及与 Google API 交互的其他工具。一项服务可能会提供多个发现文档。此服务提供了以下发现文档:

服务端点

服务端点是指定 API 服务的网络地址的基本网址。一个服务可能有多个服务端点。此服务具有以下服务端点,下面的所有 URI 都与此服务端点相关:

  • https://vision.googleapis.com

REST 资源:v1.files

方法
annotate POST /v1/files:annotate
对一批文件执行图片检测和注释的服务。
asyncBatchAnnotate POST /v1/files:asyncBatchAnnotate
对常规文件(例如可能包含多页、每页可能包含多张图片的 PDF 文件)列表运行异步图片检测和注释。

REST 资源:v1.images

方法
annotate POST /v1/images:annotate
对一批图片运行图片检测和注释。
asyncBatchAnnotate POST /v1/images:asyncBatchAnnotate
对图片列表运行异步图片检测和注释。

REST 资源:v1.locations.operations

方法
get GET /v1/{name=locations/*/operations/*}
获取长时间运行的操作的最新状态。

REST 资源:v1.operations

方法
get GET /v1/{name=operations/*}
获取长时间运行的操作的最新状态。

REST 资源:v1.projects.files

方法
annotate POST /v1/{parent=projects/*}/files:annotate
对一批文件执行图片检测和注释的服务。
asyncBatchAnnotate POST /v1/{parent=projects/*}/files:asyncBatchAnnotate
对常规文件(例如可能包含多页、每页可能包含多张图片的 PDF 文件)列表运行异步图片检测和注释。

REST 资源:v1.projects.images

方法
annotate POST /v1/{parent=projects/*}/images:annotate
对一批图片运行图片检测和注释。
asyncBatchAnnotate POST /v1/{parent=projects/*}/images:asyncBatchAnnotate
对图片列表运行异步图片检测和注释。

REST 资源:v1.projects.locations.files

方法
annotate POST /v1/{parent=projects/*/locations/*}/files:annotate
对一批文件执行图片检测和注释的服务。
asyncBatchAnnotate POST /v1/{parent=projects/*/locations/*}/files:asyncBatchAnnotate
对常规文件(例如可能包含多页、每页可能包含多张图片的 PDF 文件)列表运行异步图片检测和注释。

REST 资源:v1.projects.locations.images

方法
annotate POST /v1/{parent=projects/*/locations/*}/images:annotate
对一批图片运行图片检测和注释。
asyncBatchAnnotate POST /v1/{parent=projects/*/locations/*}/images:asyncBatchAnnotate
对图片列表运行异步图片检测和注释。

REST 资源:v1.projects.locations.operations

方法
get GET /v1/{name=projects/*/locations/*/operations/*}
获取长时间运行的操作的最新状态。

REST 资源:v1.projects.locations.productSets

方法
addProduct POST /v1/{name=projects/*/locations/*/productSets/*}:addProduct
将 Product 添加到指定的 ProductSet。
create POST /v1/{parent=projects/*/locations/*}/productSets
创建并返回新的 ProductSet 资源。
delete DELETE /v1/{name=projects/*/locations/*/productSets/*}
永久删除一个 ProductSet。
get GET /v1/{name=projects/*/locations/*/productSets/*}
获取与 ProductSet 关联的信息。
import POST /v1/{parent=projects/*/locations/*}/productSets:import
此异步 API 可根据图片信息列表将参考图片列表导入指定的商品集中。
list GET /v1/{parent=projects/*/locations/*}/productSets
以未指定的顺序列出 ProductSet。
patch PATCH /v1/{productSet.name=projects/*/locations/*/productSets/*}
对一项 ProductSet 资源进行更改。
removeProduct POST /v1/{name=projects/*/locations/*/productSets/*}:removeProduct
从指定的 ProductSet 中移除 Product。

REST 资源:v1.projects.locations.productSets.products

方法
list GET /v1/{name=projects/*/locations/*/productSets/*}/products
按未指定的顺序列出 ProductSet 中的 Product。

REST 资源:v1.projects.locations.products

方法
create POST /v1/{parent=projects/*/locations/*}/products
创建并返回新的商品资源。
delete DELETE /v1/{name=projects/*/locations/*/products/*}
永久删除一种商品及其参考图片。
get GET /v1/{name=projects/*/locations/*/products/*}
获取与 Product 关联的信息。
list GET /v1/{parent=projects/*/locations/*}/products
以未指定的顺序列出商品。
patch PATCH /v1/{product.name=projects/*/locations/*/products/*}
对一项 Product 资源执行更改。
purge POST /v1/{parent=projects/*/locations/*}/products:purge
此异步 API 可删除 ProductSet 中的所有 Product 或不在 ProductSet 中的所有 Product。

REST 资源:v1.projects.locations.products.referenceImages

方法
create POST /v1/{parent=projects/*/locations/*/products/*}/referenceImages
创建并返回新的 ReferenceImage 资源。
delete DELETE /v1/{name=projects/*/locations/*/products/*/referenceImages/*}
永久删除一张参考图片。
get GET /v1/{name=projects/*/locations/*/products/*/referenceImages/*}
获取与 ReferenceImage 关联的信息。
list GET /v1/{parent=projects/*/locations/*/products/*}/referenceImages
列出参考图片。

REST 资源:v1.projects.operations

方法
get GET /v1/{name=projects/*/operations/*}
获取长时间运行的操作的最新状态。