- Home
- Skills
- APIs & Backend
- Invoice OCR Extractor
More screenshots
Works with the AI Agents you already use
Invoice OCR Extractor
Containerized FastAPI service for extracting Pydantic-validated JSON from invoice images and PDFs via OCR and LLMs.
Free
Invoice OCR Extractor
Example session with this skill installed
I have a scanned invoice, invoice.jpg. Extract the details and give me the result as JSON.
- Read your context and instructions
- Compiled the invoice ocr extractor
- Generated the data export
I ran invoice.jpg through the invoice OCR service. The text was read with Tesseract, mapped to the invoice schema and validated successfully.
Extracted invoice data
| Field | Value |
|---|---|
| Company | Grand Name |
| Invoice number | 52148 |
| Date | 01/02/2020 |
| Customer | Dwyane Clark |
| Subtotal | 220.00 |
| Tax rate | 0.00% |
{
"company": "Grand Name",
"invoice_number": "52148",
"date": "01/02/2020",
"customer": "Dwyane Clark",
"subtotal": 220.0,
"tax_rate": "0.00%",
"items": [
"Lorem Ipsum Dolor",
"Pellentesque id neque ligula",
"Interdum et malesuada fames",
"Vivamus volutpat faucibus"
]
}
Next steps
- Check the company name. Stylized logos can be misread by OCR, so compare it with the original invoice.
- Check the totals. The service returns the subtotal and tax rate as printed; confirm they match your records.
- Use the JSON. Paste it into your spreadsheet, script or accounting tool.
- Multi-page PDF? Only the first page is processed, so send later pages as separate files.
invoice.jpg
CSV · data export
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Typing invoice data into a spreadsheet by hand is slow and error-prone. This skill gives your AI agent a small local service that reads an invoice image or PDF and returns the key fields as clean, validated JSON.
What it does
- Reads invoices: accepts JPEG, PNG and PDF files and extracts the text with Tesseract OCR (PDFs are handled through Poppler).
- Returns structured JSON: an LLM via OpenRouter maps the text to fixed fields: company, invoice number, date, customer, subtotal, tax rate and line items.
- Checks the output: the result is validated against a Pydantic schema, so malformed or incomplete answers are rejected with a clear error instead of being passed along silently.
- English and Turkish OCR: both Tesseract language packs are included.
- Runs locally in Docker: all dependencies are packaged in the included Dockerfile.
How it works
- Your agent creates a
.envfile with your own OpenRouter API key (the free tier is enough). - It builds and starts the Docker container (port 8000).
- It sends your invoice to the
/extract-invoiceendpoint. - It returns the validated JSON to you.
What you need
- Docker installed and running
- A free OpenRouter API key (your own, no Agensi tool balance is used)
Good for
- Pulling invoice fields into a spreadsheet, script or accounting workflow
- Quickly checking what a scanned invoice says, in structured form
- A starting point for your own invoice-processing pipeline (the full source is included)
Privacy
The text of your invoice is sent to OpenRouter and the model provider behind it. Avoid confidential invoices unless you are comfortable with that. The service itself runs on your machine, and your API key stays in your local .env file.
Known limitations
- Only the first page of a PDF is processed.
- Logos and stylized header text can be misread, so double-check the company name.
- No image preprocessing (deskewing, contrast fixes), so clear and upright scans work best.
- Uses OpenRouter's free model routing, so the model that answers can change and output quality may vary between runs.
- OCR is set up for English and Turkish; other languages need extra Tesseract language packs.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 8 days ago
- Free with an Agensi account
- Accounts
OpenRouter account (free API key)
- Software
Docker
Git
Terminal: runs Docker locally. Network: calls OpenRouter. Env var: OPENROUTER_API_KEY. Invoice text is sent to OpenRouter's LLM.
Permissions
Allowed Hosts
What's inside
Frequently Asked Questions
New in APIs & Backend
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.