# klymax402 PDF Generator

> klymax402 PDF Generator is a paid API for AI agents from klymax402.com, paid per call via x402, $0.015/call, status unknown (last checked 2026-09-15).

Converts HTML or Markdown content into a PDF document with configurable page size, margins, and orientation

## Facts

- Endpoint: GET https://klymax402.com/api/pdf-generator/api/generate
- Price: $0.015/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/klymax402-pdf-generator-76a30433
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_D2TMGvhECcv5n0c3R34K-

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 klymax402-pdf-generator-76a30433
```

Example prompt: Can you convert this HTML invoice I have into a PDF? Use A4 page size, portrait orientation, and set all margins to 15mm. Here's the HTML: <html><body><h1>Invoice #1234</h1><p>Amount due: $500</p></body></html>

## When to prefer this

Choose this endpoint when you need server-side PDF generation from HTML or Markdown content without managing a headless browser or PDF library yourself. It is well-suited for agent workflows that produce invoices, reports, or documents programmatically. Prefer it over client-side solutions when the rendering environment has no browser access, or over general-purpose document converters when you specifically need HTML/Markdown input with fine-grained margin and page-size control.

## Known failure modes

- Invalid or malformed HTML/Markdown content causing rendering errors
- Unsupported page size enum value returning a validation error
- Margins specified in unsupported units causing parse failures
- Content too large causing timeout or memory errors
- Missing required content field returning a 400 bad request
- Payment failure or insufficient USDC balance returning a 402 status

## How this service works

One MCP endpoint gives your AI agent access to 100 APIs -- crypto, DeFi, web, AI, finance and utilities. No API keys, USDC on Base from $0.003/call.

## Output

Returns a JSON response containing the generated PDF, likely as a base64-encoded binary or a URL to the rendered PDF file, given the response schema is JSON with an empty example.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "format": {
   "enum": [
    "html",
    "markdown"
   ],
   "type": "string",
   "description": "Content format: html or markdown (default: html)"
  },
  "content": {
   "type": "string",
   "description": "HTML or Markdown content to convert to PDF"
  },
  "margins": {
   "type": "object",
   "properties": {
    "top": {
     "type": "string",
     "description": "Top margin (e.g. 20mm)"
    },
    "left": {
     "type": "string",
     "description": "Left margin (e.g. 20mm)"
    },
    "right": {
     "type": "string",
     "description": "Right margin (e.g. 20mm)"
    },
    "bottom": {
     "type": "string",
     "description": "Bottom margin (e.g. 20mm)"
    }
   },
   "description": "Custom margins (default: 20mm all sides)"
  },
  "pageSize": {
   "enum": [
    "A4",
    "Letter",
    "Legal"
   ],
   "type": "string",
   "description": "Page size: A4, Letter, or Legal (default: A4)"
  },
  "landscape": {
   "type": "boolean",
   "description": "Landscape orientation (default: false)"
  }
 }
}
```

## Response schema (JSON Schema)

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/klymax402-pdf-generator-76a30433/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from klymax402.com](https://www.zero.xyz/host/klymax402.com/llms.txt)
