$5 free credits when you sign up Claim now
Marlin 2b now available Test it!
MiniMax H3 now available! Test it!
Browse all Models
Browse all
Browse all
Browse all

OCR API Scans and Photos to Markdown

Upload a photo or scan of an invoice, receipt or report page and read the result as Markdown: line items and other tables as HTML, equations as LaTeX, chart bars as numbers. deAPI runs LightOnOCR-3-4B, an open model from LightOn, and charges per image by size.

$5 in free credits to start. No credit card required.

per A4 page (2048 px)
$0.025
per receipt photo (664 × 872)
$0.0053
free credits, about 196 A4 pages
$5

What the OCR API Returns

Three documents a pipeline meets every day: a phone photo of an invoice, a till receipt and a two-column report page. Each box holds the unedited LightOnOCR-3-4B output; scroll it to the end.

  • Test invoice from a German seller to a Polish buyer, rotated, blurred and noisy like a phone photo
    # INVOICE No. 2026/11/0457
    
    ## Seller:
    Nordwind Tools GmbH
    Hafenstraße 12, 20457 Hamburg
    VAT ID: DE 298 114 551
    
    Issue date: 2026-11-02
    
    ## Buyer:
    Kowalski & Syn sp. z o.o.
    ul. Żółkiewskiego 7/3, 31-539 Kraków
    NIP: 676-25-81-904
    
    Due date: 2026-11-30
    
    <table>
      <thead>
        <tr>
          <th>#</th>
          <th>Item</th>
          <th>Qty</th>
          <th>Unit price (EUR)</th>
          <th>VAT</th>
          <th>Net (EUR)</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>1</td>
          <td>Torque wrench TW-40, 1/2"</td>
          <td>12</td>
          <td>84.50</td>
          <td>0%</td>
          <td>1,014.00</td>
        </tr>
        <tr>
          <td>2</td>
          <td>Socket set S-94 (94 pcs)</td>
          <td>5</td>
          <td>129.00</td>
          <td>0%</td>
          <td>645.00</td>
        </tr>
        <tr>
          <td>3</td>
          <td>Shipping DHL Freight</td>
          <td>1</td>
          <td>48.90</td>
          <td>0%</td>
          <td>48.90</td>
        </tr>
      </tbody>
    </table>
    
    Total net: **1,707.90 EUR**
    Reverse charge, Art. 196 Directive 2006/112/EC

    Invoice photo

    Rotated 2° and blurred. Seller, buyer, VAT IDs and dates come back as text, the line items as an HTML table. $0.007 for this image.

  • Test till receipt from a Madrid grocery with six items and a VAT breakdown, slightly rotated and blurred
    # MERCADO LUMEN
    
    Calle Mayor 14, 28013 Madrid  
    NIF B-86512034  
    Tel. 915 22 41 70
    
    ---
    
    Factura simplificada T-0415/2611  
    Fecha 02/11/2026 Hora 18:42  
    Caja 3 Atendido por: Lucía
    
    ---
    
    <table>
      <thead>
        <tr>
          <th>Item</th>
          <th>Cantidad</th>
          <th>Precio Unitario</th>
          <th>Total</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>Pan de masa madre</td>
          <td>1</td>
          <td></td>
          <td>3,20</td>
        </tr>
        <tr>
          <td>Aceite oliva v.e. 1 l</td>
          <td>1</td>
          <td></td>
          <td>9,85</td>
        </tr>
        <tr>
          <td>Tomate rama kg</td>
          <td>1,250</td>
          <td></td>
          <td>3,11</td>
        </tr>
        <tr>
          <td>Queso manchego cur.</td>
          <td>1</td>
          <td></td>
          <td>7,40</td>
        </tr>
        <tr>
          <td>Agua mineral 1,5 l</td>
          <td>6</td>
          <td></td>
          <td>3,30</td>
        </tr>
        <tr>
          <td>Café molido 250 g</td>
          <td>2</td>
          <td></td>
          <td>6,58</td>
        </tr>
      </tbody>
    </table>
    
    
    ---
    
    TOTAL EUR 33,44  
    Tarjeta **** 4417 33,44
    
    ---
    
    <table>
      <thead>
        <tr>
          <th>IVA</th>
          <th>Base</th>
          <th>Cuota</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>4%</td>
          <td>13,18</td>
          <td>0,53</td>
        </tr>
        <tr>
          <td>10%</td>
          <td>17,94</td>
          <td>1,79</td>
        </tr>
      </tbody>
    </table>
    
    
    ---
    
    ¡Gracias por su visita!

    Till receipt

    Every amount and both VAT rates came back right. The receipt prints no column names, so the model added its own and an empty unit-price column; map the columns by position. $0.0053 for this image.

  • Two-column A4 page from a working paper with a table and a footnote
    # Cold-chain losses in regional food distribution
    
    Working paper 14/2026 · Logistics Research Unit
    
    ## 1. Introduction
    
    Perishable goods lose value at every hand-off between warehouse, truck and shop. In the 2025 audit of 212 deliveries, temperature excursions above 8 °C lasted on average 37 minutes per route, most of them during unloading. This paper measures how much product those excursions cost and which routes account for most of the loss.
    
    We combine data loggers on 64 trucks with invoices from 18 retailers. Each delivery is matched to its loss report within 48 hours, which lets us separate spoilage in transit from spoilage on the shop floor.
    
    ## 2. Data and method
    
    Loggers recorded the air temperature every 60 seconds. A delivery counts as an excursion when the reading stays above 8 °C for more than five consecutive minutes. Losses are valued at the retailer’s purchase price, net of VAT.¹
    
    Table 1 summarises the sample by product group. Dairy and fresh meat make up 61% of the value shipped but 78% of the value lost.
    
    <table>
      <thead>
        <tr>
          <th>Product group</th>
          <th>Deliveries</th>
          <th>Excursions</th>
          <th>Loss (EUR)</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>Dairy</td>
          <td>74</td>
          <td>19</td>
          <td>4,210</td>
        </tr>
        <tr>
          <td>Fresh meat</td>
          <td>51</td>
          <td>16</td>
          <td>6,980</td>
        </tr>
        <tr>
          <td>Fruit and vegetables</td>
          <td>63</td>
          <td>9</td>
          <td>1,345</td>
        </tr>
        <tr>
          <td>Frozen</td>
          <td>24</td>
          <td>3</td>
          <td>610</td>
        </tr>
        <tr>
          <td><strong>Total</strong></td>
          <td><strong>212</strong></td>
          <td><strong>47</strong></td>
          <td><strong>13,145</strong></td>
        </tr>
      </tbody>
    </table>
    
    *Table 1. Deliveries, excursions and losses by product group, March–October 2025.*
    
    ## 3. Results
    
    Routes with more than six stops had twice the excursion rate of shorter routes (31% against 15%). The effect holds after controlling for outside temperature and truck age. Unloading with the doors open for longer than ten minutes explains about half of the difference.
    
    Moving the two longest routes to an early-morning slot would have cut excursions by an estimated 40% at no extra fuel cost. We discuss the limits of this estimate in Section 4.
    
    ## 4. Limitations
    
    Retailers report losses by hand and may round them. Loggers sit near the doors, so they overstate the temperature in the middle of the load.
    
    ---
    
    ¹ Purchase prices come from the invoices; where a line item was missing, we used the median price for that product in the same month.
    
    7

    Two-column A4 page

    Sent at 1448 × 2048 px. The columns are read in order, the table that runs across both columns comes back as one table and the footnote lands at the end. $0.025 for the page.

