snaprender

TotalClaw 作者 totalclaw

让您的代理关注网络 - 将任何 URL 截图为图像文件。支持设备模拟(iPhone、iPad、Pixel、MacBook)、深色模式、全页滚动、广告拦截。将 exec 工具与curl 结合使用(切勿使用浏览器工具)。 $SNAPRENDER_API_KEY 已预先设置。请参阅下面的说明。

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~user0856-snaprender
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~user0856-snaprender/file -o user0856-snaprender.md
## 概述(中文)

让您的代理关注网络 - 将任何 URL 截图为图像文件。支持设备模拟(iPhone、iPad、Pixel、MacBook)、深色模式、全页滚动、广告拦截。将 exec 工具与curl 结合使用(切勿使用浏览器工具)。 $SNAPRENDER_API_KEY 已预先设置。请参阅下面的说明。

## 原文

# SnapRender — Give Your Agent Eyes

Your agent can read the web but can't *see* it. One command and it captures pixel-perfect screenshots — any site, any device, in seconds.

"Screenshot stripe.com on iPhone", "Compare desktop vs mobile", "Full-page dark mode capture" — just ask.

Free tier: 500 screenshots/month, no credit card. [Get a key →](https://snap-render.com/auth/signup)

---

**IMPORTANT: Use the `exec` tool with `curl`. NEVER use the `browser` tool for screenshots.**

## How to Capture

Run this command via the `exec` tool. Replace `ENCODED_URL` with the URL-encoded target (e.g. `https%3A%2F%2Fstripe.com`):

```bash
curl -s "https://app.snap-render.com/v1/screenshot?url=ENCODED_URL&response_type=json&format=jpeg&quality=60&block_ads=true&block_cookie_banners=true" \
  -H "X-API-Key: $SNAPRENDER_API_KEY" \
  | tee /tmp/snap_response.json \
  | jq -r '.image' | sed 's|data:image/[^;]*;base64,||' | base64 -d > /tmp/screenshot.jpg \
  && jq '{url, format, size, cache, responseTime, remainingCredits}' /tmp/snap_response.json
```

This saves the screenshot to `/tmp/screenshot.jpg` and prints metadata.

## Rules

1. **Use `exec` tool only** — NEVER the `browser` tool
2. **`$SNAPRENDER_API_KEY` is already set** — use it literally in the command, do NOT replace it
3. **URL-encode the target** — `https://stripe.com` → `https%3A%2F%2Fstripe.com`
4. **Always use `format=jpeg&quality=60`** — keeps response small enough for the agent context
5. **Always pipe to save the image to a file** — the base64 response is too large to display inline
6. **Report metadata to the user** — file size, response time, cache status, remaining credits

## Parameters

Add as query parameters to the URL:

| Parameter | Values | Default |
|-----------|--------|---------|
| url | URL-encoded target | required |
| response_type | json | json (always use this) |
| format | jpeg, png, webp, pdf | jpeg |
| quality | 1-100 | 60 |
| device | iphone_14, iphone_15_pro, pixel_7, ipad_pro, macbook_pro | desktop |
| dark_mode | true, false | false |
| full_page | true, false | false |
| block_ads | true, false | true |
| block_cookie_banners | true, false | true |
| width | 320-3840 | 1280 |
| height | 200-10000 | 800 |
| delay | 0-10000 | 0 (ms wait after page load) |
| cache | true, false | true (set false to force fresh capture) |
| cache_ttl | 0-2592000 | 86400 (seconds, clamped to plan max) |
| hide_selectors | CSS selectors | none (comma-separated, hides elements before capture) |
| click_selector | CSS selector | none (clicks element before capture) |
| user_agent | string | default Chrome UA |

## Examples

**Desktop screenshot of stripe.com:**
```bash
curl -s "https://app.snap-render.com/v1/screenshot?url=https%3A%2F%2Fstripe.com&response_type=json&format=jpeg&quality=60&block_ads=true&block_cookie_banners=true" -H "X-API-Key: $SNAPRENDER_API_KEY" | tee /tmp/snap_response.json | jq -r '.image' | sed 's|data:image/[^;]*;base64,||' | base64 -d > /tmp/screenshot.jpg && jq '{url, format, size, cache, responseTime, remainingCredits}' /tmp/snap_response.json
```

**Mobile screenshot:** add `&device=iphone_15_pro` to the URL

**Full scrollable page:** add `&full_page=true` to the URL

**Dark mode:** add `&dark_mode=true` to the URL

**Compare desktop vs mobile:** make two calls, save to `/tmp/screenshot_desktop.jpg` and `/tmp/screenshot_mobile.jpg`

## After Capturing

1. Tell the user the screenshot was saved to `/tmp/screenshot.jpg` (or the filename you used)
2. Report metadata: file size, response time, cache status, remaining credits
3. For comparisons, save each screenshot to a different filename

## Errors

- **401**: Invalid API key — check SNAPRENDER_API_KEY
- **429**: Rate limit or quota exceeded — wait or upgrade plan
- **Timeout**: Target site is slow — add `&delay=3000` to wait longer
- **Empty response**: URL unreachable or blocked

## Get an API Key

Free at https://snap-render.com/auth/signup — 500 screenshots/month, no credit card.