超级公式开放平台API
  1. API列表
超级公式开放平台API
  • 一分钟,带您了解超级公式
  • 使用前阅读的基础信息
  • API列表
    • 【图片】公式识别
      POST
    • 【图片】查询公式识别结果
      POST
    • 【转换】Latex转MathML
      POST
    • 【转换】Latex转Word
      POST
    • 【转换】Latex转SVG
      POST
    • 【PDF】PDF公式识别
      POST
    • 【PDF】查询PDF识别进度
      POST
    • 【账户】查询API调用次数
      POST
  1. API列表

【转换】Latex转MathML

POST
/v2/latex/mathml

请求参数

Header 参数
Content-Type
string 
必需
示例值:
application/json
x-api-key
string 
必需
x-md5
string 
必需
timestamp
string 
必需
Body 参数multipart/form-data
latex
string 
必需
latex格式的公式
示例值:
$\lim_{x \to \infty} x^2_{22} - \int_{1}^{5}x\mathrm{d}x + \sum_{n=1}^{20} n^{2} = \prod_{j=1}^{3} y_{j} + \lim_{x \to -2} \frac{x-2}{x}$

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://open.ocrmath.com/v2/latex/mathml' \
--header 'x-api-key;' \
--header 'x-md5;' \
--header 'timestamp;' \
--form 'latex="$\\lim_{x \\to \\infty} x^2_{22} - \\int_{1}^{5}x\\mathrm{d}x + \\sum_{n=1}^{20} n^{2} = \\prod_{j=1}^{3} y_{j}  + \\lim_{x \\to -2} \\frac{x-2}{x}$"'

返回响应

🟢200成功
application/json
Body
code
integer 
必需
>= 0<= 0
示例
{
    "errno": 0,
    "data": "<math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"inline\"><mrow><mi>$</mi><munder><mo>lim</mo><mrow><mi>x</mi><mo>&#x02192;</mo><mo>&#x0221E;</mo></mrow></munder><msubsup><mi>x</mi><mrow><mn>22</mn></mrow><mn>2</mn></msubsup><mo>&#x02212;</mo><msubsup><mo>&#x0222B;</mo><mrow><mn>1</mn></mrow><mrow><mn>5</mn></mrow></msubsup><mi>x</mi><mi>&#x00064;</mi><mi>x</mi><mo>&#x0002B;</mo><msubsup><mo>&#x02211;</mo><mrow><mi>n</mi><mo>&#x0003D;</mo><mn>1</mn></mrow><mrow><mn>20</mn></mrow></msubsup><msup><mi>n</mi><mrow><mn>2</mn></mrow></msup><mo>&#x0003D;</mo><msubsup><mo>&#x0220F;</mo><mrow><mi>j</mi><mo>&#x0003D;</mo><mn>1</mn></mrow><mrow><mn>3</mn></mrow></msubsup><msub><mi>y</mi><mrow><mi>j</mi></mrow></msub><mo>&#x0002B;</mo><munder><mo>lim</mo><mrow><mi>x</mi><mo>&#x02192;</mo><mo>&#x02212;</mo><mn>2</mn></mrow></munder><mfrac><mrow><mi>x</mi><mo>&#x02212;</mo><mn>2</mn></mrow><mrow><mi>x</mi></mrow></mfrac><mi>$</mi></mrow></math>"
}
修改于 2022-08-25 07:39:32
上一页
【图片】查询公式识别结果
下一页
【转换】Latex转Word
Built with