EasyOCR
Use the EasyOCR multilingual OCR model through our Serverless Hosted API
Code sample
curl --location 'https://serverless.roboflow.com/easy_ocr/ocr' \
--header 'Content-Type: application/json' \
--data '{
"api_key": "YOUR_API_KEY",
"image": {"type": "url", "value": "https://media.roboflow.com/swift.png"},
"language_codes": ["en"]
}'pip install inference-sdkimport os
import urllib.request
from inference_sdk import InferenceHTTPClient
image_url = "https://media.roboflow.com/swift.png"
image_path = "swift.png"
urllib.request.urlretrieve(image_url, image_path)
client = InferenceHTTPClient(
api_url="https://serverless.roboflow.com",
api_key=os.getenv("API_KEY"),
)
result = client.ocr_image(
inference_input=image_path,
model="easy_ocr",
language_codes=["en"],
)
print(result["result"]) # Extracted textLast updated
Was this helpful?