S
S
Solvio
Search…
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.
Solvio Math and Text OCR.postman_collection.json
115KB
Code
post
https://developer.trysolvio.ai/api
/ocr
Math and Text OCR

Code Samples

JavaScript
Python
Java
1
const headers = {
2
'content-type': 'application/json',
3
// Paste your token here
4
'authorization': 'Bearer eyJhbGciOiJSUzI1...'
5
}
6
7
const body = {
8
src: "data:image/png;base64,iVBOR..."
9
}
10
11
fetch("https://developer.trysolvio.ai/api/text/digital", {
12
method: 'POST',
13
headers,
14
body: JSON.stringify(body)
15
}).then(res => {
16
return res.json()
17
}).then(data => {
18
console.log(data);
19
})
Copied!
1
import requests
2
import json
3
4
url = "https://developer.trysolvio.ai/api/text/digital"
5
6
payload = json.dumps({
7
src : "data:image/png;base64,iVBOR..."
8
})
9
10
headers = {
11
'content-type' : 'application/json',
12
# Add your token here
13
'authorization' : 'Bearer eyJhbGciOiJSUzI1...'
14
}
15
16
response = requests.post(url, headers=headers, data=payload)
17
18
print(response.json())
Copied!
1
JSONObject obj = new JSONObject();
2
// Put your base64 encoded image here
3
obj.put("src", "data:image/png;base64,iVBOR...");
4
5
OkHttpClient client = new OkHttpClient();
6
7
MediaType mediaType = MediaType.parse("application/json; charset=utf-8");
8
String body = obj.toString().toRequestBody(mediaType);
9
10
// Make sure to put the correct token in the Authorization header
11
Request request: Request = Request.Builder()
12
.url("https://developer.trysolvio.ai/api/text/digital")
13
.addHeader("Authorization", "Bearer eyJhbGciOiJSUzI1...")
14
.post(body)
15
.build();
16
17
Response response = client.newCall(request).execute();
18
19
// You can convert the string to JSONObject if needed
20
System.out.println(response.body().string());
21
Copied!
If you have a feature request, please write to us at [email protected].