Method: projects.files.annotate
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
這項服務會為一批檔案執行圖片偵測和註解作業。目前僅支援「application/pdf」、「image/tiff」和「image/gif」。
這項服務會從每個提供的檔案中擷取最多 5 個影格 (GIF) 或頁面 (PDF 或 TIF),並針對每個擷取的圖片執行偵測和註解作業。
HTTP 要求
POST https://vision.googleapis.com/v1/{parent=projects/*}/files:annotate
這個網址使用 gRPC 轉碼語法。
路徑參數
參數 |
parent |
string
(非必要) 要呼叫的目標專案和位置。 格式:projects/{project-id}/locations/{location-id} 。 如果未指定父項,系統會自動選擇區域。 支援的位置 ID:us :僅限美國,asia :日本、臺灣等東亞地區,eu :歐盟。 範例:projects/project-A/locations/eu 。
|
要求主體
要求主體包含下列結構的資料:
欄位 |
requests[] |
object (AnnotateFileRequest )
這是必要旗標,檔案註解要求清單。目前,BatchAnnotateFilesRequest 中僅支援一個 AnnotateFileRequest。
|
授權範圍
需要下列其中一種 OAuth 範圍:
https://www.googleapis.com/auth/cloud-platform
https://www.googleapis.com/auth/cloud-vision
詳情請參閱驗證總覽一文。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-30 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-30 (世界標準時間)。"],[],[],null,["# Method: projects.files.annotate\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization Scopes](#body.aspect)\n\nService that performs image detection and annotation for a batch of files. Now only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported.\n\nThis service will extract at most 5 (customers can specify which 5 in AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and perform detection and annotation for each image extracted.\n\n### HTTP request\n\n`POST https://vision.googleapis.com/v1/{parent=projects/*}/files:annotate`\n\nThe URL uses [gRPC Transcoding](https://github.com/googleapis/googleapis/blob/master/google/api/http.proto) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nIf successful, the response body contains an instance of [BatchAnnotateFilesResponse](/vision/product-search/docs/reference/rest/v1/BatchAnnotateFilesResponse).\n\n### Authorization Scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n- `https://www.googleapis.com/auth/cloud-vision`\n\nFor more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/)."]]