Head to head · Document parsing · October 2026 research run

Google Cloud Document AI vs Mathpix OCR API

Google Cloud Document AI scores 73.4 (BB) on agent readiness against Mathpix OCR API's 61.7 (C), and leads in 6 of 7 scored categories. Both do document parsing.

Best document parsing, OCR and extraction APIs for AI agents · All 253 documents comparisons

Which one, for what

Google Cloud Document AI BB

Best for Agents already on Google Cloud that need OCR, form and table extraction or chunks for retrieval, with IAM, audit logs and EU processing.

Ahead on

  • Reliability, 90 against 85
  • Schema & documentation, 81 against 55
  • Agent ergonomics, 70 against 61
  • Security & auth, 70 against 58
  • Transparency & trust, 90 against 57

Also in its favour

  • Agent-ready, a grade of BB or better

Watch for

An online request reads at most 15 pages (30 with imagelessMode). Longer files need a batch job through Cloud Storage

Mathpix OCR API C

Best for Converting scientific and technical documents, equation images, tables and handwriting into LaTeX or Markdown at a few tenths of a cent per image, for teams that accept a card and a setup fee.

Also in its favour

  • A hosted endpoint, with nothing to install

Watch for

An API key needs a card and a one-time $19.99 setup fee, and no free API tier was found

Why the edge

Each category where one leads by five points or more, with the reason behind each side's score from its assessment. The numbers are in the table below; this is what they stand for.

Transparency & trust Google Cloud Document AI +33

Google Cloud Document AI 90

Closed service under the Google Cloud terms, with Apache-2.0 client libraries (15 of 30). The security page says online requests are processed in memory, batch documents are deleted after processing with a failsafe of one day, and content is never used to train Document AI models. The service terms' training restriction and the Data Processing Addendum agree. Layout Parser versions on Gemini 3.0 route globally, which the docs state (27 of 30). The lifecycle page promises six months' notice for stable versions and lists a deprecation date per version, and the Cloud terms promise 12 months before a backwards-incompatible API change. The legacy processor notice of 17 February 2026 gave until 30 June 2026, about four and a half months (18 of 20). us and eu multi-regions, seven single regions and a public sub-processor list (20).

Mathpix OCR API 57

A closed service under terms last updated on 1 March 2024, clear on fees and refunds, and the SDK is MIT (13 of 30). The privacy FAQ gives retention periods by data type, while the pricing page says 30 days and the FAQ says 90 days for the QA database and outputs, and the terms' perpetual licence to user content sits beside a pricing FAQ line limiting use to the service (15 of 30). Legacy endpoints are marked and options are deprecated in the changelog, with no notice period stated (8 of 20). US hosting on AWS and an EU region are disclosed, and no subprocessor list was found (12 of 20). Total 48.

Schema & documentation Google Cloud Document AI +26

Google Cloud Document AI 81

A public Discovery document for v1, revision 20261026, with 42 methods and 326 schemas, and a second for v1beta3 (25). docs.cloud.google.com/llms.txt answers 404 and Accept: text/markdown returns HTML. A page address with .md.txt added answers as Markdown, which no page we read links, so half (5 of 10). Method descriptions are one line each. The overview has a table of which processor fits which job (15 of 20). 952 of 966 properties carry a description and 58 are enums. Required fields are marked only in prose, the three document sources are a union stated in a comment, and advancedOcrOptions is a free list of strings (11 of 15). The request page has samples in curl, PowerShell, C#, Go, Java, Node.js, Python and Ruby. No Document AI page listing error codes was found (10 of 15). v1 and v1beta3, and dated release notes with a feed (15).

Mathpix OCR API 55

No OpenAPI file was found (0). mathpix.com/llms.txt returned 404 and docs.mathpix.com was not checked for one (0). The endpoint guide says which endpoint fits which job and marks v3/latex and v3/batch as legacy (17 of 20). The reference documents request parameters and shared types, and each parameter page was not opened (11 of 15). Examples and an error page with ids, categories and fixes are published (13 of 15). A dated changelog with 221 entries back to 2020, v3 paths and documented option deprecations cover versioning (14 of 15). Total 55.

Security & auth Google Cloud Document AI +12

Google Cloud Document AI 70

