Skip to content

Gemini OCR

Gemini OCR reads the text in images and PDF documents with a Google Gemini model that can see. Besides copying the text, it can follow your instructions, for example returning only the fields you care about.

When to use it

  • Reading scanned invoices or delivery notes to record their data.
  • Getting the text from photos of documents that arrive on WhatsApp or by email.
  • Extracting specific fields from a form, such as the name and the amount.

Configuration

You need a Google Gemini credential with your Google AI key. See Credentials.

FieldWhat it does
Credential (required)The Google Gemini credential.
Model Name (required)The Gemini model. Press the refresh button to see those available.
OCR Prompt (required)What the model must do with the document. Default: “Read all the text in the image.”. You can ask, for example, for only certain fields.
Image/PDF InputThe image or PDF to read, for example the output of Binary or of a component that loads files.

Advanced options

FieldWhat it does
Max Output TokensMaximum length of the answer. Default: 8192.
TemperatureHow creative the model is, from 0 to 1. Default: 0.1, to copy the text faithfully.

Output

The OCR Results output holds the text read from each image or page.

In tool mode, an agent can use the component by itself. See Tool Mode.

Example

An advisory firm receives scanned invoices by email.

  1. Connect the attachment to Image/PDF Input.
  2. Write in OCR Prompt: “Return the invoice number, date, issuer tax ID and total”.
  3. Save OCR Results to a spreadsheet.