# x402-gateway: document_to_markdown

> x402-gateway: document_to_markdown 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-30).

Converts documents (PDFs, Word files, HTML, etc.) into clean Markdown text via a paid x402 gateway

## Facts

- Endpoint: POST https://x402.freeq.one/market/bazaar/tools/document_to_markdown?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-gateway-document-to-markdown-6cc1a343
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_uYbAMNiM7__Q-GpaYzyRe

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 x402-gateway-document-to-markdown-6cc1a343 -d '<json body>'
```

Example prompt: Can you convert this PDF report into clean Markdown so I can use it in my documentation site? Use the document_to_markdown tool on the x402 bazaar gateway.

## When to prefer this

Use this endpoint when you need to programmatically convert documents (PDF, DOCX, HTML) into Markdown in an agentic pipeline and are comfortable with per-call micropayments via the x402 protocol. Prefer this over manual conversion or heavy OCR pipelines for lightweight document-to-markdown needs.

## Known failure modes

- Unsupported document format returns an error
- Payment failure if USDC balance is insufficient (402 response)
- Malformed or corrupted document may yield incomplete markdown
- Large documents may time out or be truncated
- Missing or invalid 'tool' parameter returns a validation error

## How this service works

x402-gateway tool: document_to_markdown (market: bazaar)

## Output

A Markdown-formatted string representing the content of the input document, with headings, lists, and paragraphs preserved where possible.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "tool": {
   "type": "string",
   "description": "Tool name (see GET /tools for the catalog)"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-gateway-document-to-markdown-6cc1a343/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)
