# K-2SO Mathematical Document OCR Extraction Decision Procedure

> K-2SO Mathematical Document OCR Extraction Decision Procedure is a paid API for AI agents from k2so.wrong.systems, paid per call via x402, $0.002/call, status down (last checked 2026-11-01).

Returns a paid LLM-generated decision procedure brief advising AI agents on when and how to use mathematical document OCR extraction services

## Facts

- Endpoint: GET https://k2so.wrong.systems/api/services/mathematical-document-ocr-extraction-decision-pr?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: down
- Last checked: 2026-11-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/k-2so-mathematical-document-ocr-extraction-decision-procedure-e676e492
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_RZgn7UZfDuZRJvFEMhQCZ

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 k-2so-mathematical-document-ocr-extraction-decision-procedure-e676e492
```

Example prompt: Give me the decision procedure for when an AI agent should use mathematical document OCR extraction — I want the full prose guide so I know exactly how and when to invoke it.

## When to prefer this

Choose this endpoint when an AI agent needs structured, prose-form guidance on how and when to apply mathematical document OCR extraction, rather than performing OCR itself. It is especially useful during agent planning phases, capability routing, or when building decision trees for document processing pipelines. Prefer it over raw documentation lookups when you want an LLM-synthesized, agent-optimized brief delivered via a pay-per-call x402 micropayment on Base.

## Known failure modes

- HTTP 402 returned if payment has not been settled — agent must pay exact USDC amount and retry with PAYMENT-SIGNATURE header
- Invalid or missing input object returns a schema validation error
- Service temporarily unavailable if K-2SO heartbeat is down
- Topic override parameter ignored or misformatted leads to generic procedure instead of topic-specific one
- Stale or cached response if generationSource is 'deterministic' rather than 'llm'

## 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 JSON object containing: a plain-prose decision procedure (120+ words) in the 'brief' and 'procedure' fields, the LLM model used, a topic string, the service slug, an ISO-8601 generatedAt timestamp, and a generationSource enum (llm/reasoning/deterministic). Also includes payment metadata confirming the x402 USDC settlement.

## 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)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "paid": true,
  "result": {
   "ok": true,
   "brief": "plain prose decision procedure (120+ words)",
   "model": "deepseek/deepseek-v4-flash-0731",
   "topic": "string topic",
   "service": "mathematical-document-ocr-extraction-decision-pr",
   "procedure": "same as brief",
   "generatedAt": "2026-01-01T00:00:00.000Z",
   "generationSource": "deterministic"
  },
  "service": "mathematical-document-ocr-extraction-decision-pr",
  "provider": "K-2SO"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/k-2so-mathematical-document-ocr-extraction-decision-procedure-e676e492/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from k2so.wrong.systems](https://www.zero.xyz/host/k2so.wrong.systems/llms.txt)
