AI OCR: scanned PDF or image to Markdown API

AI OCR of a scanned PDF (up to 10 pages, 5 MB) or a PNG, JPEG or WebP image (up to 7.5 MB) at a public URL: printed text, tables, headings, lists, checkboxes and legible handwriting transcribed to Markdown page by page, with page count, file type, size and image dimensions. For scans, photos, screenshots, receipts and forms without a text layer. AI-generated by Anthropic Claude under a fixed Kit Rx prompt; transcription can misread characters. URL fetch is SSRF-guarded.

$0.02 per call  USDC over x402 v2 on Base, Polygon, Arbitrum, Avalanche or Sei. No signup, no API key. Requests that fail or match nothing are not charged.

Endpoint

GET https://api.kit-rx.com/v1/doc/ocr

Parameters

NameTypeRequiredDescription
urlstringyeshttp or https URL of a PDF (at most 10 pages and 5 MB) or a PNG, JPEG or WebP image (at most 7.5 MB and 8000 x 8000 px). Default ports only; credentials, IP addresses, localhost and private or single-label names are rejected. e.g. https://upload.wikimedia.org/wikipedia/commons/c/c6/Executive_Order_9066-_Authorizing_the_Secretary_of_War_to_Prescribe_Military_Areas_-_DPLA_-_fdb1c83b521c0554baddadf611bade67.pdf

Example request

https://api.kit-rx.com/v1/doc/ocr?url=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Fc%2Fc6%2FExecutive_Order_9066-_Authorizing_the_Secretary_of_War_to_Prescribe_Military_Areas_-_DPLA_-_fdb1c83b521c0554baddadf611bade67.pdf

Without payment the server answers 402 Payment Required with the price (20000 atomic USDC) in the PAYMENT-REQUIRED header. Any x402 v2 client pays and retries automatically. A request with no parameters runs this example.

curl -i "https://api.kit-rx.com/v1/doc/ocr?url=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Fc%2Fc6%2FExecutive_Order_9066-_Authorizing_the_Secretary_of_War_to_Prescribe_Military_Areas_-_DPLA_-_fdb1c83b521c0554baddadf611bade67.pdf"

Pay from an agent

AgentCash: fetch the URL. OpenDexter MCP: x402_fetch. Kit Rx MCP server: https://api.kit-rx.com/mcp. Code:

import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.BUYER_KEY) });
const pay = wrapFetchWithPayment(fetch, client);
const res = await pay("https://api.kit-rx.com/v1/doc/ocr?url=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Fc%2Fc6%2FExecutive_Order_9066-_Authorizing_the_Secretary_of_War_to_Prescribe_Military_Areas_-_DPLA_-_fdb1c83b521c0554baddadf611bade67.pdf");
console.log(await res.json());

Example response

