POST v3/batch
POST api.mathpix.com/v3/batch
Process multiple equation images in a single request. The request body may contain any v3/latex parameters except src, plus a urls parameter and optional callback.
Only use the batch API when your workload is not latency sensitive! For immediate responses use single image endpoints.
See the batch processing guide for step-by-step examples.
Request parameters
urls key-value for each image in the batch where the value may be a string url or an object containing a url and image-specific options such as region and formats.
ocr_behavior callback Description of where to send the batch results. See Callback object.
When using ocr_behavior: "text", all v3/text params can be set at the top level or individually per URL.
Response body
batch_id Unique batch tracking ID
GET v3/batch/{batch_id}
GET api.mathpix.com/v3/batch/{batch_id}
Retrieve batch results. Wait approximately one second per five images before polling. The GET request must contain the same app_id and app_key headers as the POST.
keys all the url keys present in the originating batch request
results an OCR result for each key that has been processed
Before completion, the results field may be empty or contain only some results.
Callback object
post URL to post results to. Must be a string
reply Object merged into the callback response body. Must be an object, cannot contain batch_id
body Additional data included when posting results
headers HTTP headers to include when posting results
Invalid callback configuration returns error opts_bad_callback.