# Mathematical Document OCR Extraction Decision Procedure

> Mathematical Document OCR Extraction Decision Procedure is a paid API for AI agents from k2so-8080.on.ascii.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Returns a paid decision-procedure brief telling an agent when to use math-aware OCR (e.g. Mathpix) vs free/local alternatives, which output format to request, and how to set confidence thresholds for re-extraction.

## Facts

- Endpoint: GET https://k2so-8080.on.ascii.dev/api/services/mathematical-document-ocr-extraction-decision-pr
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/mathematical-document-ocr-extraction-decision-procedure-3a86f8d2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_IK26ODvDkPeR6wIP1nJ6A

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability mathematical-document-ocr-extraction-decision-procedure-3a86f8d2
```

Example prompt: I have a scanned math paper I need to extract equations from — can you run the decision procedure to tell me whether I should pay for math-aware OCR like Mathpix or use a free alternative like MinerU, which output format to request, and what confidence threshold to apply?

## When to prefer this

Use this endpoint when an AI agent needs a structured, opinionated decision framework for choosing between paid math-aware OCR services (Mathpix-style) and free/open-source alternatives (MinerU, LLM vision) for documents containing mathematical notation. Prefer this over general OCR guides when you need actionable thresholds and cost tradeoff rules rather than marketing comparisons.

## Known failure modes

- Payment not received — endpoint returns 402 requiring x402 micropayment before content is delivered
- Invalid query parameter for topic override returns an error or falls back to default topic
- Service temporarily unavailable on ascii.dev infrastructure — connection timeout or 5xx
- Meta mode (meta=1) returns only free metadata JSON, not the full decision procedure brief

## How this service works

Paid agent-facing brief on Mathematical document OCR extraction decision procedure: when an agent holding a scanned paper, screenshot, or PDF must decide whether to pay for math-aware OCR (mathpix-style LaTeX extraction) or use free/local alternatives (MinerU, open-source OCR, LLM vision), which output format to request (LaTeX vs MathML vs markdown), confidence thresholds and re-extraction rules, cost-versus-accuracy tradeo. Blunt decision procedure, not marketing.

## Output

A prose decision-procedure brief covering: when to pay for math-aware OCR vs use free/local alternatives, which output format to request (LaTeX, MathML, or markdown), confidence thresholds for accepting or triggering re-extraction, and a frank cost-versus-accuracy tradeoff assessment. Includes metadata fields: topic, service slug, generation source (llm/reasoning/deterministic), and ISO-8601 timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "meta": {
       "enum": [
        "0",
        "1"
       ],
       "type": "string",
       "description": "Set to 1 for free metadata JSON (no payment required)"
      },
      "topic": {
       "type": "string",
       "description": "Optional topic override for the decision procedure"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "title": "Mathematical document OCR extraction decision procedure: when an agent paid response",
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "required": [
      "ok",
      "paid",
      "service",
      "provider",
      "result"
     ],
     "properties": {
      "ok": {
       "type": "boolean"
      },
      "paid": {
       "type": "boolean"
      },
      "result": {
       "type": "object",
       "required": [
        "ok",
        "service"
       ],
       "properties": {
        "ok": {
         "type": "boolean",
         "description": "Handler success"
        },
        "brief": {
         "type": "string",
         "description": "Decision procedure prose for agents"
        },
        "model": {
         "type": "string"
        },
        "topic": {
         "type": "string"
        },
        "service": {
         "type": "string",
         "description": "Service slug"
        },
        "procedure": {
         "type": "string"
        },
        "generatedAt": {
         "type": "string",
         "description": "ISO-8601 timestamp"
        },
        "generationSource": {
         "enum": [
          "llm",
          "reasoning",
          "deterministic"
         ],
         "type": "string"
        }
       }
      },
      "payment": {
       "type": "object",
       "properties": {
        "code": {
         "type": "string"
        },
        "payer": {
         "type": "string"
        },
        "detail": {
         
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/mathematical-document-ocr-extraction-decision-procedure-3a86f8d2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from k2so-8080.on.ascii.dev](https://www.zero.xyz/host/k2so-8080.on.ascii.dev/llms.txt)
