Mathpix Batches API

Process multiple images in one request.

Operations 2

POST /v3/batch Submit A Batch #
GET /v3/batch/{batch_id} Get Batch Results #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/mathpix-batches-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

mathpix-batches-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mathpix App Tokens Batches API
  description: 'Mint short-lived client-side tokens so browsers, mobile apps, and digital-ink surfaces can call Mathpix without exposing your long-lived app_key. Tokens default to 5 minutes and can be issued from 30 seconds to 12 hours. Token issuance is free.

    '
  version: v3
  contact:
    name: Mathpix Support
    url: https://docs.mathpix.com
    email: support@mathpix.com
  license:
    name: Mathpix Terms of Service
    url: https://mathpix.com/terms-of-service
servers:
- url: https://api.mathpix.com
  description: Production Server
security:
- AppKeyAuth: []
tags:
- name: Batches
  description: Process multiple images in one request.
paths:
  /v3/batch:
    post:
      summary: Submit A Batch
      description: Submit a batch of image URLs (with optional per-image options) for OCR. Poll results using the returned batch_id.
      operationId: submitBatch
      tags:
      - Batches
      parameters:
      - $ref: '#/components/parameters/AppIdHeader'
      - $ref: '#/components/parameters/AppKeyHeader'
      - $ref: '#/components/parameters/ContentTypeHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchRequest'
      responses:
        '200':
          description: Batch accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchSubmitResponse'
  /v3/batch/{batch_id}:
    get:
      summary: Get Batch Results
      description: Retrieve OCR results for the batch. Mathpix recommends waiting approximately one second per five images before polling.
      operationId: getBatchResults
      tags:
      - Batches
      parameters:
      - $ref: '#/components/parameters/AppIdHeader'
      - $ref: '#/components/parameters/AppKeyHeader'
      - name: batch_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Batch results (may be partial).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchResultsResponse'
components:
  parameters:
    AppKeyHeader:
      name: app_key
      in: header
      required: true
      schema:
        type: string
    ContentTypeHeader:
      name: Content-Type
      in: header
      required: true
      schema:
        type: string
        default: application/json
    AppIdHeader:
      name: app_id
      in: header
      required: true
      schema:
        type: string
  schemas:
    BatchResultsResponse:
      type: object
      properties:
        keys:
          type: array
          items:
            type: string
        results:
          type: object
          description: Map of submitted key -> per-image OCR result object.
          additionalProperties: true
    BatchRequest:
      type: object
      required:
      - urls
      properties:
        urls:
          type: object
          description: 'Map of caller-defined keys to either an image URL string or an object containing url plus image-specific OCR options (the v3/text request fields).

            '
          additionalProperties:
            oneOf:
            - type: string
              format: uri
            - type: object
              additionalProperties: true
        formats:
          type: array
          items:
            type: string
            enum:
            - text
            - data
            - html
            - latex_styled
        ocr_behavior:
          type: string
          enum:
          - text
          - latex
          default: latex
        callback:
          type: object
          description: Optional webhook callback definition with post URL and reply settings.
          additionalProperties: true
        metadata:
          type: object
          additionalProperties: true
    BatchSubmitResponse:
      type: object
      properties:
        batch_id:
          type: integer
  securitySchemes:
    AppKeyAuth:
      type: apiKey
      in: header
      name: app_key