EasyOCR is a multilingual optical character recognition model deployable via our Serverless Cloud API. Supported languages include English, Japanese, Kannada, Korean, Latin (covering Spanish, French, Italian, Portuguese, German, Polish, and Dutch), Telugu, and Simplified Chinese.
EasyOCR API
Run EasyOCR through the HTTP endpoint directly with curl, or with the inference-sdk wrapper.
Get your API Key
Create a Roboflow account, find your key on the Roboflow API settings page and make it available to your shell:
export ROBOFLOW_API_KEY="your-key-here"Run the model
Call the /easy_ocr/ocr endpoint with curl:
curl --location 'https://serverless.roboflow.com/easy_ocr/ocr' \
--header 'Content-Type: application/json' \
--data '{
"api_key": "'"$ROBOFLOW_API_KEY"'",
"image": {"type": "url", "value": "https://media.roboflow.com/swift.png"},
"language_codes": ["en"]
}'Get your API Key
Create a Roboflow account, find your key on the Roboflow API settings page and make it available to your shell:
export ROBOFLOW_API_KEY="your-key-here"Install the dependencies
This package calls the model:
pip install -U inference-sdk supervisionRun the model
Run EasyOCR on an image:
import os
import supervision as sv
from inference_sdk import InferenceHTTPClient
image = sv.load_image_from_url("https://media.roboflow.com/swift.png")
client = InferenceHTTPClient(
api_url="https://serverless.roboflow.com",
api_key=os.environ["ROBOFLOW_API_KEY"],
)
result = client.ocr_image(
inference_input=image,
model="easy_ocr",
language_codes=["en"],
)
print(result["result"]) # Extracted textThe code above prints inference results to the terminal:
was thinking earlier today that have gone through, to use the lingo, eras Of listening to each of Swift's Eras. Meta indeed: started listening to Ms. Swift's music after hearing the Midnights album: few weeks after hearing the album for the first time, found myself playing various songs on repeat. listened to the album in order multiple times:EasyOCR inference speed
Latency measured with Roboflow Inference on 1x NVIDIA L4, batch size 1, mean after warmup.
| Model | Latency (ms) |
|---|---|
easy_ocr | 19.7 |
Measured on a full document image (text detection plus recognition).
Set api_url to match your deployment target:
https://serverless.roboflow.comfor the Serverless Cloud API.http://localhost:9001for a local Inference server.- Your Dedicated Deployment URL for a private endpoint.