Documents
Website files stay in your account until you delete them. Review important values against the source before use.
Ask LipiCore
API access
Your API keys
You can create your own API keys here. A key is shown only once when it is created, so copy it immediately into your server environment. Use separate keys for UAT, production, and partner integrations, then revoke any key you no longer use.
Copy this key now. It will not be shown again.
Make your first request
API reference ↗
Use /v1/ocr when you want a processed document bundle. Use
/v1/reason when your system already has OCR text or page evidence and only
needs LipiCore reasoning. Use /v1/vision/reason when you want LipiCore to
reason directly over an uploaded image. The OCR bundle can also include LipiCore
reasoning files for a single extraction-plus-reasoning flow.
Integration modes
- OCR only
- Fast text response: send
output=cleantoPOST /v1/ocr. The JSON contains Nepali and English text with page locations. Uncertain regions have a null value and a review reason. This option does not run LipiCore reasoning or build a ZIP. -
POST /v1/ocrwith one PDF, PNG, JPEG, or single-page TIFF. Returns a ZIP with searchable PDF, Markdown, source document, page evidence and image assets. Set the multipart fieldmode=ocrfor OCR only, ormode=combinedfor OCR with reasoning. - Durable OCR job
POST /v1/jobswith one multipartfile, a bearer key,Idempotency-KeyandX-Retention-Seconds(60 to 86400). Store the returnedid,status_urlandexpires_at. Poll the returned status link with the bearer key. Once complete, fetch the returneddownload_urlwith that key before expiry. An expired job returns 410. On a lost submission response, retry the same file, retention and idempotency key.- Reasoning only
-
POST /v1/reasonwith JSON containing extracted text or page evidence. Returns document classification, field labels, key entities, bilingual pairing, normalization notes, review flags, and reviewer-safe reasoning. - Vision reasoning
-
POST /v1/vision/reasonwith a PNG, JPEG, WebP, or TIFF image. LipiCore reasons directly from the image and returns a summary, visible fields, uncertainty notes, language-aware output, and next-step guidance. - OCR + reasoning
-
POST /v1/ocrand readlipicore-reasoning.jsonandlipicore-reasoning.mdfrom the ZIP. This is the easiest integration when you want extraction artifacts and structured reasoning together.
Start with a working example
Create a key on the left, keep it in your server’s environment as LIPIOCR_API_KEY, and start with one of the documented flows below.
Download Python example · Download Node.js example
Python needs pip install requests; JavaScript needs Node.js 22 or later. Run python ocr.py ocr document.pdf job-001 result.zip, python ocr.py reason evidence.txt result.json, or python ocr.py vision document.jpg result.json. Node uses the same commands with node ocr.mjs.
Choose a unique job ID for each submission. The examples generate a UUID and save it beside the script’s working files. Keep that file and the same job ID for retries; never share a job ID between documents. In a production service, store this mapping in your job database.
Examples retry a busy queue twice with a delay. Other errors stop for review. OCR uses a 15-minute client timeout, reasoning 2 minutes, and vision 3 minutes. Python uses these as read-inactivity timeouts; Node.js uses a deadline per attempt. These are not processing-time guarantees.
Connection and local testing
The API base URL is https://ocr.lipi.one. Send your API key in the Authorization header; cross-site login cookies are not supported. Keep keys on your backend in production. Choose only the scopes you need: ocr, reason or vision. Keys default to 30 days of validity.
Test HTTPS without an API key:
curl -I --connect-timeout 10 --max-time 20 https://ocr.lipi.one/
Test browser access without processing a document:
curl -i -X OPTIONS https://ocr.lipi.one/v1/ocr \ -H 'Origin: http://localhost:3000' \ -H 'Access-Control-Request-Method: POST' \ -H 'Access-Control-Request-Headers: authorization,content-type,idempotency-key'
Expect HTTP 200 and, for the browser check, access-control-allow-origin: *. These checks verify connectivity, not authentication or extraction. Ping may time out even when HTTPS works. For browser uploads, let FormData set the multipart Content-Type boundary.
Request requirements
- Authorization
- Bearer token containing your API key.
- Idempotency-Key
-
Required for
/v1/ocrand/v1/jobs. Use a random UUID per logical submission. Synchronous OCR results cannot be replayed. For durable jobs, a matching retry returns the retained job. - file
-
For
/v1/ocr: one PDF, PNG, JPEG, or single-page TIFF, up to 50 MiB and 100 PDF pages. For/v1/vision/reason: one PNG, JPEG, WebP, or TIFF image, up to 8 MB. Password-protected PDFs are not supported. - question
-
Optional for
/v1/vision/reason. Use it to ask for a specific extraction, summary, or verification task. If omitted, LipiCore summarizes the document and lists visible fields. - language_mode
-
Optional for chat and vision reasoning:
auto,en, orne. Auto follows the user prompt and document language.
Successful response
/v1/ocr returns a ZIP file containing PDF, Markdown, the source document,
page JSON, image assets, and LipiCore reasoning files when available.
/v1/reason and /v1/vision/reason return JSON only. Save all
responses in your own application.
Synchronous API files and results are removed after the request finishes or fails. Durable API jobs are accessible only within their retention window. Usage metadata is retained. Documents uploaded through this website stay in your account until you delete them.
Errors and retry behavior
| Response | What to do |
|---|---|
| 401 · Unauthorized | Check that your API key is valid and has not been revoked. |
| 409 · Duplicate request | This request identifier has already been used. Results are not retained for replay. |
| 413 · File too large | Use a file no larger than 50 MiB for OCR or 8 MB for vision. |
| 422 · Invalid request | Check required headers, file format, page count, and PDF password protection. |
| 429 · Queue full | The queue rejected this attempt before processing. Retry with the same key and a delay. |
| 502 · Processing failed | Review the input and submit a new request identifier to try again. |
A new request identifier starts new processing and may incur another charge. A connection failure or timeout does not prove that processing failed. Synchronous OCR cannot recover the previous ZIP. Use durable jobs when you need status and result recovery.
Usage
OFFICE ADMINISTRATION