Mathpix · Capability

Mathpix Document OCR API — Documents

Mathpix Document OCR API — Documents. Submit, monitor, stream, retrieve, and delete PDF/document OCR jobs. Self-contained Naftiko capability covering one Mathpix business surface.

Mathpix Document OCR API — Documents is a Naftiko capability published by Mathpix, one of 7 capabilities the APIs.io network indexes for this provider. It bundles 1 operation across the POST method rooted at /v1/v3/pdf.

The capability includes 2 read-only operations and 1 state-changing operation. Lead operation: Process A Document. Can be deployed as a REST endpoint, MCP tool, or Agent Skill via Naftiko.

Tagged areas include Mathpix, OCR, PDF, and Documents.

Run with Naftiko MathpixOCRPDFDocuments

What You Can Do

POST
Processdocument — Process A Document
/v1/v3/pdf

MCP Tools

mathpix-process-document

Process A Document

mathpix-get-document-status

Get Document Status

read-only idempotent
mathpix-download-mmd

Download Mathpix Markdown

read-only idempotent

Capability Spec

document-ocr-documents.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Mathpix Document OCR API — Documents
  description: 'Mathpix Document OCR API — Documents. Submit, monitor, stream, retrieve, and delete
    PDF/document OCR jobs. Self-contained Naftiko capability covering one Mathpix business surface.'
  tags:
  - Mathpix
  - OCR
  - PDF
  - Documents
  created: '2026-05-25'
  modified: '2026-05-25'
binds:
- namespace: env
  keys:
    MATHPIX_APP_ID: MATHPIX_APP_ID
    MATHPIX_APP_KEY: MATHPIX_APP_KEY
capability:
  consumes:
  - type: http
    namespace: document-ocr-documents
    baseUri: https://api.mathpix.com
    description: Mathpix Document OCR API — Documents business capability.
    resources:
    - name: v3-pdf
      path: /v3/pdf
      operations:
      - name: processdocument
        method: POST
        description: Process A Document
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          required: true
    - name: v3-pdf-item
      path: /v3/pdf/{pdf_id}
      operations:
      - name: getdocumentstatus
        method: GET
        description: Get Document Status
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: pdf_id
          in: path
          type: string
          required: true
      - name: deletedocument
        method: DELETE
        description: Delete Document
        inputParameters:
        - name: pdf_id
          in: path
          type: string
          required: true
    - name: v3-pdf-mmd
      path: /v3/pdf/{pdf_id}.mmd
      operations:
      - name: downloadmmd
        method: GET
        description: Download Mathpix Markdown
        outputRawFormat: text
        inputParameters:
        - name: pdf_id
          in: path
          type: string
          required: true
    - name: v3-pdf-docx
      path: /v3/pdf/{pdf_id}.docx
      operations:
      - name: downloaddocx
        method: GET
        description: Download DOCX
        outputRawFormat: binary
        inputParameters:
        - name: pdf_id
          in: path
          type: string
          required: true
    - name: v3-pdf-tex-zip
      path: /v3/pdf/{pdf_id}.tex.zip
      operations:
      - name: downloadtexzip
        method: GET
        description: Download LaTeX Archive
        outputRawFormat: binary
        inputParameters:
        - name: pdf_id
          in: path
          type: string
          required: true
    authentication:
      type: apikey
      key: app_key
      value: '{{env.MATHPIX_APP_KEY}}'
      placement: header
      additionalHeaders:
        app_id: '{{env.MATHPIX_APP_ID}}'
  exposes:
  - type: rest
    namespace: document-ocr-documents-rest
    port: 8080
    description: REST adapter for Mathpix Document OCR API — Documents.
    resources:
    - path: /v1/v3/pdf
      name: v3-pdf
      operations:
      - method: POST
        name: processdocument
        description: Process A Document
        call: document-ocr-documents.processdocument
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: document-ocr-documents-mcp
    port: 9090
    transport: http
    description: MCP adapter for Mathpix Document OCR API — Documents.
    tools:
    - name: mathpix-process-document
      description: Process A Document
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: document-ocr-documents.processdocument
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: mathpix-get-document-status
      description: Get Document Status
      hints:
        readOnly: true
        idempotent: true
      call: document-ocr-documents.getdocumentstatus
      with:
        pdf_id: tools.pdf_id
      outputParameters:
      - type: object
        mapping: $.
    - name: mathpix-download-mmd
      description: Download Mathpix Markdown
      hints:
        readOnly: true
        idempotent: true
      call: document-ocr-documents.downloadmmd
      with:
        pdf_id: tools.pdf_id
      outputParameters:
      - type: string
        mapping: $.