Mathpix is a tool which can covert $\TeX$ image to $\TeX$ expression, they also say they can return a string which is compatible with the Wolfram Alpha engine if possible.

I found their documentation and did such an attempt:

doc: https://docs.mathpix.com/#processing-a-single-image

img = Import@"https://raw.githubusercontent.com/Mathpix/api-examples/master/images/limit.jpg";
base64 = ExportString[ExportString[img, "JPEG"], "Base64"];
        "Method" -> "POST",
        "Headers" -> {
            "app_id" -> "trial",
            "app_key" -> "34f1a4cea0eaca8540c95908b4dc84ab",
            "Content-type" -> "application/json"
        "Body" -> {
            "src" -> "data:image/jpg;base64," <> base64,
            "format" -> <|"wolfram" -> True|>
] // URLExecute[#, "RawJSON"]&

Then Mathematica kept asking me to input Authentication Require, and no matter what I do with that, it always return:

    "error" -> "Invalid credentials",
    "error_info" -> <|
        "id" -> "http_unauthorized",
        "message" -> "Invalid credentials"

I don't know what Authentication Require is, can I avoid jumping out of that verification.


Try Mathpix API in Mathematica


  • $\begingroup$ Isn't that created by the very same person who asked the question above? :-) $\endgroup$ – Szabolcs Apr 5 '19 at 17:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.