# HTML/Markdown/URL to PDF Converter

> HTML/Markdown/URL to PDF Converter is a paid API for AI agents from agent-vending-machine.avm-7301.workers.dev, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-14).

Renders HTML, Markdown, or a public URL to a PDF document (A4, backgrounds enabled) and returns the raw PDF bytes.

## Facts

- Endpoint: POST https://agent-vending-machine.avm-7301.workers.dev/pdf
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/html-markdown-url-to-pdf-converter-8db5f69c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_I2vtrvnCmGiJGy9UQVuYB

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 html-markdown-url-to-pdf-converter-8db5f69c -d '<json body>'
```

Example prompt: Convert this markdown report to a PDF for me: '# Q2 Sales Report\n\nRevenue grew 12% this quarter...' — render it as a clean A4 PDF with backgrounds on.

## When to prefer this

Use this endpoint when you need server-side PDF generation from HTML, Markdown, or a live URL without managing a headless browser yourself. Ideal for report generation, document export, invoice rendering, or archiving web pages as PDFs in an automated workflow. Prefer over client-side solutions when running in a headless or server environment.

## Known failure modes

- Invalid or inaccessible URL returns an error (URL must be public http/https)
- More than one of html/markdown/url provided simultaneously returns a validation error
- Malformed HTML may produce unexpected rendering output
- Very large HTML documents or slow-loading URLs may time out
- No input provided (none of html, markdown, url) returns a validation error

## How this service works

Render HTML, Markdown, or a public URL to a PDF (A4, backgrounds on). Returns the PDF bytes. Exactly one of `html`, `markdown`, `url`.

## Output

Raw PDF binary bytes representing an A4-formatted PDF document rendered from the provided HTML, Markdown, or public URL, with CSS backgrounds enabled.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "description": "Public http(s) URL to render"
  },
  "html": {
   "type": "string",
   "description": "HTML document or fragment to render"
  },
  "markdown": {
   "type": "string",
   "description": "Markdown to render (converted to styled HTML)"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/html-markdown-url-to-pdf-converter-8db5f69c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-vending-machine.avm-7301.workers.dev](https://www.zero.xyz/host/agent-vending-machine.avm-7301.workers.dev/llms.txt)
