Method: files.asyncBatchAnnotate

針對一般檔案清單 (例如 PDF 檔案) 執行非同步圖片偵測和註解,這些檔案可能包含多個頁面,且每個頁面可能包含多個圖片。您可以透過 google.longrunning.Operations 介面擷取進度和結果。Operation.metadata 包含 OperationMetadata (中繼資料)。Operation.response 包含 AsyncBatchAnnotateFilesResponse (結果)。

HTTP 要求

POST https://vision.googleapis.com/v1p4beta1/files:asyncBatchAnnotate

這個網址使用 gRPC 轉碼語法。

要求主體

要求主體包含下列結構的資料:

JSON 表示法
{
  "requests": [
    {
      object (AsyncAnnotateFileRequest)
    }
  ]
}
欄位
requests[]

object (AsyncAnnotateFileRequest)

此批次的個別非同步檔案註解要求。

回應主體

如果成功,回應主體會包含 Operation 的執行個體。

授權範圍

需要下列其中一種 OAuth 範圍:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/cloud-vision

詳情請參閱驗證總覽一文。

AsyncAnnotateFileRequest

離線檔案註解要求。

JSON 表示法
{
  "inputConfig": {
    object (InputConfig)
  },
  "features": [
    {
      object (Feature)
    }
  ],
  "imageContext": {
    object (ImageContext)
  },
  "outputConfig": {
    object (OutputConfig)
  }
}
欄位
inputConfig

object (InputConfig)

這是必要旗標,輸入檔案的相關資訊。

features[]

object (Feature)

這是必要旗標,要求的功能。

imageContext

object (ImageContext)

檔案中可能隨附的其他背景資訊。

outputConfig

object (OutputConfig)

這是必要旗標,所需的輸出位置和中繼資料 (例如格式)。