R

Relaystation PDF From HTML · PDF From Html

by Relaystation PDF From HTML

POSTBase

$0.01

per call · USD Coin on Base

$0.003/call. Render HTML to PDF — sandboxed headless Chromium, print-quality output. 1¢ x402 min; remainder auto-credits — relaystation.ai/penny

Endpoint

POST https://api.relaystation.ai/v1/pdf/from-html

4

Calls / 30d

1

Unique payers / 30d

Sep 7

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://api.relaystation.ai/v1/pdf/from-html", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "html": "string",
    "options": {
      "displayHeaderFooter": true,
      "footerTemplate": "string",
      "format": "A4",
      "headerTemplate": "string",
      "landscape": true,
      "margin": {
        "bottom": "string",
        "left": "string",
        "right": "string",
        "top": "string"
      },
      "printBackground": true,
      "scale": 0.1
    }
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://api.relaystation.ai/v1/pdf/from-html" \
  -H "Content-Type: application/json" \
  -d '{"html":"string","options":{"displayHeaderFooter":true,"footerTemplate":"string","format":"A4","headerTemplate":"string","landscape":true,"margin":{"bottom":"string","left":"string","right":"string","top":"string"},"printBackground":true,"scale":0.1}}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "ok": true
}

Payment details

Pay to0x5f7254f252ef9b9f92b6b4f2cf91205ed7a96c7a
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase
Schemesexact

Is this your API?

Pin it to the top of Media & Generation and the homepage with a featured placement.

Get featured →

More from Relaystation PDF From HTML & similar services