Skip to main content
POST
/
api
/
v1
/
providers
/
mathpix
Mathpix Proxy
import requests

url = "https://www.datalab.to/api/v1/providers/mathpix"

files = { "file": ("example-file", open("example-file", "rb")) }
payload = { "page_range": "<string>" }
headers = {
    "X-Mathpix-App-Id": "<x-mathpix-app-id>",
    "X-Mathpix-App-Key": "<x-mathpix-app-key>"
}

response = requests.post(url, data=payload, files=files, headers=headers)

print(response.text)
{
  "success": true,
  "error": "<string>",
  "pages": [],
  "runtime": 0
}

Headers

X-Mathpix-App-Id
string
required
X-Mathpix-App-Key
string
required

Cookies

wos-session
string

Body

multipart/form-data
file
file
required
page_range
string | null

Response

Successful Response

Response from convert service / external providers.

success
boolean
required
error
string | null
pages
PageResult · object[]
runtime
number
default:0