---
canonical: 'https://htmlcsstoimage.com/features/url-screenshots-for-ai'
title: 'URL Screenshot API for AI Agents | HTML/CSS to Image'
description: 'Give AI agents screenshots of JavaScript-rendered webpages. Capture full pages, selected elements, and controlled browser states through one API.'
---

# Let AI agents see rendered webpages

Capture a live webpage, a specific element, or a controlled browser state and pass the image to a vision model, task record, or review queue.

## Key capabilities

- JavaScript-rendered pages
- CSS selector capture
- Repeatable viewport settings

## Capture a full page, viewport, or element

Send a public URL and capture options to `POST https://hcti.io/v1/image`, then choose exactly what the resulting screenshot should include:

- Capture the visible viewport with explicit width, height, and device scale.
- Take a full-page website screenshot, including content below the fold.
- Crop the screenshot to one element with a CSS selector.
- Set mobile behavior, touch, color scheme, timezone, print media, and capture timing.

```json
{
  "url": "https://example.com",
  "viewport_width": 1200,
  "viewport_height": 630,
  "color_scheme": "dark"
}
```

The page must be reachable by HCTI. Pages that require a specific source network can use a saved proxy, but a site may still return a login, rate-limit, or browser-challenge page instead of its normal content.

The response includes an image ID and hosted image URL that you can embed, download, or save with your application data. HTML/CSS to Image runs headless Chromium for you, so you do not need to maintain screenshot browser infrastructure.

## 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.

- The `create_url_image` tool captures a public webpage as a full-page screenshot, an exact viewport, or a selected element. Use it to collect current page evidence, verify UI states, or create documentation screenshots.

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

## Support agent browser tasks with screenshots

### Page inspection

Capture the rendered page before an agent analyzes it or chooses its next action.

### UI verification

Take before-and-after screenshots to check interface changes and completed browser tasks.

### Research evidence

Attach current product, pricing, or company screenshots to research reports and summaries.

### Failure snapshots

Preserve the page state when an automated browser run encounters an error or unexpected result.

## 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/url-screenshots-for-ai)
- [Browse all features](https://htmlcsstoimage.com/features.md)
- [Start free](https://htmlcsstoimage.com/join)
- [View pricing](https://htmlcsstoimage.com/pricing.md)
- [Read the URL screenshot API docs](https://docs.htmlcsstoimage.com/getting-started/url-to-image/)
- [Read the MCP docs](https://docs.htmlcsstoimage.com/integrations/mcp/)