What Teams Build With an OCR API

  • Finance

    Invoice and receipt capture

    Line items arrive as an HTML table, so your code reads rows and columns straight from the markup. Check totals and VAT IDs in your own code before you book anything.

  • RAG

    Scanned PDFs into a search index

    Headings stay Markdown headings and tables stay tables, which gives you clean chunk boundaries. Render each PDF page to an image first; the API takes images only.

  • Reports

    Numbers out of charts

    Feed slides and PDF reports through it and each bar chart arrives as a small table of figures, so the numbers reach your spreadsheet without retyping. The chart test is on the LightOnOCR-3 page.

  • Research

    Papers with math

    Formulas come back as LaTeX, inline ones as $…$ and display equations as $$ blocks that KaTeX or MathJax render.

Request and Response

One multipart POST to /api/v2/images/ocr. The call returns a request ID, and the text arrives on the job endpoint or your webhook.

Request
image
The page as a file upload in JPG, PNG, GIF or BMP; a PDF is rejected. Max 10 MB, each side between 128 and 4096 px.
model
LightOnOcr_3_4B_Q8, or Nanonets_Ocr_S_F16 for the other OCR model.
return_result_in_response
Set to true to get the text in the job status instead of only a file link.
webhook_url
HTTPS URL called when the job starts, finishes or fails. Signed with HMAC-SHA256 using webhook_secret or your account's default secret.
Job status (JSON)
status
pending, processing, done or error.
result
The Markdown, when return_result_in_response is on.
result_url
Link to the same Markdown as a .txt file.
price
What the job cost, in USD (price.amount). A failed job that was refunded shows 0.

