Method: files.annotate
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Layanan yang menjalankan deteksi dan anotasi gambar untuk batch file. Sekarang hanya "aplikasi/pdf", "gambar/tiff" dan "gambar/gif" yang didukung.
Layanan ini akan mengekstrak maksimal 5 (pelanggan dapat menentukan 5 dalam AnnotateFileRequest.pages) frame (gif) atau halaman (pdf atau tiff) dari setiap file yang disediakan dan melakukan deteksi serta anotasi untuk setiap gambar yang diekstrak.
Permintaan HTTP
POST https://vision.googleapis.com/v1/files:annotate
URL menggunakan sintaks gRPC Transcoding.
Isi permintaan
Isi permintaan memuat data dengan struktur berikut:
Kolom |
requests[] |
object (AnnotateFileRequest )
Wajib. Daftar permintaan anotasi file. Saat ini kami hanya mendukung satu AnnotateFileRequest di BatchAnnotateFilesRequest.
|
parent |
string
Opsional. Project target dan lokasi untuk melakukan panggilan. Format projects/{project-id}/locations/{location-id} . Jika tidak ada induk yang ditentukan, region akan dipilih secara otomatis. ID lokasi yang didukung: us : Khusus negara AS, asia : Area Asia Timur, seperti Jepang, Taiwan, eu : Uni Eropa. Contoh: projects/project-A/locations/eu .
|
Isi respons
Jika berhasil, isi respons akan berisi instance BatchAnnotateFilesResponse
.
Cakupan Otorisasi
Memerlukan salah satu cakupan OAuth berikut:
https://www.googleapis.com/auth/cloud-platform
https://www.googleapis.com/auth/cloud-vision
Untuk mengetahui informasi selengkapnya, lihat Ringkasan Autentikasi.
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-30 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 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/)."]]