# agentsvc.io HTML to PDF Converter

> agentsvc.io HTML to PDF Converter is a paid API for AI agents from agentsvc.io, paid per call via x402, $0.0045/call, status unknown (last checked 2026-10-11).

Converts HTML content to a PDF document, returning a base64-encoded PDF with page count and file size metadata

## Facts

- Endpoint: POST https://agentsvc.io/api/v1/proxy/html-to-pdf?utm_source=zero.xyz
- Price: $0.0045/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentsvc-io-html-to-pdf-converter-a26f4f94
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8uiAIfVEGXI0qs3MOljsR

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 agentsvc-io-html-to-pdf-converter-a26f4f94 -d '<json body>'
```

Example prompt: Convert this HTML string into a PDF for me: '<html><body><h1>Invoice #1042</h1><p>Total: $500</p></body></html>' — return it as a base64-encoded PDF.

## When to prefer this

Choose this endpoint when you need a quick, no-account, pay-per-call HTML-to-PDF conversion without setting up dedicated PDF infrastructure. Ideal for AI agents that occasionally need to render HTML reports, invoices, or documents into portable PDF format using USDC micropayments on Base.

## Known failure modes

- Malformed or invalid HTML may produce a blank or incorrectly rendered PDF
- Very large HTML documents may time out or produce oversized output
- Missing required 'input' fields (type, method, bodyType, body) will cause a schema validation error
- Payment failure via x402/USDC on Base will prevent execution
- Unsupported bodyType value (outside json/form-data/text) will be rejected

## How this service works

86 APIs for AI agents: web scraping and crawling to Markdown, AI summaries, data extraction and cited answers, screenshots and PDF, PDF, OCR and document conversion, news, paper and developer search and more, paid per call with USDC on Base, Solana, Polygon or Arbitrum via x402. No account, no API key, free sample on every service.

## Output

A JSON object containing: a base64-encoded string of the generated PDF (pdf_base64), the number of pages (page_count), the file size in bytes (file_size_bytes), and an ISO 8601 timestamp of when it was generated (generated_at). Decode the base64 string to get the raw PDF binary.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [],
     "properties": {}
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "success",
      "data"
     ],
     "properties": {
      "data": {
       "type": "object",
       "required": [
        "pdf_base64",
        "page_count",
        "file_size_bytes",
        "generated_at"
       ],
       "properties": {
        "page_count": {
         "type": "integer",
         "description": "Number of pages in the generated PDF"
        },
        "pdf_base64": {
         "type": "string",
         "description": "Base64-encoded PDF bytes (decode to get raw PDF file)"
        },
        "generated_at": {
         "type": "string",
         "format": "date-time",
         "description": "ISO 8601 timestamp of generation"
        },
        "file_size_bytes": {
         "type": "integer",
         "description": "Size of the PDF in bytes"
        }
       }
      },
      "success": {
       "type": "boolean"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "page_count": 2,
   "pdf_base64": "JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC9...",
   "generated_at": "2026-04-07T12:00:00.000Z",
   "file_size_bytes": 14867
  },
  "success": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentsvc-io-html-to-pdf-converter-a26f4f94/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentsvc.io](https://www.zero.xyz/host/agentsvc.io/llms.txt)
