Loading...
Loading...
HTMLCSStoImage API via curl. Use this skill to generate images from HTML/CSS or capture screenshots of web pages.
npx skill4agent add vm0-ai/vm0-skills htmlcsstoimagecurlOfficial docs:https://docs.htmlcsstoimage.com/
export HCTI_USER_ID="your-user-id"
export HCTI_API_KEY="your-api-key"Important: When usingin a command that pipes to another command, wrap the command containing$VARin$VAR. Due to a Claude Code bug, environment variables are silently cleared when pipes are used directly.bash -c '...'bashbash -c 'curl -s "https://api.example.com" -H "Authorization: Bearer $API_KEY"'
HCTI_USER_IDHCTI_API_KEYhttps://hcti.io/v1/image/tmp/hcti_html.txt<div style="padding:20px;background:blue;color:white;font-size:24px;">Hello World</div>bash -c 'curl -s "https://hcti.io/v1/image" -X POST -u "${HCTI_USER_ID}:${HCTI_API_KEY}" --data-urlencode "html@/tmp/hcti_html.txt"'{
"url": "https://hcti.io/v1/image/abc123..."
}/tmp/hcti_html.txt<div class="card"><h1>Welcome</h1><p>This is a styled card</p></div>/tmp/hcti_css.txt.card { padding: 40px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 12px; color: white; font-family: sans-serif; text-align: center; } h1 { margin: 0 0 10px 0; } p { margin: 0; opacity: 0.9; }bash -c 'curl -s "https://hcti.io/v1/image" -X POST -u "${HCTI_USER_ID}:${HCTI_API_KEY}" --data-urlencode "html@/tmp/hcti_html.txt" --data-urlencode "css@/tmp/hcti_css.txt"'/tmp/hcti_html.txt<div class="title">Beautiful Typography</div>/tmp/hcti_css.txt.title { font-family: Playfair Display; font-size: 48px; padding: 40px; background: #1a1a2e; color: #eee; }bash -c 'curl -s "https://hcti.io/v1/image" -X POST -u "${HCTI_USER_ID}:${HCTI_API_KEY}" --data-urlencode "html@/tmp/hcti_html.txt" --data-urlencode "css@/tmp/hcti_css.txt" -d "google_fonts=Playfair Display"'google_fonts=Playfair Display|Roboto|Open Sans/tmp/hcti_url.txthttps://example.combash -c 'curl -s "https://hcti.io/v1/image" -X POST -u "${HCTI_USER_ID}:${HCTI_API_KEY}" --data-urlencode "url@/tmp/hcti_url.txt"'/tmp/hcti_url.txthttps://example.combash -c 'curl -s "https://hcti.io/v1/image" -X POST -u "${HCTI_USER_ID}:${HCTI_API_KEY}" --data-urlencode "url@/tmp/hcti_url.txt" -d "ms_delay=1500"'ms_delaybash -c 'curl -s "https://hcti.io/v1/image" -X POST -u "${HCTI_USER_ID}:${HCTI_API_KEY}" --data-urlencode "url@/tmp/hcti_url.txt" -d "selector=h1"'#id.classdiv > p/tmp/hcti_html.txt<div style="padding:20px;font-size:18px;">High Resolution Image</div>bash -c 'curl -s "https://hcti.io/v1/image" -X POST -u "${HCTI_USER_ID}:${HCTI_API_KEY}" --data-urlencode "html@/tmp/hcti_html.txt" -d "device_scale=2"'device_scalebash -c 'curl -s "https://hcti.io/v1/image" -X POST -u "${HCTI_USER_ID}:${HCTI_API_KEY}" --data-urlencode "url@/tmp/hcti_url.txt" -d "viewport_width=1200" -d "viewport_height=630"'bash -c 'curl -s "https://hcti.io/v1/image" -X POST -u "${HCTI_USER_ID}:${HCTI_API_KEY}" --data-urlencode "url@/tmp/hcti_url.txt" -d "full_screen=true"'bash -c 'curl -s "https://hcti.io/v1/image" -X POST -u "${HCTI_USER_ID}:${HCTI_API_KEY}" --data-urlencode "url@/tmp/hcti_url.txt" -d "block_consent_banners=true"'?dl=1/tmp/hcti_html.txt<div style="padding:20px;background:green;color:white;">Download Me</div>bash -c 'curl -s "https://hcti.io/v1/image" -X POST -u "${HCTI_USER_ID}:${HCTI_API_KEY}" --data-urlencode "html@/tmp/hcti_html.txt"' | jq -r '.url'curl -s "https://hcti.io/v1/image/<your-image-id>?dl=1" --output image.png/tmp/hcti_html.txt<div style="padding:40px;background:purple;color:white;font-size:32px;">Resizable</div>bash -c 'curl -s "https://hcti.io/v1/image" -X POST -u "${HCTI_USER_ID}:${HCTI_API_KEY}" --data-urlencode "html@/tmp/hcti_html.txt"' | jq -r '.url'Original: https://hcti.io/v1/image/<your-image-id>
Thumbnail: https://hcti.io/v1/image/<your-image-id>?width=200&height=200{
"url": "https://hcti.io/v1/image/be4c5118-fe19-462b-a49e-48cf72697a9d"
}{
"error": "Bad Request",
"statusCode": 400,
"message": "HTML is Required"
}--data-urlencodems_delaydevice_scale