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"];
HTTPRequest[
"https://api.mathpix.com/v3/latex",
<|
"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.
PersistentValue["Mathpix", "Local"]={"$KeyName","$KeyValue"};
? Is "$KeyName" supposed to be replaced with a string representing the keyname? And what is the key name? $\endgroup$$KeyName = myusername123
$\endgroup$ResourceFunction["GitHubInstall"]["GalAster", "Mathpix"]
doesn't provide a Mathpix function.? Mathpix
returnsMissing["UnknownSymbol", "Mathpix"]
$\endgroup$