{
  "openapi": "3.1.0",
  "info": {
    "title": "Printwren API",
    "version": "1.0.0",
    "summary": "Free HTML to PDF API, URL to PDF converter and MCP server: real Chrome printing with paper size, margins, backgrounds and page numbers. GET a PDF back or JSON with base64.",
    "description": "Paid API keys from $9/month (Starter: 750 PDFs a month); free tier 20 PDFs a day per IP with no key. Buy: https://printwren.cybermaxtools.com/buy/starter?s=lead · all plans: https://printwren.cybermaxtools.com/docs#pricing\n\nPricing: free tier 20 PDFs/day per IP, no key. Paid API keys: Starter $9/month = 750 PDFs/month; Growth $24/month = 3,000 PDFs/month; Pay as you go $10 = 1,000 PDFs (one-time pack); Starter yearly $90/year = 750 PDFs/month; Growth yearly $240/year = 3,000 PDFs/month. Get a key: https://printwren.cybermaxtools.com/docs#pricing\n\nPaste a URL or send your HTML and get a PDF printed by real Chrome: A4 or Letter, margins, backgrounds and page numbers. For invoices, reports, receipts and saving pages. Free, no key.\n\nFree tier: 4 PDFs per minute per IP address, one document per call. HTML up to 200 KB; public http(s) pages only. About 25 seconds per document at most. Shared free renderer: 15 free PDFs a day across all free users; paid keys keep priority. If it is busy you get a clear 503. Free tier: 20 PDFs a day per IP, no key; paid API keys from $9/month. Nothing is stored: the PDF is made on each call. No key needed. Remote MCP server: https://printwren.cybermaxtools.com/mcp",
    "contact": {
      "name": "CyberMax",
      "url": "https://cybermax-tools-cybermax.static.hf.space/"
    },
    "license": {
      "name": "Proprietary (free tier + paid API keys)",
      "identifier": "LicenseRef-CyberMax"
    },
    "x-x402": {
      "protocol": "x402",
      "versions": [
        1,
        2
      ],
      "scheme": "exact",
      "network": [
        "base",
        "eip155:8453"
      ],
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "currency": "USDC",
      "price": {
        "perCallUsd": 0.012
      },
      "payPerCallEndpoints": [
        "/x402/api/pdf",
        "/x402/pdf"
      ],
      "alsoOn": "the plain endpoints answer 402 with the same terms once the free daily quota is used up (no key sent)",
      "headers": {
        "request": [
          "X-PAYMENT (v1)",
          "PAYMENT-SIGNATURE (v2)"
        ],
        "response": [
          "X-PAYMENT-RESPONSE",
          "PAYMENT-RESPONSE"
        ]
      }
    },
    "x-pricing": {
      "api": "Printwren API",
      "currency": "USD",
      "free": {
        "price": 0,
        "callsPerDayPerIp": 20,
        "perMinutePerIp": 4,
        "key": "none needed"
      },
      "plans": [
        {
          "id": "starter",
          "name": "Starter",
          "price": 9,
          "billing": "per month",
          "calls": 750,
          "per": "calendar month (UTC)",
          "perMinute": 10,
          "buy": "https://printwren.cybermaxtools.com/buy/starter?s=openapi"
        },
        {
          "id": "pro",
          "name": "Growth",
          "price": 24,
          "billing": "per month",
          "calls": 3000,
          "per": "calendar month (UTC)",
          "perMinute": 20,
          "buy": "https://printwren.cybermaxtools.com/buy/pro?s=openapi"
        },
        {
          "id": "pack",
          "name": "Pay as you go",
          "price": 10,
          "billing": "one-time",
          "calls": 1000,
          "per": "until used",
          "perMinute": 10,
          "buy": "https://printwren.cybermaxtools.com/buy/pack?s=openapi"
        },
        {
          "id": "starter-yearly",
          "name": "Starter yearly",
          "price": 90,
          "billing": "per year",
          "calls": 750,
          "per": "calendar month (UTC)",
          "perMinute": 10,
          "buy": "https://printwren.cybermaxtools.com/buy/starter-yearly?s=openapi"
        },
        {
          "id": "pro-yearly",
          "name": "Growth yearly",
          "price": 240,
          "billing": "per year",
          "calls": 3000,
          "per": "calendar month (UTC)",
          "perMinute": 20,
          "buy": "https://printwren.cybermaxtools.com/buy/pro-yearly?s=openapi"
        }
      ],
      "unit": "PDFs",
      "howToUse": {
        "header": "x-api-key: YOUR_KEY",
        "alt": [
          "Authorization: Bearer YOUR_KEY",
          "?key=YOUR_KEY"
        ],
        "mcp": "send the key as Authorization: Bearer YOUR_KEY",
        "usage": "https://printwren.cybermaxtools.com/key"
      },
      "manageKey": "https://printwren.cybermaxtools.com/manage",
      "payments": "Stripe Checkout: card, Apple Pay, Google Pay, Link; sales tax/VAT handled by Stripe. Cancel any time at https://printwren.cybermaxtools.com/manage."
    }
  },
  "servers": [
    {
      "url": "https://printwren.cybermaxtools.com"
    },
    {
      "url": "https://printwren.cybermax-tools.workers.dev"
    }
  ],
  "paths": {
    "/api/pdf": {
      "get": {
        "tags": [
          "Printwren"
        ],
        "summary": "Print a URL or HTML to PDF (JSON result)",
        "description": "Renders the page in real Chrome and prints it. Returns title, page count, size, a direct download link (for URLs) and, with includePdfBase64=true, the PDF bytes as base64.",
        "operationId": "makePdfGet",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": false,
            "description": "Public web page (or POST \"html\" instead)",
            "schema": {
              "type": "string"
            },
            "example": "example.com"
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "Paper size: A4, Letter, Legal, A3, A5, Tabloid (default A4)",
            "schema": {
              "type": "string",
              "enum": [
                "A4",
                "Letter",
                "Legal",
                "A3",
                "A5",
                "Tabloid"
              ],
              "default": "A4"
            }
          },
          {
            "name": "landscape",
            "in": "query",
            "required": false,
            "description": "Wide pages",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "margin",
            "in": "query",
            "required": false,
            "description": "CSS length for all sides (default 10mm)",
            "schema": {
              "type": "string",
              "default": "10mm"
            }
          },
          {
            "name": "pageNumbers",
            "in": "query",
            "required": false,
            "description": "Footer with \"page / total\"",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "printBackground",
            "in": "query",
            "required": false,
            "description": "Include background colours and images",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "media",
            "in": "query",
            "required": false,
            "description": "\"print\" (default, like Ctrl+P) or \"screen\" (looks like the browser)",
            "schema": {
              "type": "string",
              "enum": [
                "print",
                "screen"
              ],
              "default": "print"
            }
          },
          {
            "name": "includePdfBase64",
            "in": "query",
            "required": false,
            "description": "Return the PDF bytes as base64 (up to 3 MB)",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Results (same field names as the bulk version's dataset records) plus the free-tier limits.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "results": [
                    {
                      "source": "https://developer.mozilla.org/en-US/docs/Web/CSS/@page",
                      "status": "ok",
                      "title": "@page CSS at-rule - CSS | MDN",
                      "pages": 9,
                      "bytes": 1517607,
                      "format": "A4",
                      "landscape": false,
                      "renderMs": 4568,
                      "downloadUrl": "https://printwren.cybermaxtools.com/pdf?url=https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FCSS%2F%40page&format=A4&pageNumbers=true",
                      "renderedAt": "2026-09-26T00:31:08.019Z"
                    }
                  ],
                  "count": 1
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Free tier used up (20/day per IP) or rate/plan limit reached; the body has an upgrade link.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "Took too long; ask for fewer items",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Printwren"
        ],
        "summary": "Print a URL or HTML to PDF (JSON result)",
        "description": "Renders the page in real Chrome and prints it. Returns title, page count, size, a direct download link (for URLs) and, with includePdfBase64=true, the PDF bytes as base64.",
        "operationId": "makePdfPost",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "html": {
                    "type": "string",
                    "maxLength": 200000
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "A4",
                      "Letter",
                      "Legal",
                      "A3",
                      "A5",
                      "Tabloid"
                    ]
                  },
                  "landscape": {
                    "type": "boolean"
                  },
                  "margin": {
                    "type": "string"
                  },
                  "pageNumbers": {
                    "type": "boolean"
                  },
                  "printBackground": {
                    "type": "boolean"
                  },
                  "includePdfBase64": {
                    "type": "boolean"
                  }
                }
              },
              "example": {
                "html": "<h1>Invoice #1042</h1><p>Total: $120.00</p>",
                "format": "Letter",
                "pageNumbers": true,
                "includePdfBase64": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Results (same field names as the bulk version's dataset records) plus the free-tier limits.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "results": [
                    {
                      "source": "https://developer.mozilla.org/en-US/docs/Web/CSS/@page",
                      "status": "ok",
                      "title": "@page CSS at-rule - CSS | MDN",
                      "pages": 9,
                      "bytes": 1517607,
                      "format": "A4",
                      "landscape": false,
                      "renderMs": 4568,
                      "downloadUrl": "https://printwren.cybermaxtools.com/pdf?url=https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FCSS%2F%40page&format=A4&pageNumbers=true",
                      "renderedAt": "2026-09-26T00:31:08.019Z"
                    }
                  ],
                  "count": 1
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Free tier used up (20/day per IP) or rate/plan limit reached; the body has an upgrade link.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "Took too long; ask for fewer items",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/x402/api/pdf": {
      "get": {
        "tags": [
          "Printwren"
        ],
        "summary": "Print a URL or HTML to PDF (JSON result) (pay per call in USDC via x402, no key)",
        "description": "Renders the page in real Chrome and prints it. Returns title, page count, size, a direct download link (for URLs) and, with includePdfBase64=true, the PDF bytes as base64.\n\nPay per call with x402: $0.012 per call in USDC on Base. No key, no account: an unpaid call returns 402 with the payment requirements; retry with the X-PAYMENT (x402 v1) or PAYMENT-SIGNATURE (v2) header.",
        "operationId": "makePdfGetPayPerCall",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": false,
            "description": "Public web page (or POST \"html\" instead)",
            "schema": {
              "type": "string"
            },
            "example": "example.com"
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "Paper size: A4, Letter, Legal, A3, A5, Tabloid (default A4)",
            "schema": {
              "type": "string",
              "enum": [
                "A4",
                "Letter",
                "Legal",
                "A3",
                "A5",
                "Tabloid"
              ],
              "default": "A4"
            }
          },
          {
            "name": "landscape",
            "in": "query",
            "required": false,
            "description": "Wide pages",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "margin",
            "in": "query",
            "required": false,
            "description": "CSS length for all sides (default 10mm)",
            "schema": {
              "type": "string",
              "default": "10mm"
            }
          },
          {
            "name": "pageNumbers",
            "in": "query",
            "required": false,
            "description": "Footer with \"page / total\"",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "printBackground",
            "in": "query",
            "required": false,
            "description": "Include background colours and images",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "media",
            "in": "query",
            "required": false,
            "description": "\"print\" (default, like Ctrl+P) or \"screen\" (looks like the browser)",
            "schema": {
              "type": "string",
              "enum": [
                "print",
                "screen"
              ],
              "default": "print"
            }
          },
          {
            "name": "includePdfBase64",
            "in": "query",
            "required": false,
            "description": "Return the PDF bytes as base64 (up to 3 MB)",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Results (same field names as the bulk version's dataset records) plus the free-tier limits.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "results": [
                    {
                      "source": "https://developer.mozilla.org/en-US/docs/Web/CSS/@page",
                      "status": "ok",
                      "title": "@page CSS at-rule - CSS | MDN",
                      "pages": 9,
                      "bytes": 1517607,
                      "format": "A4",
                      "landscape": false,
                      "renderMs": 4568,
                      "downloadUrl": "https://printwren.cybermaxtools.com/pdf?url=https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FCSS%2F%40page&format=A4&pageNumbers=true",
                      "renderedAt": "2026-09-26T00:31:08.019Z"
                    }
                  ],
                  "count": 1
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required: x402 payment requirements (body: x402Version 1 accepts[]; header PAYMENT-REQUIRED: x402 v2)."
          },
          "504": {
            "description": "Took too long; ask for fewer items",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.012"
          },
          "protocols": [
            {
              "x402": {
                "version": [
                  1,
                  2
                ],
                "network": [
                  "base",
                  "eip155:8453"
                ],
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "scheme": "exact"
              }
            }
          ]
        }
      },
      "post": {
        "tags": [
          "Printwren"
        ],
        "summary": "Print a URL or HTML to PDF (JSON result) (pay per call in USDC via x402, no key)",
        "description": "Renders the page in real Chrome and prints it. Returns title, page count, size, a direct download link (for URLs) and, with includePdfBase64=true, the PDF bytes as base64.\n\nPay per call with x402: $0.012 per call in USDC on Base. No key, no account: an unpaid call returns 402 with the payment requirements; retry with the X-PAYMENT (x402 v1) or PAYMENT-SIGNATURE (v2) header.",
        "operationId": "makePdfPostPayPerCall",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "html": {
                    "type": "string",
                    "maxLength": 200000
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "A4",
                      "Letter",
                      "Legal",
                      "A3",
                      "A5",
                      "Tabloid"
                    ]
                  },
                  "landscape": {
                    "type": "boolean"
                  },
                  "margin": {
                    "type": "string"
                  },
                  "pageNumbers": {
                    "type": "boolean"
                  },
                  "printBackground": {
                    "type": "boolean"
                  },
                  "includePdfBase64": {
                    "type": "boolean"
                  }
                }
              },
              "example": {
                "html": "<h1>Invoice #1042</h1><p>Total: $120.00</p>",
                "format": "Letter",
                "pageNumbers": true,
                "includePdfBase64": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Results (same field names as the bulk version's dataset records) plus the free-tier limits.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "results": [
                    {
                      "source": "https://developer.mozilla.org/en-US/docs/Web/CSS/@page",
                      "status": "ok",
                      "title": "@page CSS at-rule - CSS | MDN",
                      "pages": 9,
                      "bytes": 1517607,
                      "format": "A4",
                      "landscape": false,
                      "renderMs": 4568,
                      "downloadUrl": "https://printwren.cybermaxtools.com/pdf?url=https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FCSS%2F%40page&format=A4&pageNumbers=true",
                      "renderedAt": "2026-09-26T00:31:08.019Z"
                    }
                  ],
                  "count": 1
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required: x402 payment requirements (body: x402Version 1 accepts[]; header PAYMENT-REQUIRED: x402 v2)."
          },
          "504": {
            "description": "Took too long; ask for fewer items",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.012"
          },
          "protocols": [
            {
              "x402": {
                "version": [
                  1,
                  2
                ],
                "network": [
                  "base",
                  "eip155:8453"
                ],
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "scheme": "exact"
              }
            }
          ]
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "retryAfterSeconds": {
            "type": "integer"
          },
          "limits": {
            "type": "object"
          }
        },
        "required": [
          "error",
          "message"
        ]
      }
    },
    "securitySchemes": {
      "ApiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Optional. Paid plan key from https://printwren.cybermaxtools.com/docs#pricing; leave out for the free tier."
      },
      "BearerKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Same key as a Bearer token."
      }
    }
  },
  "x-mcp-server": "https://printwren.cybermaxtools.com/mcp",
  "externalDocs": {
    "description": "Get an API key (pricing)",
    "url": "https://printwren.cybermaxtools.com/docs#pricing"
  },
  "security": [
    {},
    {
      "ApiKeyHeader": []
    },
    {
      "BearerKey": []
    }
  ]
}