canonical: https://jentic.com/apis/hsingh.app/hsingh

# Hsingh App snaplab API

The snaplab API renders web pages and raw HTML in a headless Chromium and returns the result as PNG, JPEG, WebP, AVIF, or PDF. A render can capture the viewport or the full page, clip to one element with selector, switch on dark mode, hide selectors, dismiss cookie banners, block ads, and wait for a selector before shooting. A separate image endpoint turns HTML or a template with data into a fixed-size image for Open Graph cards, stored captures can notify a webhook when they finish, and repeat renders with identical options are served from a shared cache that does not count against quota.

## For AI agents

Screenshot a URL or HTML, render it to PDF, or turn an HTML template into a fixed-size Open Graph image, with full-page, element clipping, and dark mode options.

## Scope

Does not crawl sites, extract structured data, or host images on a CDN beyond stored captures. Use for rendering URLs and HTML to images and PDFs only.

## Capabilities

- Screenshot a URL or raw HTML as PNG, JPEG, WebP, or AVIF at a chosen viewport, deviceScaleFactor, or full page
- Render a page to PDF with options such as pdf.format, pdf.landscape, and header and footer templates
- Clip a capture to one element with selector and hide others with hideSelectors
- Generate a fixed-size Open Graph image from an HTML template and a data object
- Store a capture and get a webhook callback when it finishes, then list or fetch stored captures
- Build signed GET render URLs with keyId and sig so an image tag never carries the raw key
- Create and revoke API keys and read the account's plan and usage

## Use cases

### Agent visual checks of web pages

An AI agent reviewing a deploy needs to see the page, not just its HTML. Through Jentic it finds the snaplab render operation by intent, requests a full-page PNG of the URL with dismissBanners and blockAds on, and passes the image to a vision model, with the sk_ key held by your own instance.

Example prompt: Call POST `/api/render` with url set to the staging homepage, fullPage true, format png, and dismissBanners true, then attach the image to the deploy review

### HTML to PDF documents

Apps that generate invoices or reports in HTML need print-ready PDFs. The render endpoint takes html or a url with format set to pdf and PDF options for paper format, landscape, background printing, margins, and header and footer templates, and returns the file bytes.

Example prompt: Call POST `/api/render` with html set to the invoice markup and format set to pdf, then save the returned file

### Open Graph image generation

Every blog post or product page needs a social card. The image endpoint renders HTML, or a template with a data object, into an image of a fixed width and height, with Google Fonts support, so a publishing pipeline can create a card per post from one template.

Example prompt: Call POST `/api/render/image` with a template containing a title placeholder, data set to the post title, width 1200 and height 630, and save the PNG

### Stored captures with webhooks

Batch jobs that capture many pages should not hold a connection open for each. POST `/api/captures` renders and stores a capture and calls a webhookUrl signed with webhookSecret when it is done, and the captures list filters by status and q so the job can collect results later.

Example prompt: Call POST `/api/captures` with webhookUrl set to your callback endpoint, then GET `/api/captures/{id}` once the webhook arrives

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/api/render` | Render a URL or HTML to an image or PDF |
| GET | `/api/render` | Render by query string or signed URL |
| POST | `/api/render/image` | HTML to a fixed-size image |
| POST | `/api/captures` | Render and store a capture |
| GET | `/api/captures` | List stored captures |
| GET | `/api/me` | Account plan and usage |

## Key resources

- **Renders** — Render a URL or HTML to an image or PDF, render HTML templates to fixed-size images, by JSON body or query string
- **Captures** — Render and store a capture with an optional webhook, list, fetch, and delete stored captures
- **Free tools** — Key-less screenshot, PDF, and Open Graph image tools and a demo render
- **Account** — API keys, account plan and usage, default capture webhook, and billing

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 57 / 100
- **Maturity:** Foundational
- **Dimensions:**
  - Foundational Compliance: 72 / 100
  - Developer Experience & Jentic Compatibility: 67 / 100
  - AI-Readiness & Agent Experience: 47 / 100
  - Agent Usability: 94 / 100
  - Security: 30 / 100
  - AI Discoverability: 77 / 100
- **View full report:** https://jentic.com/apis/hsingh.app/hsingh/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring snaplab by hand means sending the sk_ bearer key, or building signed URLs with keyId and an HMAC_SHA256 sig for GET renders, and handling quota and capacity responses. Through Jentic you install once, import snaplab from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** snaplab takes the target url or html in the request body or query string, so rules bound which operations your agent may call, not which site it renders. You choose the operations it may call, so account ones like key creation, key revocation, or capture deletion are not included unless you add them.
- **Credential handling:** Your snaplab key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'screenshot a website' or 'generate an og image', and Jentic returns the matching snaplab operation with its input schema so the agent sets format, fullPage, and selector correctly without reading the reference docs.

## Related APIs

- **Urlbox** — Website screenshot and PDF rendering API
- **ApiFlash** — Chrome-based website screenshot API
- **Browserless** — Hosted headless browsers for automation and scraping

## FAQ

### What authentication does the snaplab API use?

Per its OpenAPI spec, the snaplab API uses HTTP bearer authentication with an sk_ key as the default. The GET render and GET image operations also accept signed-URL auth, where keyId and sig query parameters carry the key id and an HMAC_SHA256 signature instead of the secret. The health check, the demo preview, the free tools, and the Stripe webhook receiver are declared without a security requirement.

### Can I screenshot just one element of a page with the snaplab API?

Yes. Pass a CSS selector in the selector option on POST `/api/render` and the capture is clipped to that element; if nothing matches, the API returns 422 selector_not_found. waitForSelector delays the shot until an element appears, and hideSelectors removes elements such as chat widgets before capture.

### What are the rate limits for the snaplab API?

The spec lists per-plan limits: free allows 100 renders a month at 30 a minute, starter 2,000 at 120 a minute, pro 10,000 at 300 a minute, and business 40,000 at 600 a minute. The key-less tools allow 20 renders a day per IP. Cache hits and failed renders do not count against quota.

### Is there a snaplab MCP server?

The spec describes a stateless MCP server at /mcp with screenshot, pdf, html_to_image, and usage tools. You do not need it to give your agent snaplab: Jentic connects the REST API directly from the API Directory, so your agent gets the full render, capture, and key surface on demand without loading another server's tool definitions into its context.

### How do I render a page to PDF through Jentic?

Search Jentic for 'convert a web page to pdf', load POST `/api/render`, and send url or html with format set to pdf and any PDF options you need. Your instance attaches the bearer key at call time. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### Can I limit what my agent is allowed to do with the snaplab API?

Yes. Write a rule that allows only POST `/api/render` and POST `/api/render/image`, and the agent can take screenshots and make images but cannot create or revoke keys, delete captures, or start a billing checkout, and every call it makes is logged.
