{
  "info": {
    "name": "Sejda HTML to PDF API",
    "description": "Sejda's only documented hosted REST API: convert a URL or raw HTML to a PDF document. Authenticated with a Token API key. Sejda does not offer hosted API access to its other PDF tools (merge, compress, etc.).",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.sejda.com/v2",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "api_YOURAPIKEYHERE",
      "type": "string"
    }
  ],
  "auth": {
    "type": "apikey",
    "apikey": [
      { "key": "key", "value": "Authorization", "type": "string" },
      { "key": "value", "value": "Token: {{apiKey}}", "type": "string" },
      { "key": "in", "value": "header", "type": "string" }
    ]
  },
  "item": [
    {
      "name": "HTML to PDF (from URL)",
      "request": {
        "method": "POST",
        "header": [
          { "key": "Authorization", "value": "Token: {{apiKey}}" },
          { "key": "Content-Type", "value": "application/json" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"url\": \"https://example.com\",\n  \"pageSize\": \"a4\",\n  \"pageOrientation\": \"auto\"\n}"
        },
        "url": {
          "raw": "{{baseUrl}}/html-pdf",
          "host": ["{{baseUrl}}"],
          "path": ["html-pdf"]
        },
        "description": "Render a web page URL to a PDF document. Returns the PDF as a binary stream."
      }
    },
    {
      "name": "HTML to PDF (from HTML)",
      "request": {
        "method": "POST",
        "header": [
          { "key": "Authorization", "value": "Token: {{apiKey}}" },
          { "key": "Content-Type", "value": "application/json" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"htmlCode\": \"<html><body><h1>Hello</h1></body></html>\",\n  \"pageSize\": \"a4\"\n}"
        },
        "url": {
          "raw": "{{baseUrl}}/html-pdf",
          "host": ["{{baseUrl}}"],
          "path": ["html-pdf"]
        },
        "description": "Render raw HTML to a PDF document. Returns the PDF as a binary stream."
      }
    }
  ]
}
