A simple urllib3 client is available at examples/python_client.py.
Install the Python dependency:
python3 -m pip install urllib3Submit an image or PDF upload and wait for the final result:
python3 examples/python_client.py upload /path/to/input.pdfIf API key authentication is enabled:
python3 examples/python_client.py \
--api-key replace-with-a-long-random-secret \
upload /path/to/input.pdfSubmit a server-side image or PDF path:
python3 examples/python_client.py path /path/to/input.pdfUse another OCR prompt:
python3 examples/python_client.py \
--prompt '<image>read this receipt' \
upload /path/to/image.pngSend the final job result to a webhook:
python3 examples/python_client.py \
--webhook-url https://example.com/unlimited-ocr-webhook \
upload /path/to/image.pngFetch an existing job:
python3 examples/python_client.py job <job-id>