ahmedaldakheel/html2pic 🔢✓📝❓ → 🖼️

▶️ 19 runs 📅 Oct 2025 ⚙️ Cog 0.16.8
html-rendering html-to-image html-to-pdf webpage-screenshot

About

A simple, fast API that converts any HTML/CSS string into a high-quality PNG or JPEG image with customizable dimensions.

Example Output

Output

Example output

Performance Metrics

0.97s Prediction Time
0.97s Total Time
All Input Parameters
{
  "width": 1080,
  "height": 1350,
  "quality": 90,
  "full_page": false,
  "html_content": "\n<style>\n  body {\n    margin: 0;\n    width: 1080px;\n    height: 1350px;\n    background-color: #ffffff;\n    display: flex;\n    justify-content: center;\n    align-items: center;\n  }\n  h1 {\n    color: #00aeac;\n    font-family: Arial, sans-serif;\n    font-size: 120px;\n    font-weight: bold;\n    margin: 0;\n  }\n</style>\n  <h1>Welcome!</h1>\n",
  "output_format": "png",
  "device_scale_factor": 1
}
Input Parameters
width Type: integerDefault: 1920Range: 100 - 7680
Image width in pixels
height Type: integerDefault: 1080Range: 100 - 4320
Image height in pixels
quality Type: integerDefault: 90Range: 1 - 100
Image quality (for JPEG only, 1-100)
full_page Type: booleanDefault: false
Capture full page (ignores height parameter)
html_content Type: stringDefault: <html><body><h1 style='color: #00aeac; font-family: Arial;'>Hello World!</h1></body></html>
HTML content to convert to image
output_format Default: png
Output file format
device_scale_factor Type: numberDefault: 1Range: 1 - 3
Device scale factor for high-DPI displays
Output Schema

Output

Type: stringFormat: uri

Version Details
Version ID
129ade64a7a404ee299b244081629d3cecd4d164cab1559beeca49d4f553ed01
Version Created
October 8, 2025
Run on Replicate →