# PDF to Markdown Converter (x402-gateway)

> PDF to Markdown Converter (x402-gateway) is a paid API for AI agents from x402.freeq.one, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-11).

Converts a PDF document (via URL or base64 bytes) to clean, LLM-ready Markdown, auto-extracting headings, paragraphs, lists, and tables.

## Facts

- Endpoint: POST https://x402.freeq.one/tools/pdf_to_markdown?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pdf-to-markdown-converter-x402-gateway-d061849d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__RgG5D53RuKjmcXBYmTDM

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 pdf-to-markdown-converter-x402-gateway-d061849d -d '<json body>'
```

Example prompt: Convert this PDF to clean markdown so I can feed it into my RAG pipeline — here's the URL: https://x402.freeq.one/samples/report.pdf — and cap the output at 50000 characters.

## When to prefer this

Choose this endpoint when you need to convert a PDF (by URL or raw bytes) into clean, structured Markdown suitable for LLM ingestion, RAG pipelines, or document analysis — especially when you need auto-extracted headings, lists, and tables rather than raw text dumps. Prefer it over generic web scrapers when the source is definitely a PDF file.

## Known failure modes

- Invalid or unreachable PDF URL returns an error response
- Base64 payload exceeding 28MB limit is rejected
- Corrupted or password-protected PDFs may fail to parse
- max_length too small may truncate essential content
- Payment failure or insufficient USDC balance blocks the call

## How this service works

PDF to Markdown: Convert a PDF document to clean, LLM-ready Markdown. Provide a direct URL to the PDF or base64-encoded file bytes. Auto-extracts headings, paragraphs, lists and tables. Ideal for feeding reports, papers and contracts into RAG pipelines. Pay per call in USDC on Base via x402 — POST https://x402.freeq.one/tools/pdf_to_markdown.

## Output

Returns a JSON object with a 'result' field containing the extracted Markdown text of the PDF, including headings, paragraphs, bullet lists, and tables, optionally truncated to the specified max_length.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "example": "https://x402.freeq.one/samples/report.pdf",
   "description": "Direct URL to the PDF document"
  },
  "file_b64": {
   "type": "string",
   "maxLength": 28000000,
   "description": "Base64-encoded PDF bytes (alternative to url)"
  },
  "max_length": {
   "type": "integer",
   "example": 100000,
   "description": "Truncate output to N characters"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {}
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pdf-to-markdown-converter-x402-gateway-d061849d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.freeq.one](https://www.zero.xyz/host/x402.freeq.one/llms.txt)
