{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/html2img-com/json-schema/html2img-com-template-request-schema.json",
  "title": "TemplateRequest",
  "description": "The template's own fields, plus the optional `format`. Field names, types and defaults vary per template and are documented on each template page at https://html2img.com/templates/. Unrecognised fields are rejected with 422.",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/html2img-com-api-openapi.json#/components/schemas/TemplateRequest",
  "type": "object",
  "additionalProperties": true,
  "properties": {
    "format": {
      "type": "string",
      "enum": [
        "png",
        "pdf"
      ],
      "default": "png",
      "description": "Output container. `pdf` produces a real vector PDF with selectable text and embedded fonts, laid out on A4 portrait pages that paginate automatically. A PDF costs the same single credit as a PNG. With `pdf`, the parameters `dpi`, `fullpage` and `selector` have no effect."
    },
    "webhook_url": {
      "type": "string",
      "format": "uri",
      "description": "Switches the request to async mode. The API responds immediately with `status: \"processing\"` and POSTs the finished render to this URL. Recommended whenever a render might exceed the 30 second synchronous budget: large full-page captures, DPI 3, or JavaScript-heavy pages. Delivery is attempted once, with no retry."
    }
  }
}