Method: files.annotate
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
複数のファイルに対して一括で画像検出とアノテーションを実行するサービス。現在、application/pdf、image/tiff、image/gif のみがサポートされています。
このサービスは、指定されたファイルから最大で 5 個のフレーム(gif)またはページ(PDF または tiff)を抽出して、抽出した各画像の検出とアノテーションを実行します(抽出対象は AnnotateFileRequest.pages で指定できます)。
HTTP リクエスト
POST https://vision.googleapis.com/v1/files:annotate
この URL は gRPC Transcoding 構文を使用します。
リクエストの本文
リクエストの本文には、次の構造のデータが含まれます。
フィールド |
requests[] |
object (AnnotateFileRequest )
必須。ファイル アノテーション リクエストのリスト。現在、BatchAnnotateFilesRequest では AnnotateFileRequest が 1 つだけサポートされています。
|
parent |
string
省略可。呼び出しを行うターゲット プロジェクトとロケーション。 形式: projects/{project-id}/locations/{location-id} 親が指定されていない場合、リージョンが自動的に選択されます。 サポートされているロケーション ID: us : 米国のみ。asia : 東アジア地域(日本、台湾など)。eu : EU。 例: projects/project-A/locations/eu 。
|
レスポンスの本文
成功した場合、レスポンスの本文には BatchAnnotateFilesResponse
のインスタンスが含まれます。
認証スコープ
次の OAuth スコープのいずれかが必要です。
https://www.googleapis.com/auth/cloud-platform
https://www.googleapis.com/auth/cloud-vision
詳細については、認証の概要をご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-30 UTC。
[[["わかりやすい","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 UTC。"],[],[],null,["# Method: files.annotate\n\n- [HTTP request](#body.HTTP_TEMPLATE)\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/files:annotate`\n\nThe URL uses [gRPC Transcoding](https://github.com/googleapis/googleapis/blob/master/google/api/http.proto) syntax.\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/)."]]