What can you do with it?

The /ocr command enables you to extract text from images and scanned documents using optical character recognition. You can convert photos of text into editable content, digitize printed documents, extract form data from scanned forms, and process images containing text in various formats.

How to use it?

Basic Command Structure

/ocr [image-file] [options]

Parameters

Required:
  • image-file - The image or scanned document to process (URL or uploaded file)
Optional:
  • format - Output format: json or plaintext (defaults to json)
  • extract-fields - Extract structured data from forms (true/false)
  • language - Specify text language for better accuracy (defaults to English)

Response Format

The command returns:
{
  "output": "extracted text content",
  "fields": {
    "field_name": "field_value"
  },
  "confidence": "recognition confidence score",
  "format": "output format used"
}

Examples

Basic Usage

/ocr
image-file: receipt.jpg
Extracts all text from an image of a receipt.

Advanced Usage

/ocr
image-file: application-form.png
extract-fields: true
format: json
language: English
Processes a scanned form, extracting field names and values into structured JSON format.

Specific Use Case

/ocr
image-file: business-card.jpg
extract-fields: true
Extracts contact information from a business card image, organizing data into structured fields.

Notes

Supported Image Formats:
  • JPEG/JPG (.jpg, .jpeg)
  • PNG (.png)
  • GIF (.gif)
  • BMP (.bmp)
  • TIFF (.tiff, .tif)
  • WebP (.webp)