# AGISHub HTML-to-PDF Renderer

> AGISHub HTML-to-PDF Renderer is a paid API for AI agents from api.agishub.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-15).

Renders a public URL or raw HTML string into a PDF document returned as a base64-encoded string, powered by a headless browser.

## Facts

- Endpoint: POST https://api.agishub.com/paid/pdf
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agishub-html-to-pdf-renderer-efaa384d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_inmzkVK2Pdz6cJFjMDMMI

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 agishub-html-to-pdf-renderer-efaa384d -d '<json body>'
```

Example prompt: Take this HTML invoice template I have and convert it into a PDF document — use A4 paper size in portrait orientation and give me back the base64-encoded PDF I can save to disk.

## When to prefer this

Use this endpoint when you need to programmatically convert HTML content — either a live public web page URL or a raw HTML string — into a PDF document without managing your own headless browser infrastructure. It is ideal for generating invoices, receipts, reports, and other structured documents from HTML templates at $0.05 per call. Prefer it over server-side PDF libraries when you need full CSS and JavaScript rendering fidelity via a real browser engine.

## Known failure modes

- Invalid or unreachable URL causes rendering failure — headless browser cannot fetch the page
- Malformed HTML string may produce a blank or partially rendered PDF
- Unsupported paper format value returns a validation error
- Both url and html omitted triggers a required-field validation error
- Very large or complex pages may time out during headless browser rendering
- Protected or paywalled URLs cannot be fetched and will return an error

## How this service works

Render a public URL or a raw HTML string into a PDF document, returned base64-encoded. Backed by a headless browser. Use for invoices, reports, receipts and any HTML-to-PDF need.

## Output

A JSON object containing the rendered document as a base64-encoded PDF string, suitable for decoding and saving as a .pdf file or embedding in emails and storage systems.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input",
  "output"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {
      "url": {
       "type": "string",
       "format": "uri",
       "description": "Public http/https URL to render to PDF. Provide this OR html."
      },
      "html": {
       "type": "string",
       "description": "Raw HTML string to render to PDF. Provide this OR url."
      },
      "format": {
       "enum": [
        "A4",
        "Letter",
        "Legal",
        "A3",
        "A5",
        "Tabloid"
       ],
       "type": "string",
       "description": "Paper size (default A4)."
      },
      "landscape": {
       "type": "boolean",
       "description": "Landscape orientation (default false = portrait)."
      }
     },
     "additionalProperties": false
    },
    "type": {
     "enum": [
      "http"
     ],
     "type": "string"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "enum": [
      "json"
     ],
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agishub-html-to-pdf-renderer-efaa384d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.agishub.com](https://www.zero.xyz/host/api.agishub.com/llms.txt)
