Link Search Menu Expand Document

TypeScript: HTML/CSS to Image

Generate a png, jpg or webp images with TypeScript. Renders exactly like Google Chrome.

Live demo Get an API Key


Generating images with TypeScript

  1. The API takes your HTML/CSS and runs it inside a real instance of Google Chrome to convert your html into an image.
  2. Use TypeScript to send the API your HTML/CSS.
  3. You’ll get back json with the URL to your generated image.

For more details on how this works, see Creating an image.

Example API response:

{
  "url": "https://hcti.io/v1/image/be4c5118-fe19-462b-a49e-48cf72697a9d"
}