Run OCRphoto from your code or your agent
The same extraction the site runs, behind an HTTP API and an MCP server. One credit per file either way, and the text comes back as plain text.
Your API keys
A key carries your account and spends your credits. It is shown once, when you create it.
Checking your account…
Submit a file, then read the text
Extraction is asynchronous: the job comes back queued, and the text arrives on it once the read finishes. Poll the job until its status is succeeded or failed.
curl -X POST https://ocrphoto.com/api/v1/ocr/jobs \
-H "Authorization: Bearer $OCRPHOTO_API_KEY" \
-H "Content-Type: image/png" \
--data-binary @receipt.png- Send the fileA raw body with the file's own content type, or a multipart form with a
filefield. JPEG, PNG, WebP, or PDF, up to 10 MB. - Poll the jobGET the job id you got back until the status settles. A failed job names a machine code and a sentence explaining it.
- Read the textA succeeded job carries the full transcription in
text. Jobs and their text are deleted 24 hours later.
Endpoints
| POST | /api/v1/ocr/jobs | Submit an image or PDF and get a job back |
| GET | /api/v1/ocr/jobs/{id} | Read the job, and its text once it succeeds |
| GET | /api/v1/ocr/jobs | List recent jobs, newest first |
| GET | /api/v1/account | Read the account and credit balance |
| GET | /api/v1/openapi.json | The OpenAPI 3.1 description of all of the above |
- Authenticate with
Authorization: Bearerand your key. Nothing here uses cookies. - 60 requests per minute per key, reported in the
X-RateLimit-*headers. - Errors are always
{"error": {"code", "message"}}; branch on the code, show the message.
MCP server for agents
OCRphoto speaks the Model Context Protocol over HTTP, so an agent can read a receipt or a scanned contract itself instead of asking someone to paste the text.
claude mcp add --transport http ocrphoto https://ocrphoto.com/mcp \
--header "Authorization: Bearer $OCRPHOTO_API_KEY"ocr_extract_text | Read one image or PDF, from base64 data or a public https URL |
ocr_get_job | Check a job that was still running when the call returned |
ocr_list_jobs | List recent jobs |
ocr_get_account | Check the credit balance |
The endpoint is https://ocrphoto.com/mcp, it accepts POST, and it carries your key in the same Authorization header the REST API uses.
Full reference
Every endpoint, field, error code, and limit is described formally inthe OpenAPI 3.1 document — point your client generator at it and skip reading this page twice.