Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Service qui détecte et annote les images d'un lot de fichiers. Actuellement, seuls les fichiers "application/pdf", "image/tiff" et "image/gif" sont acceptés.
Ce service extrait au maximum cinq frames GIF (les clients peuvent les spécifier dans les requêtes AnnotateFileRequest.pages) ou pages (PDF ou TIFF) de chaque fichier fourni, et détecte et annote chaque image extraite.
Requête HTTP
POST https://{VISION_GDC_ENDPOINT}/v1/{parent}/files:annotate
Paramètres de chemin
Paramètres
parent
string
Facultatif. Projet et emplacement cibles pour passer un appel.
Format : projects/{project-id}/locations/{location-id}.
Si aucun parent n'est spécifié, une région est automatiquement sélectionnée.
ID de zone géographique acceptés : us : États-Unis uniquement, asia : régions d'Asie de l'Est, comme le Japon et Taïwan, eu : Union européenne.
Exemple : projects/project-A/locations/eu
Corps de la requête
Le corps de la requête contient des données présentant la structure suivante :
Obligatoire. Liste des requêtes d'annotation de fichiers. À l'heure actuelle, nous n'acceptons qu'une seule requête AnnotateFileRequest dans la liste BatchAnnotateFilesRequest.
Nécessite l'un des champs d'application OAuth suivants :
https://www.googleapis.com/auth/cloud-platform
https://www.googleapis.com/auth/cloud-vision
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/31 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/07/31 (UTC)."],[[["\u003cp\u003eThis service performs image detection and annotation on batches of files, currently supporting "application/pdf", "image/tiff", and "image/gif" file types.\u003c/p\u003e\n"],["\u003cp\u003eThe service extracts up to five frames (for GIFs) or pages (for PDFs and TIFFs) from each file for detection and annotation, with the ability to customize the number of pages through \u003ccode\u003eAnnotateFileRequest.pages\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe API endpoint for this service is \u003ccode\u003ePOST https://{VISION_GDC_ENDPOINT}/v1/{parent}/files:annotate\u003c/code\u003e, where the \u003ccode\u003eparent\u003c/code\u003e path parameter specifies the project and location.\u003c/p\u003e\n"],["\u003cp\u003eThe request must be sent using the \u003ccode\u003eBatchAnnotateFilesRequest\u003c/code\u003e structure, containing an array with a single \u003ccode\u003eAnnotateFileRequest\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe application requires authorization via OAuth scopes, specifically either \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-vision\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Method: projects.files.annotate\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_GDC_ENDPOINT}/v1/{parent}/files:annotate`\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](/distributed-cloud/hosted/docs/latest/gdch/apis/vertex-ai/ocr/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`"]]