---
canonical: 'https://htmlcsstoimage.com/features/html-to-video'
title: 'HTML to Video API: Record HTML & CSS as MP4 or GIF | HCTI'
description: 'Convert HTML, CSS animations, and JavaScript into MP4, WebM, or GIF. Control when recording starts, run actions, and choose the output size and duration.'
---

# Turn HTML and CSS into videos

Send HTML and CSS with a list of actions. The API loads the page in headless Chrome, records it, and returns a hosted MP4, WebM, or GIF URL.

## Key capabilities

- HTML, CSS & JavaScript
- MP4, WebM & GIF
- Set duration, frame rate, and size

## MCP Integration

Connect an MCP-compatible client to `https://mcp.hcti.io` with OAuth. The tools use the connected organization's HTML/CSS to Image account, permissions, and plan limits.

- Use `create_htmlcss_recording` to record HTML, CSS, and JavaScript as MP4, WebM, or GIF. Set the recording duration, actions, and output options in the request.
- Creation returns a recording ID and URLs before capture completes. Use `get_recording_status` to check readiness and retrieve the media URL; use `store_recording` to start a deferred recording.

[Read the full MCP docs](https://docs.htmlcsstoimage.com/integrations/mcp/).

## What you can record

### Product announcements

Animate a headline and feature list for a launch post, then export a GIF for the changelog.

### Animated charts and counters

Draw a chart or counter from your data with JavaScript and record it as it animates.

### UI demos

Record a transition or interaction once and embed the clip in docs, release notes, or email.

### Personalized recaps

Turn a customer's activity, milestones, or results into a short, branded video using your HTML and CSS.

## Related features

- [Scrolling Screenshots](https://htmlcsstoimage.com/features/scrolling-screenshots.md): Record a webpage scrolling as MP4, WebM, or GIF.
- [HTML to Image](https://htmlcsstoimage.com/features/html-to-image.md): HTML & CSS into an image with one API call.
- [Webhooks](https://htmlcsstoimage.com/features/webhooks.md): Get notified when images are stored and resources change.

## Get started

REST API requests require an HTML/CSS to Image account and should be authenticated from trusted application code. Check the API docs and pricing for current setup instructions, limits, and feature availability.

- [View the full feature page](https://htmlcsstoimage.com/features/html-to-video)
- [Browse all features](https://htmlcsstoimage.com/features.md)
- [View pricing](https://htmlcsstoimage.com/pricing.md)
- [Read the API docs](https://docs.htmlcsstoimage.com/getting-started/recordings/)
- [Read the MCP docs](https://docs.htmlcsstoimage.com/integrations/mcp/)
