Math and Text OCR

Digitize an image containing math and text content. The output is a LaTeX expression by default (other formats coming soon).

Get started with Solvio's Math and Text OCR API easily by downloading the Postman Collection attached below. To learn more about Postman Collections click here.

Math and Text OCR

POST https://developer.trysolvio.ai/api/ocr

Simply pass the image represented as a base64 encoded string as the body parameter, src.

Headers

NameTypeDescription

Authentication

string

Pass token in the format Bearer <Token>. Check out Authentication for more.

Request Body

NameTypeDescription

src

string

Image in base64 encoded format data:image/png;base64,iVBO

{
    "data" : {
        "latex" : "\\int \\frac { x ... "
    },
    "requestId" : "11",
    // Error will only present if any error is there
    // otherwise it will be null
    "error": {
        "id": "image_decode_error",
        "description": "Cannot read image"
    }
}

Code Samples

const headers = {
    'content-type': 'application/json',
    // Paste your token here
    'authorization': 'Bearer eyJhbGciOiJSUzI1...'
}

const body = {
    src: "data:image/png;base64,iVBOR..."
}

fetch("https://developer.trysolvio.ai/api/text/digital", {
    method: 'POST',
    headers,
    body: JSON.stringify(body)
}).then(res => {
    return res.json()
}).then(data => {
    console.log(data);
})

If you have a feature request, please write to us at hello@trysolvio.ai.

Last updated