OCR API Pricing by Image Size

You pay for pixels, not for text, so a full page and an empty one of the same size cost the same and a batch is easy to budget up front.

Image Price Images for $5
Report page, A4 at 1448 × 2048 $0.025 ≈ 196
Receipt photo, 664 × 872 $0.0053 ≈ 938

Prices from the deAPI /price endpoint, 3 November 2026. Other sizes and the per-megapixel rate are in the full price table. Before a batch, POST its width and height to /api/v2/images/ocr/price for an exact quote.

PDF to Markdown in Three Steps

  1. Render the pages

    Rasterise every page to PNG; pypdfium2 and pdftoppm both work. LightOn recommends 2048 px for the longer side, and at half that size one figure on our test page came back wrong.

  2. Send one request per page

    POST each image to /api/v2/images/ocr with model LightOnOcr_3_4B_Q8. Quote the batch first with the /price endpoint.

  3. Join the Markdown

    Read each result from the job or your webhook and join the pages in order.

  • $5 in free credits
  • No credit card required
  • Prepaid, no subscription

Run Your First 196 Pages on Free Credits

$5 of credits is enough for roughly 196 full A4 pages. Email verification, no card. For volumes of 100,000 images and up, ask sales about bulk pricing.

See also LightOnOCR-3 API and Transcription MCP Server.

Frequently Asked Questions

OCR output, input formats and pricing

You pick it with the model field. LightOnOcr_3_4B_Q8 runs LightOnOCR-3-4B, an Apache 2.0 model LightOn released in October 2026. Nanonets_Ocr_S_F16 runs Nanonets-OCR-s at the same price per image.
Not as a file. Convert the PDF to one image per page, send each page as its own request and join the Markdown in page order, as in the PDF section above.
About $0.025 for an A4 page at the recommended 2048 px and $0.0053 for the receipt photo above. The bill follows image size, never the amount of text, and the /price endpoint gives the exact figure for any width and height.
Plain Markdown text. Anything tabular, from invoice lines to chart values, arrives as an HTML table, and formulas arrive as LaTeX. Photos and logos on the page are replaced by a placeholder such as ![image](image_1.png).
Our invoice and receipt test images were rotated and blurred like phone photos, and every amount on both came back correct. Results depend on the photo, so run a sample of your own before a large batch.
The docs offer volume discounts from 100,000 images. Talk to sales with your monthly volume.