---
name: visual.hugen.tokyo
description: visual.hugen.tokyo provides two visual rendering services: capturing screenshots of web pages as JPEG or PNG images, and rendering web pages as PDF documents. Both services accept a publicly accessible URL and return base64-encoded output.
host: visual.hugen.tokyo
---

# visual.hugen.tokyo

This host serves agents that need visual or print-ready representations of live web content. It covers two distinct output formats — raster image screenshots and PDF documents — with configurable options such as viewport size, dark mode, ad blocking, full-page capture, and CSS selector targeting. It does not perform HTML parsing, text extraction, or structured data scraping.

## When to use this host

Use this host when an agent needs a visual rendering of a live web page — either as an image for layout inspection, element targeting, or thumbnailing (fetch-webpage-screenshot), or as a PDF for archiving or document generation (fetch-webpage-as-pdf). Do not use this host for extracting text, structured data, or HTML from pages; use a dedicated scraping or parsing API instead. Do not use it for rendering raw HTML strings, local files, or anything not reachable via a public URL. Not suitable for bulk or batch processing of many URLs, animated/video capture, or real-time streaming output.

## Capabilities

### Web Visual Rendering

Renders publicly accessible URLs into visual output formats — either a base64-encoded image (JPEG/PNG) or a base64-encoded PDF — suitable for archiving, layout verification, thumbnailing, or document generation.

- **`fetch-webpage-screenshot`** — Captures a screenshot of any URL and returns the image as a base64-encoded JPEG or PNG, with configurable viewport, full-page mode, dark mode, ad blocking, and CSS selector targeting.
- **`fetch-webpage-as-pdf`** — Renders any publicly accessible URL to a PDF and returns the result as a base64-encoded PDF string.

## Workflows

### Dual-Format Page Capture

*Use when an agent needs to both visually verify a page's layout and produce a print-ready PDF archive of the same URL in a single workflow.*

1. **`fetch-webpage-screenshot`** — Capture a screenshot of the target URL to visually confirm the rendered layout, viewport, and content before archiving.
2. **`fetch-webpage-as-pdf`** — Render the same URL as a PDF to produce a print-ready or archivable document version of the confirmed page.

## Skill reference

### `fetch-webpage-as-pdf`

**Visual PDF Generator** — Renders any publicly accessible URL to a PDF and returns the result as a base64-encoded PDF string.

*Use when:* Use when an agent needs to capture a webpage or image URL as a print-ready PDF file, such as archiving a page, generating a document snapshot, or converting web content for offline use.

*Not for:* Do not use for generating PDFs from raw HTML strings or local files; the endpoint requires a publicly accessible URL. Not suitable for real-time streaming or bulk batch PDF generation.

**Inputs:**

- `url` (string, required) — Publicly accessible URL to convert to PDF. Maximum 4096 characters.
- `block_ads` (boolean) — Whether to block ads and cookie banners before rendering. Defaults to true.

**Returns:** Returns a JSON object with the echoed URL, format='pdf', and a pdf_base64 string containing the full base64-encoded PDF of the rendered page.

**Example:** `GET https://visual.hugen.tokyo/visual/pdf?url=https://en.wikipedia.org/wiki/Ant&block_ads=true`

---

### `fetch-webpage-screenshot`

**Visual Screenshot API** — Captures a screenshot of any URL and returns the image as a base64-encoded JPEG or PNG, with configurable viewport, full-page mode, dark mode, ad blocking, and CSS selector targeting.

*Use when:* Use when an agent needs a visual rendering of a webpage or image URL, such as verifying page layout, capturing a specific DOM element, or producing a thumbnail of a site at a given viewport size.

*Not for:* Do not use for extracting structured text or data from a page; use an HTML scraping or parsing API instead. Not suitable for real-time video or animated capture.

**Inputs:**

- `url` (string, required) — URL to capture. Maximum 4096 characters.
- `width` (integer) — Viewport width in pixels. Range 320–3840. Defaults to 1280.
- `height` (integer) — Viewport height in pixels. Range 240–2160. Defaults to 720.
- `full_page` (boolean) — If true, captures the full scrollable page rather than just the viewport. Defaults to false.
- `max_height` (integer) — Maximum height in pixels for full-page capture. Range 720–32768. Defaults to 16384.
- `format` (string) — Output image format. Must be 'jpeg' or 'png'. Defaults to 'jpeg'.
- `quality` (integer) — JPEG compression quality. Range 1–100. Defaults to 80. Only applies when format is jpeg.
- `dark_mode` (boolean) — If true, renders the page using a dark color scheme. Defaults to false.
- `block_ads` (boolean) — If true, blocks ads and cookie banners before capturing. Defaults to true.
- `selector` (string) — CSS selector identifying a specific DOM element to capture instead of the full viewport. Null for no element targeting. Maximum 500 characters.

**Returns:** Returns a JSON object with the captured URL, viewport dimensions, format string, and the full screenshot as a base64-encoded JPEG string in image_base64.

**Example:** `GET https://visual.hugen.tokyo/visual/screenshot?url=https%3A%2F%2Fexample.com&width=1280&height=720&full_page=false&format=jpeg&quality=80&dark_mode=false&block_ads=true`

---
