# x402-gateway: EPUB to Markdown Converter

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

Converts an EPUB e-book (via URL or base64-encoded bytes) into clean, structured Markdown with chapters as headings and metadata included

## Facts

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

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-epub-to-markdown-converter-832e703a -d '<json body>'
```

Example prompt: Can you convert this epub book at https://x402.freeq.one/samples/book.epub to Markdown so I can feed it into my RAG pipeline? Limit the output to 200000 characters.

## When to prefer this

Choose this endpoint when you need to convert an EPUB e-book into LLM-ready Markdown, especially for RAG ingestion or feeding entire books into LLM context windows. Prefer it over generic document converters when your source is specifically an EPUB file and you want structured chapter headings preserved. The sibling 'Document to Markdown (auto-detect)' endpoint is better if you're unsure of the file format.

## Known failure modes

- Invalid or unreachable EPUB URL returns an error
- Base64-encoded content too large (>28MB) is rejected
- Non-EPUB file format at the URL causes a parse failure
- Payment not included or insufficient USDC causes 402 rejection
- Malformed base64 string causes decoding error

## How this service works

EPUB to Markdown: Convert an EPUB e-book to clean Markdown. Provide a direct URL or base64-encoded file bytes. Chapters become headings; metadata (title, author) is included. Feed whole books into LLM context or RAG. Pay per call in USDC on Base via x402 — POST https://x402.freeq.one/tools/epub_to_markdown.

## Output

A JSON object with a 'result' field containing the full Markdown text of the EPUB, with chapters rendered as headings and book metadata (title, author) included at the top. Output may be truncated to max_length characters if specified.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "example": "https://x402.freeq.one/samples/book.epub",
   "description": "Direct URL to the EPUB file"
  },
  "file_b64": {
   "type": "string",
   "maxLength": 28000000,
   "description": "Base64-encoded EPUB bytes (alternative to url)"
  },
  "max_length": {
   "type": "integer",
   "example": 200000,
   "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/x402-gateway-epub-to-markdown-converter-832e703a/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)