{
  "query": {
    "url": "https://upload.wikimedia.org/wikipedia/commons/c/c6/Executive_Order_9066-_Authorizing_the_Secretary_of_War_to_Prescribe_Military_Areas_-_DPLA_-_fdb1c83b521c0554baddadf611bade67.pdf"
  },
  "result": {
    "final_url": "https://upload.wikimedia.org/wikipedia/commons/c/c6/Executive_Order_9066-_Authorizing_the_Secretary_of_War_to_Prescribe_Military_Areas_-_DPLA_-_fdb1c83b521c0554baddadf611bade67.pdf",
    "redirect_count": 0,
    "name": "Executive_Order_9066-_Authorizing_the_Secretary_of_War_to_Prescribe_Military_Areas_-_DPLA_-_fdb1c83b521c0554baddadf611ba",
    "mime_type": "application/pdf",
    "content_type": "application/pdf",
    "format": "pdf",
    "bytes": 2395685,
    "width": null,
    "height": null,
    "page_count": 3,
    "pages_returned": 3,
    "complete": true,
    "missing_pages": [],
    "pages": [
      {
        "page": 1,
        "markdown": "# EXECUTIVE ORDER\n\n-------\n\n## AUTHORIZING THE SECRETARY OF WAR TO PRESCRIBE MILITARY AREAS\n\nWHEREAS the successful prosecution of the war requires every possible protection against espionage and against sabotage to national-defense material, national-defense premises, and national-defense utilities as defined in Section 4, Act of April 20, 1918, 40 Stat. 533, as amended by the Act of November 30, 1940, 54 Stat. 1220, and the Act of August 21, 1941, 55 Stat. 655 (U. S. C., Title 50, Sec. 104):\n\nNOW, THEREFORE, by virtue of the authority vested in me as President of the United States, and Commander in Chief of the Army and Navy, I hereby authorize and direct the Secretary of War, and the Military Commanders whom he may from time to time designate, whenever he or any designated Commander deems such action necessary or desirable, to prescribe military areas in such places and of such extent as he or the appropriate Military Commander may determine, from which any or all persons may be excluded, and with respect to which, the right of any person to enter, remain in, or leave shall be subject to whatever restrictions the Secretary of War or the appropriate Military",
        "chars": 1178,
        "blank": false
      },
      {
        "page": 2,
        "markdown": "-2-\n\nCommander may impose in his discretion. The Secretary of War is hereby authorized to provide for residents of any such area who are excluded therefrom, such transportation, food, shelter, and other accommodations as may be necessary, in the judgment of the Secretary of War or the said Military Commander, and until other arrangements are made, to accomplish the purpose of this order. The designation of military areas in any region or locality shall supersede designations of prohibited and restricted areas by the Attorney General under the Proclamations of December 7 and 8, 1941, and shall supersede the responsibility and authority of the Attorney General under the said Proclamations in respect of such prohibited and restricted areas.\n\nI hereby further authorize and direct the Secretary of War and the said Military Commanders to take such other steps as he or the appropriate Military Commander may deem advisable to enforce compliance with the restrictions applicable to each Military area hereinabove authorized to be designated, including the use of Federal troops and other Federal Agencies, with authority to accept assistance of state and local agencies.",
        "chars": 1175,
        "blank": false
      },
      {
        "page": 3,
        "markdown": "-3-\n\nI hereby further authorize and direct all Executive Departments, independent establishments and other Federal Agencies, to assist the Secretary of War or the said Military Commanders in carrying out this Executive Order, including the furnishing of medical aid, hospitalization, food, clothing, transportation, use of land, shelter, and other supplies, equipment, utilities, facilities, and services.\n\nThis order shall not be construed as modifying or limiting in any way the authority heretofore granted under Executive Order No. 8972, dated December 12, 1941, nor shall it be construed as limiting or modifying the duty and responsibility of the Federal Bureau of Investigation, with respect to the investigation of alleged acts of sabotage or the duty and responsibility of the Attorney General and the Department of Justice under the Proclamations of December 7 and 8, 1941, prescribing regulations for the conduct and control of alien enemies, except as such duty and responsibility is superseded by the designation of military areas hereunder.\n\n[signature]\n\nTHE WHITE HOUSE,\n\nFebruary 16, 1942.\n\n[stamp]\n\nTHE NATIONAL ARCHIVES FILED AND MADE AVAILABLE FOR PUBLIC INSPECTION FEB 21 12 51 PM '42 IN THE DIVISION OF THE FEDERAL REGISTER\n\n9066",
        "chars": 1250,
        "blank": false
      }
    ],
    "chars": 3603,
    "word_count": 567,
    "model_family": "Claude",
    "ai_generated": true
  },
  "sources": [
    {
      "name": "Cloudflare DNS over HTTPS (JSON API)",
      "url": "https://developers.cloudflare.com/1.1.1.1/encryption/dns-over-https/make-api-requests/dns-json/"
    },
    {
      "name": "Anthropic Claude (AI-generated text)",
      "url": "https://www.anthropic.com/claude"
    },
    {
      "name": "Live HTTP(S) fetch of the URL",
      "url": "https://upload.wikimedia.org/wikipedia/commons/c/c6/Executive_Order_9066-_Authorizing_the_Secretary_of_War_to_Prescribe_Military_Areas_-_DPLA_-_fdb1c83b521c0554baddadf611bade67.pdf"
    }
  ],
  "notes": [
    "AI transcription (OCR) generated by Anthropic Claude under a fixed Kit Rx prompt; it can misread characters, numbers or handwriting, so important values should be checked against the original document.",
    "Fetched live by the Kit Rx fetcher (User-Agent KitRx/1.0); content belongs to its publisher."
  ],
  "attribution": [
    "DNS resolved via Cloudflare 1.1.1.1 DNS-over-HTTPS."
  ],
  "generated_at": "2026-11-15T05:52:47.724Z"
}

Kit Rx: Pay-per-call data and safety tools for AI agents, paid in USDC over x402. No signup, no API key. Machine-readable: OpenAPI, llms.txt, /.well-known/x402, agent skills.