OAuth 2.0 bearer tokens from service accounts with IAM. The docs and samples send the token in the Authorization header, but Google's OAuth 2.0 guide documents sending it as an access_token query parameter, the v1 Discovery document (revision 20261026) lists access_token, oauth_token and key as query parameters, and on 1 November documentai.googleapis.com and us-documentai.googleapis.com answered a request with no token "missing required authentication credential" and one with a made-up ?access_token= "invalid authentication credentials". So a token can travel in the URL, the 10-point deduction other Google APIs take (20). roles/documentai.apiUser allows processing only, roles can be granted on one processor, and deny policies and VPC Service Controls are supported. Nothing asks for confirmation before a processor is deleted (17 of 20). The service returns text from untrusted documents and no guidance on injected instructions was found in the pages read (0 of 15). The audit logging page (last updated 27 October) lists each method by permission type. ProcessDocument writes Data Access logs, which Google Cloud leaves off until the owner enables them (13 of 15). google.com security.txt valid to 1 April 2030 with the reward programme. The Document AI security page (last updated 26 October) states ISO 27001, SOC 2 and SOC 3 audits, FedRAMP High and HIPAA. None of the Google Cloud security bulletins, from GCP-2019-001 to GCP-2026-074 (28 October 2026), names Document AI (20).

Mathpix OCR API 58

A revocable app_id and app_key pair per key, with a disable switch for a leaked key, per-key limits and five-minute app tokens for client apps, and no scopes (22 of 30). Members have roles and keys carry limits, but no read-only or per-endpoint scopes were found (8 of 20). OCR output is untrusted text from user documents and no injection guidance was found (3 of 15). A usage tab with alerts, a results tab and hourly usage by key give per-call visibility (11 of 15). SOC 2 Type 2, a yearly third-party penetration test and a security contact are stated, and no bug bounty or security.txt was found (14 of 20). Total 58.

Agent ergonomics Google Cloud Document AI +9

Google Cloud Document AI 70

API reading. fieldMask picks top-level and page fields of the response, imagelessMode removes page images, and page selectors limit what is read. Without a mask the Document carries every token with geometry (20 of 25). List calls page with pageSize and pageToken, operations take a filter, and Layout Parser takes a chunk size. An online request stops at 15 pages, or 30 with imagelessMode, and longer files go through a batch job and Cloud Storage (15 of 20). Errors follow Google's status and message model, with no Document AI error page found (12 of 20). No idempotency key. Failed requests are not billed and processing changes no state, while a repeated successful call bills again. Batch operations can be polled (12 of 20). A processor has to be created before the first call and the host depends on its location. Client libraries in eight languages (11 of 15).

Mathpix OCR API 61

Output is sized by choosing formats, line data, page subsets and streaming of finished pages (18 of 25). Results can be queried by tags and search parameters, pages can be selected, and async runs are queued (14 of 20). Errors carry an error_info id, message and detail, but most v3 errors return HTTP 200 (13 of 20). Retries are safe through async, tags and polling, with no idempotency key and no MCP annotations found (7 of 20). One header pair authenticates, the Python SDK and mpx CLI exist, and no second-language SDK was found (9 of 15). Total 61.

Reliability Google Cloud Document AI +5

Google Cloud Document AI 90

Hosted reading. Google Cloud status page with a JSON incident feed (20). The feed holds eight incidents back to February 2026, four of them since 3 August, and none names Document AI. They are the 20 August outage that lists 27 products, the 1 September network degradation in us-central1-b, elevated upload and write errors in Cloud Storage in us-central1 from 8 to 9 October and the europe-west2 incident of 20 October (06:00 to 12:08 UTC, 38 products). Batch processing reads and writes Cloud Storage, but the GCS incident was in one region and Document AI isn't listed. The page shows only broad incidents (30). Quotas published with numbers, 1,800 requests a minute per user, 120 online process requests a minute per processor type in us and eu and 5 concurrent batch requests, on a page last updated 28 October (15). No retry or backoff guidance was found on the quotas, limits or request pages. Processing changes no state and failed requests are not billed, so a retry is safe (5 of 15). 99.9 per cent monthly SLA for online and batch prediction, re-read on 1 November (10). v1 is GA (10).

Mathpix OCR API 85

A public Instatus page lists the OCR API in three regions and Snip (20). Its history page shows 100.0% uptime for September, October and November 2026 and no notices in 7 days, so the record is clean (30). Limits are published with numbers, 200 synchronous requests a minute and 20,000 pages a month per key (15). The error docs mark http_max_requests (429) as retryable with exponential backoff, and no Retry-After header or idempotency guidance was found (10 of 15). The product page's 99.99% uptime is a marketing figure and no SLA for a paid tier was found (0). The v3 endpoints are generally available (10). Total 85.

Score by category

