Integrate perfectly into your PyTorch/Jupyter workflow with one pip install.
Set your API key via an environment variable, or pass it directly.
import solveocr
import os
os.environ["SOLVEOCR_API_KEY"] = "sk-..."
client = solveocr.Client()The `extract` method accepts standard file paths, raw bytes, or PIL Image objects.
res = client.extract("invoice.pdf")
print(res.text)
print(res.language)
print(res.bounding_boxes) # Returns numpy array of shape (N, 4)