CLI
Command-line tool for HTML-to-image rendering and URL screenshots.
Render HTML to images and capture URL screenshots directly from your terminal.
Installation
Install globally or run on-demand with npx:
npm install -g rendshotnpx rendshot --helpAuthentication
Log in with your API key. Keys start with rs_live_. Credentials are saved to ~/.rendshot/config.json.
rendshot auth login
# Paste your API key when prompted: rs_live_...Commands
rendshot generate
Render HTML to an image. Supply HTML inline, from a file, from a template, or from an AI prompt.
| Flag | Description |
|---|---|
--html | Inline HTML string |
-f, --file | Path to an HTML file |
-t, --template | Template ID (e.g. tpl_abc123) |
-p, --prompt <text> | AI prompt to generate a template from scratch (see AI Render) |
--platform <name> | Platform preset (xiaohongshu, instagram_post, twitter_card, …) |
--save-as-template <name> | After rendering with --prompt, save the AI-generated template with this name |
--locale <lang> | Language of AI-generated text (zh or en, default zh) |
--var <key=value> | Template variable (repeatable) |
--css | Additional CSS string |
-w, --width | Viewport width (1--4096) |
-h, --height | Viewport height (1--4096) |
--format | png or jpg |
--quality | Image quality (1--100) |
--device-scale | Device pixel ratio (1, 2, or 3) |
--timeout | Render timeout in ms |
--save | Download the image to a local file |
--json | Output the full JSON response |
Provide one of --html / -f / --template / --prompt. --prompt + --template is also allowed — the template is used as a visual style reference while AI re-lays out the content from your prompt. --prompt with --html or -f is not allowed.
Note: --fonts is not available in the CLI. Use the JavaScript SDK or Python SDK to load Google Fonts. Alternatively, embed fonts as base64 data URIs in your HTML — see Concepts — Fonts.
rendshot screenshot <url>
Capture a screenshot of a public URL. <url> is a required positional argument.
| Flag | Description |
|---|---|
-w, --width | Viewport width (1--4096) |
-h, --height | Viewport height (1--4096) |
--format | png or jpg |
--quality | Image quality (1--100) |
--full-page | Capture the full scrollable page |
--device-scale | Device pixel ratio (1, 2, or 3) |
--timeout | Render timeout in ms |
--save | Download the image to a local file |
--json | Output the full JSON response |
rendshot usage
Display your current plan, billing month, and request count vs. limit.
rendshot template list
Browse published templates. Supports filtering and pagination.
| Flag | Description |
|---|---|
--platform | Filter by platform (e.g. twitter, instagram) |
--category | Filter by category |
-s, --search | Search by name or description |
-l, --limit | Max results (1--50) |
--cursor | Pagination cursor |
--json | Output raw JSON |
rendshot template info <id>
Show template details including variable definitions and a usage example.
rendshot template create
Create a new draft template. Templates are always created as private drafts — publish them from the web dashboard if you want them to appear in the public gallery. This command does not consume render quota.
Provide exactly one of --html, --html-file, or --from-result.
| Flag | Description |
|---|---|
--name <name> | Template name (required) |
--html <content> | Inline HTML string |
-f, --html-file <path> | Read HTML from a file |
--from-result <path> | Read html + variables from a saved ai-render JSON response |
--description <text> | Template description |
--platform <name> | Platform preset (default custom) |
--category <name> | Category (default other) |
--tags <list> | Comma-separated tags |
-w, --width <n> | Width in pixels |
--height <n> | Height in pixels |
--visibility <mode> | public or private (default private) |
--json | Output raw JSON |
rendshot auth status / rendshot auth logout
Check whether you are logged in, or remove your saved credentials.
Examples
Render an HTML file and save the image locally:
rendshot generate -f card.html --width 1200 --height 630 --save card.pngFull-page screenshot with JSON output:
rendshot screenshot https://example.com --full-page --jsonRender from a template with variables:
rendshot generate --template tpl_abc123 --var title="Hello" --var bgColor="#6B8F5E"Browse templates and inspect variables:
rendshot template list --platform twitter
rendshot template info tpl_abc123Pipe JSON output to jq:
rendshot generate --html '<h1>Hello</h1>' --json | jq .urlGenerate an image from an AI prompt:
rendshot generate \
--prompt "Xiaohongshu cover for a new coffee product, warm cream background" \
--platform xiaohongshu \
--save cover.pngGenerate and save the AI-generated template in one step:
rendshot generate \
--prompt "Minimal weekly digest cover, dark green, serif headline" \
--platform xiaohongshu \
--save-as-template "Weekly Digest" \
--save cover.png
# → ✓ Saved template: tpl_xyz789 ("Weekly Digest")Save an AI result to disk, then create a template from it later:
rendshot generate --prompt "Product card for a premium coffee" --json > result.json
rendshot template create --name "Coffee Card" --from-result result.json --platform xiaohongshuCreate a template from an HTML file:
rendshot template create --name "Launch Card" --html-file card.html --platform twitter_cardNext Steps
- JavaScript SDK -- Full SDK reference with all options
- Python SDK -- Official Python client
- MCP Server -- Integrate with Claude and AI assistants
- API Reference -- Full endpoint documentation