Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 Search Documentation | 2025.5

# Connect an OCR model

P4 Search uses Tesseract and ImageMagick for optical character recognition (OCR). See Enable image OCR.

You can choose to connect a cloud model instead. Follow these instructions to connect and configure an OCR model for P4 Search.

To learn more about setting configurations manually, see Configure P4 Search locally.

## Set up auto-OCR with Azure OCR

1. Set the auto-ocr model to AzureOcrModel:

com.perforce.p4search.auto-ocr.model=AzureOcrModel

2. Specify the auto-tagging service hostname. For example:

com.perforce.p4search.auto-detect.host=https://my.cognitiveservices.azure.com

3. Specify the language you want the image tags to be generated in, see your auto-tagging service documentation for supported languages. For example:

com.perforce.p4search.auto-detect.lang=en

4. Enter the API key for your auto-tagging service. For example:

com.perforce.p4search.auto-detect.key=0123456789ABCDEF0123456789ABCDEF

All the configurations together:

com.perforce.p4search.auto-ocr.model=AzureOcrModel

com.perforce.p4search.auto-detect.host=https://my.cognitiveservices.azure.com

com.perforce.p4search.auto-detect.lang=en

com.perforce.p4search.auto-detect.key=0123456789ABCDEF0123456789ABCDEF

## Set up auto-OCR with Rekognition OCR

1. Set the auto-ocr model to RekognitionOcrModel, for example:

com.perforce.p4search.auto-ocr.model=RekognitionOcrModel

2. Specify the auto-tagging service region as host. For example:

com.perforce.p4search.auto-detect.host=us-east-2

3. Specify the language you want the image tags to be generated in. See your auto-tagging service documentation for supported languages. For example:

com.perforce.p4search.auto-detect.lang=en

4. Enter the API key for your auto-tagging service. The API key for the RekognitionOcrModel is a combination of <aws_access_key_id> and <aws_secret_access_key>. For example:

com.perforce.p4search.auto-detect.key=<aws_access_key_id>:<aws_secret_access_key>

where

`ws_access_key_id`=ABCDEFGHIJKL12345678

ws_secret_access_key=ab0cd1ef2gh3IJ4aaaBBBcccWWW111rfc1234YERTpp

gives

com.perforce.p4search.auto-detect.key=ABCDEFGHIJKL12345678:ab0cd1ef2gh3IJ4aaaBBBcccWWW111rfc1234YERTpp

All the configurations together:

com.perforce.p4search.auto-ocr.model=RekognitionOcrModel

com.perforce.p4search.auto-detect.host=us-east-2

com.perforce.p4search.auto-detect.lang=en

com.perforce.p4search.auto-detect.key=ABCDEFGHIJKL12345678:ab0cd1ef2gh3IJ4aaaBBBcccWWW111rfc1234YERTpp

## Set up auto-OCR with Google OCR

1. Set the auto-ocr model to GoogleOcrModel:

com.perforce.p4search.auto-ocr.model=GoogleOcrModel

2. Specify the auto-tagging service hostname. For example:

com.perforce.p4search.auto-detect.host=https://vision.googleapis.com

3. Specify the language you want the image tags to be generated in. See your auto-tagging service documentation for supported languages. For example:

com.perforce.p4search.auto-detect.lang=en

4. Enter the API key for your auto-tagging service. For example:

com.perforce.p4search.auto-detect.key=AbcdEFG12345ZXvfe56210QWErtyui123456789

All the configurations together:

com.perforce.p4search.auto-ocr.model=GoogleOcrModel

com.perforce.p4search.auto-detect.host=https://vision.googleapis.com

com.perforce.p4search.auto-detect.lang=en

com.perforce.p4search.auto-detect.key=AbcdEFG12345ZXvfe56210QWErtyui123456789

Your search for returned results