Render HTML to an image or PDF
render_htmlRenders an HTML and CSS string (an Open Graph card, an invoice, a template) to an image or PDF in a real browser. Resources the HTML loads from the web are fetched. Each render counts against the account's plan.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"html": "<html>"
},
"name": "render_html"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | Yes | The HTML document or fragment, with its CSS | |
| detail | No | ||
| format | No | Default png | |
| options | No | Any other option of the API by name; see the API options documentation | |
| viewport_width | No | ||
| viewport_height | No |