{"openapi":"3.1.0","info":{"title":"RenderHub API","version":"1.1.0","description":"Stateless Chromium HTML/URL/Markdown/Invoice-to-PDF, Cookie-Banner-Free Screenshot, and Dynamic OG Image API with never-expiring credits.","contact":{"email":"support@softwarehub.vn","url":"https://render.softwarehub.vn"}},"servers":[{"url":"https://render.softwarehub.vn"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key starting with rh_live_ (100 free credits on signup)."}}},"paths":{"/v1/pdf":{"post":{"summary":"Convert HTML or a public URL to PDF","description":"Renders print-ready PDF using headless Chromium with SSRF protection. Supports binary PDF or JSON base64 output.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"html":{"type":"string"},"url":{"type":"string","format":"uri"},"format":{"type":"string","enum":["A4","Letter","Legal","Tabloid"]},"landscape":{"type":"boolean"},"waitForSelector":{"type":"string"},"responseFormat":{"type":"string","enum":["binary","json"]}}}}}},"responses":{"200":{"description":"PDF binary or base64 JSON envelope"}}}},"/v1/markdown-pdf":{"post":{"summary":"Convert Markdown to styled PDF","description":"Converts Markdown (GFM tables, fenced code, lists, UTF-8) into a themed PDF with optional running page numbers.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["markdown"],"properties":{"markdown":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"author":{"type":"string"},"theme":{"type":"string","enum":["executive","github","minimal"]},"format":{"type":"string","enum":["A4","Letter","Legal","Tabloid"]},"pageNumbers":{"type":"boolean"},"responseFormat":{"type":"string","enum":["binary","json"]}}}}}},"responses":{"200":{"description":"PDF binary or base64 JSON envelope"}}}},"/v1/invoice":{"post":{"summary":"Generate a structured multi-currency invoice PDF from JSON","description":"Designed for n8n, Make, and SaaS billing pipelines. Computes subtotal, discount, tax, and total accurately.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["invoiceNumber","from","to","items"],"properties":{"invoiceNumber":{"type":"string"},"currency":{"type":"string","example":"USD"},"status":{"type":"string","enum":["PAID","UNPAID","OVERDUE","DRAFT"]},"from":{"type":"object"},"to":{"type":"object"},"items":{"type":"array"},"taxRatePercent":{"type":"number"},"discountAmount":{"type":"number"},"responseFormat":{"type":"string","enum":["binary","json"]}}}}}},"responses":{"200":{"description":"Invoice PDF binary or JSON envelope with totals & base64"}}}},"/v1/screenshot":{"post":{"summary":"Capture a clean webpage or CSS-selector screenshot","description":"Blocks cookie banners and chat widgets automatically. Supports element cropping via selector, hideSelectors, waitForSelector, and base64 JSON mode.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"html":{"type":"string"},"selector":{"type":"string"},"waitForSelector":{"type":"string"},"hideSelectors":{"type":"array","items":{"type":"string"}},"width":{"type":"integer"},"height":{"type":"integer"},"fullPage":{"type":"boolean"},"darkMode":{"type":"boolean"},"blockBanners":{"type":"boolean"},"responseFormat":{"type":"string","enum":["binary","json"]}}}}}},"responses":{"200":{"description":"PNG/JPEG binary or base64 JSON envelope"}}}},"/v1/og":{"get":{"summary":"Generate a 1200x630 Open Graph social card PNG","parameters":[{"name":"title","in":"query","required":true,"schema":{"type":"string"}},{"name":"subtitle","in":"query","schema":{"type":"string"}},{"name":"theme","in":"query","schema":{"type":"string","enum":["dark","light","gradient","terminal"]}},{"name":"api_key","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"PNG image (1200x630)"}}}}}}