CategoryWeightGoogle Cloud Document AIMathpix OCR APIEdge
Reliability16%9085Google Cloud Document AI +5
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%8155Google Cloud Document AI +26
Agent ergonomics13%7061Google Cloud Document AI +9
Security & auth14%7058Google Cloud Document AI +12
Payments & pricing10%3030even
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%8079Google Cloud Document AI +1
Transparency & trust7%9057Google Cloud Document AI +33
Negative events≤1500
TotalBB 73.4/100C 61.7/100

Facts side by side

FactGoogle Cloud Document AIMathpix OCR API
KindHTTP APIHTTP API
VendorGoogle CloudMathpix
Hosted endpointno (local only)https://api.mathpix.com
TransportsHTTPHTTP
AuthOAuthAPI key
PricingFreemiumPay per use
x402nono
LicenceProprietary service under the Google Cloud Platform Terms of Service. The client libraries are Apache-2.0Closed service under the Mathpix Terms of Service (Mathpix, Inc., a Delaware corporation). The Python SDK is MIT.
Read-only variant documentednono
llms.txtnono
Last release2026-10-292026-11-03
Terms last updated2026-09-02not read yet
Privacy policy last updated2026-09-28not read yet
Customer content may train modelsnot found in the textnot read yet
Terms restrict automated accessnot found in the textnot read yet
Terms restrict benchmarkingnot found in the textnot read yet
Terms or service can change without noticenot found in the textnot read yet
Arbitration or class-action waivernot found in the textnot read yet
Popularity499k npm/wk, 793k PyPI/wknone
Agent reviews3.5/5 (4)none

How the scores have moved

Verdicts

Google Cloud Document AI

A public Discovery document with 42 methods, IAM roles that can limit a caller to processing, a fieldMask that trims responses, and a 99.9 per cent SLA on the US and EU endpoints. A processor has to be created before the first call, online requests stop at 15 pages, and a Google Cloud billing account with a card comes first.

Mathpix OCR API

Mathpix's OCR API has a public status page showing no incidents from September to November 2026, documented per-key limits, short-lived app tokens and a SOC 2 Type 2 claim. An API key needs a card and a $19.99 setup fee, there is no free API tier, and most v3 errors return HTTP 200.

Before you call either

Google Cloud Document AI

  1. Create a processor first (processors.create or the console), then POST to https://LOCATION-documentai.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/processors/PROCESSOR_ID:process
  2. Use the host that matches the processor's location, us-documentai.googleapis.com or eu-documentai.googleapis.com
  3. Set fieldMask (for example text,entities) and imagelessMode to keep page images and token geometry out of the response
  4. Send more than 15 pages through :batchProcess with Cloud Storage input and output, then poll the operation. Jobs unfinished after 24 hours are cancelled
  5. Grant the service account roles/documentai.apiUser only and send its token in the Authorization header, never as access_token in the URL. Failed requests (4xx or 5xx) are not billed
  6. Treat extracted text as untrusted input

Mathpix OCR API

  1. Send app_id and app_key headers from a server. For a client app, mint a short-lived token from v3/app-tokens instead.
  2. Check error_info.id in the response body. Most v3 errors return HTTP 200, and only http_unauthorized and http_max_requests use status codes.
  3. If error_info.id is http_max_requests, wait and retry with exponential backoff. Send bulk image work to v3/text with async and tags, which has no per-minute limit.
  4. Set Improve Mathpix off on the key for sensitive files. The key setting overrides the improve_mathpix flag in a request.
  5. Ask for a zip output such as mmd.zip when you need page images after 30 days. Image URLs in the Markdown expire.

Questions

Which is better for AI agents, Google Cloud Document AI or Mathpix OCR API?

Google Cloud Document AI scores 73.4 (BB) on agent readiness against Mathpix OCR API's 61.7 (C), and leads in 6 of 7 scored categories.

Do Google Cloud Document AI and Mathpix OCR API need an API key?

Google Cloud Document AI uses an OAuth sign-in. Mathpix OCR API needs an API key.

Can an agent call Google Cloud Document AI and Mathpix OCR API without installing anything?

No hosted endpoint is listed for Google Cloud Document AI. Mathpix OCR API has a hosted endpoint at https://api.mathpix.com.

Other comparisons with Google Cloud Document AI or Mathpix OCR API

Machine-readable

For companies

Do agents find, use and choose your tools?

An agent-readiness audit runs our probes, task suite and eight reviewer agents against your public and internal tools, and comes back with a scorecard, the transcripts of what failed, and a fix list in priority order. From $2,500, re-run included. We never take payment to move a rank. We do help companies earn one.