{
  "generated_at": "2026-04-24T15:01:35.625676+00:00",
  "slug": "pdf-generator-x402-production-up-railway-app-api-generate",
  "title": "PDF Generator \u00b7 Convert HTML/Markdown to PDF",
  "url": "https://pdf-generator-x402-production.up.railway.app/api/generate",
  "category": "tools",
  "summary": "Generate PDF documents from HTML or Markdown content with configurable layout options.",
  "seo": {
    "title": "HTML to PDF API | x402 Micropayment",
    "description": "Pay-per-call PDF generation from HTML or Markdown. Custom margins, orientation, and formatting. 0.008 USDC per request on Base."
  },
  "use_cases": [
    "Convert invoice templates to PDF",
    "Generate report PDFs from markdown documentation",
    "Create printable receipts from HTML receipts"
  ],
  "ideal_buyer": "SaaS platforms and automation workflows needing server-side PDF generation.",
  "example_prompt": "Generate a PDF from this HTML invoice with 10mm margins and landscape orientation",
  "example_request_body": {
    "format": "html",
    "content": "<h1>Invoice #1234</h1><p>Amount: $500</p>",
    "margins": {
      "top": "10mm",
      "left": "10mm",
      "right": "10mm",
      "bottom": "10mm"
    },
    "landscape": false
  },
  "risk_notes": [],
  "pricing_sanity": {
    "flag": "cheap_outlier",
    "ratio": 0.1,
    "median_category_atomic": 80000
  },
  "pricing_review_required": false,
  "pricing_decimal_suspect": false,
  "trust_tier": "indexed_external",
  "accepts": [
    {
      "scheme": "exact",
      "network": "base",
      "pay_to": "0x6e8b64638b24c6d625b045dd353120d850064e2e",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "max_amount_required_atomic": "8000",
      "max_timeout_seconds": 300,
      "verified": false,
      "hints": {
        "input": {
          "body": {
            "type": "object",
            "required": [
              "content"
            ],
            "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)"
              }
            }
          },
          "type": "http",
          "method": "POST",
          "bodyType": "json"
        },
        "output": {
          "type": "json",
          "schema": {
            "type": "string",
            "description": "Binary PDF document returned with Content-Type application/pdf"
          },
          "example": {}
        }
      }
    }
  ],
  "origin": {
    "slug": "pdf-generator-x402-production-up-railway-app",
    "host": "pdf-generator-x402-production.up.railway.app",
    "title": "PDF Generator x402 API",
    "description": "A production x402-payable API that generates PDF documents. Accepts payment on Base mainnet. Returns generated PDFs upon successful x402 payment verification.",
    "url": "https://pdf-generator-x402-production.up.railway.app",
    "favicon": "https://pdf-generator-x402-production.up.railway.app/favicon.ico"
  },
  "json_ld": {
    "@id": "https://x402all.com/resource/pdf-generator-x402-production-up-railway-app-api-generate",
    "url": "https://x402all.com/resource/pdf-generator-x402-production-up-railway-app-api-generate",
    "name": "PDF Generator \u00b7 Convert HTML/Markdown to PDF",
    "@type": "WebAPI",
    "offers": {
      "url": "https://x402all.com/resource/pdf-generator-x402-production-up-railway-app-api-generate",
      "@type": "Offer",
      "price": "0.008",
      "availability": "https://schema.org/InStock",
      "priceCurrency": "USDC",
      "priceSpecification": {
        "@type": "UnitPriceSpecification",
        "price": "0.008000",
        "unitText": "call",
        "priceCurrency": "USDC"
      },
      "eligibleCustomerType": "Agent",
      "additionalProperty": [
        {
          "@type": "PropertyValue",
          "name": "paymentNetwork",
          "value": "base"
        },
        {
          "@type": "PropertyValue",
          "name": "paymentAsset",
          "value": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
        }
      ]
    },
    "sameAs": "https://pdf-generator-x402-production.up.railway.app/api/generate",
    "@context": "https://schema.org",
    "provider": {
      "@id": "https://x402all.com/server/pdf-generator-x402-production-up-railway-app",
      "url": "https://pdf-generator-x402-production.up.railway.app",
      "name": "PDF Generator x402 API",
      "@type": "Organization"
    },
    "identifier": "pdf-generator-x402-production-up-railway-app-api-generate",
    "description": "Pay-per-call PDF generation from HTML or Markdown. Custom margins, orientation, and formatting. 0.008 USDC per request on Base.",
    "potentialAction": {
      "@type": "BuyAction",
      "target": "https://axon402.com/test-buy?resource=pdf-generator-x402-production-up-railway-app-api-generate",
      "description": "Test-buy this endpoint on AXON"
    },
    "applicationCategory": "tools"
  },
  "axon_deep_link": "https://axon402.com/test-buy?resource=pdf-generator-x402-production-up-railway-app-api-generate"
}
