# NoJunk Document Converter

> NoJunk Document Converter is a paid API for AI agents from nojunk-document.mick8511.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-30).

Converts PDF, Word, Excel, OpenDocument, CSV, HTML, XML, and image files (via URL or base64) into clean Markdown for agent reasoning, billed at $0.01 USDC per successful conversion.

## Facts

- Endpoint: POST https://nojunk-document.mick8511.workers.dev/convert?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/nojunk-document-converter-96e80cda
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JxRB440PbutQvpHkQhmt0

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 nojunk-document-converter-96e80cda -d '<json body>'
```

Example prompt: Can you read this PDF for me and give me the content as markdown? Here's the URL: https://example.com/annual-report-2024.pdf — keep it under 50000 characters.

## When to prefer this

Choose this endpoint when an agent needs to ingest the readable text content of a document (PDF, Word, Excel, OpenDocument, CSV, HTML, XML, or image) and reason over it as Markdown. It is ideal for pay-per-use pipelines where you only pay on success ($0.01 USDC), supports both URL-based and base64 file delivery, and handles a wide range of office and image formats in a single unified API call.

## Known failure modes

- URL is not publicly accessible or returns non-200 — conversion fails with an error
- File exceeds 20 MB limit — rejected before conversion
- Unsupported file format — returns an error indicating the MIME type is not handled
- base64 payload is malformed or missing filename extension for Office files — conversion may fail or produce garbled output
- Payment not settled — no charge and no result returned
- max_chars below 1000 or above 400000 — validation error

## How this service works

NoJunk Document convert: Convert a PDF, Office document, spreadsheet, HTML/XML page or image (by URL or base64) to Markdown with Cloudflare toMarkdown.

## Output

A JSON object containing the converted Markdown text, along with metadata: original filename, file size in bytes, estimated token count, MIME type, word count, total character count, a truncated flag indicating if the output was capped, an optional pages_hint, the source URL if provided, and the conversion timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "description": "Public http/https URL of the document (PDF, DOCX, XLSX, XLSM, XLSB, XLS, ODS, ODT, CSV, Apple Numbers, HTML, XML, Markdown, plain text, PNG, JPEG, WebP, SVG; max 20971520 bytes). Use this OR file_base64."
  },
  "filename": {
   "type": "string",
   "description": "Optional: original filename with extension (needed for Office/OpenDocument files sent as base64, e.g. report.docx)"
  },
  "max_chars": {
   "type": "integer",
   "description": "Optional: cap on returned markdown characters, 1000-400000 (default 400000)"
  },
  "file_base64": {
   "type": "string",
   "description": "The file as base64 (data: URL prefix allowed, max 20971520 decoded bytes). Use this OR url."
  },
  "content_type": {
   "type": "string",
   "description": "Optional: MIME type of the file when the filename has no extension"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "name": "dummy.pdf",
  "bytes": 13264,
  "tokens": 4,
  "markdown": "Dummy PDF file",
  "mime_type": "application/pdf",
  "truncated": false,
  "pages_hint": null,
  "source_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
  "word_count": 3,
  "total_chars": 14,
  "converted_at": "2026-10-15T12:00:00.000Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/nojunk-document-converter-96e80cda/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from nojunk-document.mick8511.workers.dev](https://www.zero.xyz/host/nojunk-document.mick8511.workers.dev/llms.txt)
