80trust / 100

Doc To Markdown

by Resolve402 in Documents & files

x402 APIPassing, checked 12 min ago

Convert a document (PDF, DOCX, HTML, TXT) or an image into clean Markdown for an LLM, with tables extracted as rows and OCR (French, English) for scanned PDFs and images. Give a public URL (?url=) or POST the file (multipart or raw binary, max 10 MB). Returns markdown, tables, pages, chars and source type. Charged only if text is found. Nothing stored.

GET https://resolve402.dev/api/doc-to-markdown

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
180 ms typical, 677 ms slowest 5%
Last check
12 min ago
Next check
in 16 min

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://resolve402.dev/api/doc-to-markdown?url=https%3A%2F%2Fwww.w3.org%2FWAI%2FER%2Ftests%2Fxhtml%2Ftestfiles%2Fresources%2Fpdf%2Fdummy.pdf"
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fresolve402.dev%2Fapi%2Fdoc-to-markdown
const res = await pay("https://resolve402.dev/api/doc-to-markdown?url=https%3A%2F%2Fwww.w3.org%2FWAI%2FER%2Ftests%2Fxhtml%2Ftestfiles%2Fresources%2Fpdf%2Fdummy.pdf");
console.log(await res.json());

Example input

{
  "url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
}

Example output

{
  "chars": 4210,
  "markdown": "# Quarterly report\n\nRevenue grew 12%…",
  "pages": 3,
  "source_type": "pdf",
  "tables": [
    {
      "page": 2,
      "rows": [
        [
          "Region",
          "Revenue"
        ],
        [
          "EU",
          "1.2M"
        ]
      ]
    }
  ],
  "truncated": false
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
12 min agoPassed402185 ms$0.005
4 h agoPassed402157 ms$0.005
7 h agoPassed402677 ms$0.005
11 h agoPassed40269 ms$0.005
14 h agoPassed402167 ms$0.005
19 h agoPassed402180 ms$0.005
21 h agoPassed402256 ms$0.005
26 h agoPassed402105 ms$0.005
29 h agoPassed402208 ms$0.005
33 h agoPassed402169 ms$0.005
38 h agoPassed402966 ms$0.005