URL screenshot API for developers

Automate webpage screenshots in your application

Render a public URL in headless Chrome. Set viewport, device scale, color scheme, timing, and CSS selector options, then use the returned image URL.

  • Device-scale rendering
  • Batch image endpoint
  • Explicit browser controls
Real URL screenshot API requests followed by their rendered webpage images.
Request
POST https://hcti.io/v1/image
{
"url": "https://google.com",
"viewport_height": 480,
"viewport_width": 640
}
https://google.com
Screenshot of Google in a small viewport

Live demo

Try the URL screenshot API

Enter a public URL, add optional CSS, and generate a real website screenshot with the same controls available through the API.

Loading playground…

Use the API

Take a website screenshot from your application

Send a URL and capture settings from your server. The response includes an image ID and a hosted URL you can embed or download.

This request created the screenshot of Google's Homepage shown here. Choose your language and replace the credentials with your own API ID and key.

Screenshot of Google in a small viewport
The response's url opens the screenshot. Its id identifies the image for later API requests.

Start with 50 free images each month, with no credit card required. See plans and pricing or the screenshot API docs.

import { HtmlCssToImageClient, CreateUrlImageRequest } from "@html-css-to-image/client";

const client = HtmlCssToImageClient.fromEnv();

const request = new CreateUrlImageRequest({
    url: "https://google.com",
    viewport_height: 480,
    viewport_width: 640,
});

const result = await client.createImage(request);
if (result.success) {
    console.log(result.url);
} else {
    console.error(result.error);
}

Use cases

Build reliable screenshot automation

Browse image examples

Responsive screenshots

Capture the same URL across viewport sizes, mobile settings, and device scales.

Batch website screenshots

Generate groups of captures for catalogs, feeds, QA jobs, and internal tools.

Visual regression records

Store exact page states alongside test results, deploys, and bug reports.

Documentation updates

Keep documentation, changelogs, and support references aligned with the current interface.

Capture examples

See the capture options in real screenshots

Full pages, color schemes, and media settings change what the browser renders. Open the code for an example to see its exact request.

https://apple.com
Screenshot of Apple (Full Screen)

Full-page screenshots

Apple (Full Screen): Captured 39 minutes ago

Capture content below the fold. Scroll the preview to see the rest of the page.

"full_screen": true
Full image Docs
https://github.com/htmlcsstoimage/dotnet-client
Screenshot of GitHub dotnet-client in dark mode

Dark mode

HCTI dotnet-client: Captured 39 minutes ago

Ask the website to use its dark color scheme before taking the screenshot.

"color_scheme": "dark"
Full image Docs
https://github.com/htmlcsstoimage/ts-client
Screenshot of GitHub ts-client in light mode

Light mode

HCTI ts-client: Captured 39 minutes ago

Request a light color scheme, including when the browser would otherwise prefer dark mode.

"color_scheme": "light"
Full image Docs
https://en.wikipedia.org/wiki/Headless_browser
Screenshot of Wikipedia entry for Headless browser in print mode

Print styles

Wikipedia print: Captured 39 minutes ago

Render the page with its print stylesheet instead of its screen styles.

"media_type": "print"
Full image Docs

Browser controls

Capture JavaScript-rendered pages in the right state

Set viewport, color scheme, timezone, mobile behavior, consent-banner blocking, and capture delay before the screenshot is taken.

  • Capture timing

    Allow time for late-loading content with ms_delay. On pages you control, use render_when_ready with a HCTIReadyNow element.

  • Device behavior

    Set mobile emulation, orientation, and touch input.

  • Page environment

    Choose light or dark mode, timezone, and screen or print media.

  • Clean output

    Inject custom CSS or attempt to hide cookie and consent banners.

POST https://hcti.io/v1/image request example.
Request
POST https://hcti.io/v1/image
{
"url": "https://example.com",
"viewport_width": 390,
"viewport_height": 844,
"viewport_mobile": true,
"viewport_touch": true,
"color_scheme": "dark",
"ms_delay": 500,
"block_consent_banners": true
}

Before you start

Frequently asked questions

For help with a specific webpage, email support@htmlcsstoimage.com.

Can I try it for free?

You get 50 free images every month, including website screenshots. No credit card needed. If you need more, choose a paid plan.
Plans and pricing

What if the page is still loading?

If a chart or data table needs extra time, add a delay with ms_delay. On a page you control, use render_when_ready to wait for an element with the ID HCTIReadyNow. Your page can add that element when its content is ready to capture.
Waiting for page content

Can I send screenshot requests in parallel?

Yes. You can send image requests in parallel without a per-second or per-minute rate limit. Your monthly image allowance still applies.
Request and usage limits

Where are the screenshots stored?

By default, we host screenshots and give you a URL to embed or download. Custom storage lets you save them directly to your own bucket and turn off our file storage. It's available on select paid plans.
Custom storage options

What screenshot sizes can I generate?

Choose the browser width and height, then capture that viewport, the whole page, or a single element. For a sharper image at the same layout size, increase device_scale. Use Jumbo Images for very long or high-resolution captures.
Large image sizes and limits

Can I screenshot a page behind a login?

For sites that accept authentication through headers, include those headers in your request. Being logged in on your own browser doesn't log in our browser. Sites with bot protection may still block a capture.
Authentication headers
Example conversation using the HCTI MCP integration.
Example conversation
MCP connected with OAuth
  1. You: Use the HCTI MCP to take a full-page screenshot of https://example.com in dark mode at 1440px wide.
  2. HTML/CSS to Image: Done. I captured the full page with a 1440px-wide viewport in dark mode: https://hcti.io/v1/image/…
  3. You: Now capture only #pricing at a 390 × 844 mobile viewport.
  4. HTML/CSS to Image: Done. I enabled mobile and touch emulation, rendered the page at 390 × 844, and cropped the image to #pricing.
  5. You: Compare the desktop and mobile versions.
  6. HTML/CSS to Image: I generated both viewport sizes and returned two hosted image URLs so you can review them side by side.

MCP integration

Use the HCTI API from your AI tools

Connect an MCP-compatible AI client to HCTI through OAuth.

Generate images and PDFs, capture webpages, and work with templates without putting an API key in the prompt.

Ready to capture?

Start taking website screenshots

Send one API request and receive a hosted image URL. Add viewport, full-page, selector, and browser controls when you need them.

Official API clients

Capture screenshots from your application

Use one of our official API clients to turn webpage URLs into screenshots, with viewport, timing, and capture options.

Choose your language for setup instructions and examples. Keep API credentials in your server-side code.

We take pride in creating native clients and integrations—not relying on code generation. All our clients are open source, and contributions are welcome.