PDF Render

Price: $0.490 USDC per call

Endpoint: https://api.melis.ai/pdf/render

Method: POST

Pays to: 0x61F2eF18ab0630912D24Fd0A30288619735AfFf5

What it does

Renders a public URL or raw HTML to a high-fidelity PDF using Playwright. Handles CSS, fonts, and page layout accurately. Returns a base64-encoded PDF. At $0.49 this is the most expensive service in the catalogue — use it when you need pixel-accurate PDF output of a full web page. For converting markdown or simple HTML you control, use DocConvert-PDF at $0.005 instead.

When to use it

  • Archiving a live invoice or receipt page to PDF
  • Generating a pixel-accurate PDF from a web report
  • Creating a PDF export of a data dashboard URL

Request schema

{
  "url": "https://example.com/report",
  "format": "A4"
}

Response schema

{
  "pdf": "JVBERi0xLjQK...",
  "encoding": "base64",
  "size_bytes": 284992,
  "pages": 3
}

Code example — TypeScript via MCP

Install the MCP server once; all 16 services become tool calls.

// Configure @melis-ai/x402-tools-mcp in your MCP client
// Then call the tool:

const result = await mcpClient.callTool("pdf_render", {
  "url": "https://example.com/report",
  "format": "A4"
});

console.log(result);
// ["pdf","encoding","size_bytes","pages"]...
→ MCP setup guide

Code example — Python via direct HTTP

import requests

# x402 payment header must be set by your wallet client
# See x402.org for client libraries

headers = {
    "Content-Type": "application/json",
    "x-payment": "<signed-x402-payment-header>",
}

resp = requests.post(
    "https://api.melis.ai/pdf/render",
    json={
      "url": "https://example.com/report",
      "format": "A4"
    },
    headers=headers,
)
print(resp.json())

Code example — curl with internal key bypass

For testing with an issued internal key (skips x402 payment flow):

curl -X POST https://api.melis.ai/pdf/render \
  -H "Content-Type: application/json" \
  -H "x-internal-key: YOUR_KEY" \
  -d '{"url":"https://example.com/report","format":"A4"}'

How is this different from alternatives?

PDF Render vs DocConvert-PDF

DocConvert-PDF costs $0.005 and converts markdown or HTML content you supply directly. PDF Render costs $0.49 and renders a full live URL with all CSS, fonts, and JS. If you control the content and want low cost, use DocConvert-PDF. If you need a pixel-accurate render of an external URL, use PDF Render.

FAQ

Does it work without an account?

Yes. x402 is account-less. Your agent's wallet signs the payment and retries automatically. No registration, no API key, no subscription.

What happens on failure?

Returns HTTP 400 for private IPs and blocked URL patterns.

What is the rate limit?

Per-IP daily limit. Contact sean@melis.ai for details.

Is this open-source?

The service code is closed-source for security reasons. The MCP wrapper that calls it is open-source and MIT-licensed: github.com/mizukaizen/x402-tools-mcp .

Who built this?

Part of the melis.ai agent infrastructure stack. Running on a dedicated Helsinki VPS since early 2026. Contact sean@melis.ai.