Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
v1beta2 API Document AI kini tidak digunakan lagi dan digantikan dengan
v1 API.
Tidak seperti v1beta2, Document AI v1
adalah API stateful, yang berarti Anda perlu membuat Processor
sebelum dapat mengirim permintaan ke dokumen Process
dan BatchProcess.
CATATAN: Penghentian penggunaan ini hanya memengaruhi versi API yang digunakan untuk memanggil prosesor.
Hal ini tidak memengaruhi ketersediaan prosesor apa pun.
Area utama ketidakcocokan mundur API v1 dengan API v1beta2 dibahas
di bagian selanjutnya dalam dokumen ini.
Membuat pemroses
Untuk bermigrasi ke v1 untuk pembuatan pemroses, buat Processor terlebih dahulu. Tabel berikut berfungsi sebagai panduan umum untuk memilih
ProcessorType
yang sesuai untuk dibuat, tetapi Anda dapat melihat daftar lengkap pemroses.
Untuk panduan langkah demi langkah tentang cara membuat pemroses, lihat
panduan.
Memproses dokumen
v1 Document AI memiliki dua API untuk menerima dokumen: Process dan BatchProcess.
Setiap metode ini sesuai dengan metode dari v1beta2. Metode dan
perbedaannya ditandai:
Selain menerima dokumen individual di Cloud Storage, v1 mendukung awalan Cloud Storage untuk memproses banyak dokumen sekaligus.
Library klien
Jika menggunakan Client Libraries untuk berinteraksi dengan Document AI, beralihlah dari penggunaan DocumentUnderstandingService ke DocumentProcessorService. Untuk contoh mendetail tentang penggunaan library klien
untuk v1, lihat library klien.
[[["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-09-04 UTC."],[[["\u003cp\u003eThe Document AI \u003ccode\u003ev1beta2\u003c/code\u003e API is deprecated and users should migrate to the \u003ccode\u003ev1\u003c/code\u003e API.\u003c/p\u003e\n"],["\u003cp\u003eUnlike \u003ccode\u003ev1beta2\u003c/code\u003e, the \u003ccode\u003ev1\u003c/code\u003e API is stateful and requires the creation of a \u003ccode\u003eProcessor\u003c/code\u003e before processing documents.\u003c/p\u003e\n"],["\u003cp\u003eWhen migrating to \u003ccode\u003ev1\u003c/code\u003e, the method to process documents is either \u003ccode\u003eProcess\u003c/code\u003e or \u003ccode\u003eBatchProcess\u003c/code\u003e which each corresponds to a method from \u003ccode\u003ev1beta2\u003c/code\u003e respectively, but with some slight differences.\u003c/p\u003e\n"],["\u003cp\u003eTo migrate to \u003ccode\u003ev1\u003c/code\u003e for processor creation, you will first need to create a \u003ccode\u003eProcessor\u003c/code\u003e and use a \u003ccode\u003eProcessorType\u003c/code\u003e based on the document type.\u003c/p\u003e\n"],["\u003cp\u003eUsers of the Document AI client libraries must switch from \u003ccode\u003eDocumentUnderstandingService\u003c/code\u003e to \u003ccode\u003eDocumentProcessorService\u003c/code\u003e to use the \u003ccode\u003ev1\u003c/code\u003e API.\u003c/p\u003e\n"]]],[],null,["Document AI's `v1beta2` API is now deprecated in favor of the\n[`v1`](/document-ai/docs/reference/rest/v1/projects.locations.processors) API.\n\nUnlike `v1beta2`, Document AI [`v1`](/document-ai/docs/reference/rest/v1/projects.locations.processors)\nis a stateful API, meaning you need to create a [`Processor`](/document-ai/docs/reference/rest/v1/projects.locations.processors#resource:-processor)\nbefore you can send requests to [`Process`](/document-ai/docs/reference/rest/v1/projects.locations.processors/process)\nand [`BatchProcess`](/document-ai/docs/reference/rest/v1/projects.locations.processors/batchProcess)\ndocuments.\n\nNOTE: This deprecation only affects the version of the API used to call any processor.\nIt does not affect the availability of any processor.\n\nThe major areas of v1 API backward incompatibility with v1beta2 API are discussed\nlater in this document.\n\nCreating a processor\n\nTo migrate to `v1` for processor creation, first create a [`Processor`](/document-ai/docs/reference/rest/v1/projects.locations.processors#resource:-processor). The following table serves as a general guideline for choosing an appropriate\n[`ProcessorType`](/document-ai/docs/reference/rest/v1/projects.locations.processorTypes#resource:-processortype)\nto create, but you can consult the full [processor list](/document-ai/docs/processors-list).\n\n| `document_type` | `params` | Processor type |\n|-----------------|----------------------------|--------------------------------------------------------------------------------------|\n| `invoice` | | [`INVOICE_PROCESSOR`](/document-ai/docs/processors-list#processor_invoice-processor) |\n| `general` | | [`OCR_PROCESSOR`](/document-ai/docs/processors-list#processor_doc-ocr) |\n| `general` | `table_extraction_params` | [`FORM_PARSER_PROCESSOR`](/document-ai/docs/processors-list#processor_form-parser) |\n| `general` | `form_extraction_params` | [`FORM_PARSER_PROCESSOR`](/document-ai/docs/processors-list#processor_form-parser) |\n| `general` | `entity_extraction_params` | [`FORM_PARSER_PROCESSOR`](/document-ai/docs/processors-list#processor_form-parser) |\n| `general` | `automl_params` | [`CUSTOM_EXTRACTION_PROCESSOR`](/document-ai/docs/processors-list#processor_cde) |\n\nFor a step-by-step guide to creating a processor, view the\n[guide](/document-ai/docs/create-processor).\n\nProcessing documents\n\nDocument AI `v1` has two APIs to accept documents: [`Process`](/document-ai/docs/reference/rest/v1/projects.locations.processors/process) and [`BatchProcess`](/document-ai/docs/reference/rest/v1/projects.locations.processors/batchProcess).\nEach of these methods corresponds to a method from `v1beta2`. The methods and\ntheir differences are highlighted:\n\n| `v1beta2` Method | `v1` Method | Migration notes |\n|-------------------------|--------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------|\n| `ProcessDocument` | [`Process`](/document-ai/docs/reference/rest/v1/projects.locations.processors/process) | `InputConfig.Cloud Storage_source` not supported in `v1`, use `BatchProcess` to process documents on Cloud Storage. |\n| `BatchProcessDocuments` | [`BatchProcess`](/document-ai/docs/reference/rest/v1/projects.locations.processors/batchProcess) | In addition to accepting individual documents on Cloud Storage, `v1` supports a Cloud Storage prefix to process many documents at once. |\n\nClient libraries\n\nIf using the [`Client Libraries`](/document-ai/docs/libraries) to interact with\nDocument AI, switch from using the `DocumentUnderstandingService` to the\n`DocumentProcessorService`. For a detailed example of using the client libraries\nfor `v1`, see [client libraries](/document-ai/docs/libraries)."]]