RendShot

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:

terminal
npm install -g rendshot
terminal
npx rendshot --help

Authentication

Log in with your API key. Keys start with rs_live_. Credentials are saved to ~/.rendshot/config.json.

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

FlagDescription
--htmlInline HTML string
-f, --filePath to an HTML file
-t, --templateTemplate 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)
--cssAdditional CSS string
-w, --widthViewport width (1--4096)
-h, --heightViewport height (1--4096)
--formatpng or jpg
--qualityImage quality (1--100)
--device-scaleDevice pixel ratio (1, 2, or 3)
--timeoutRender timeout in ms
--saveDownload the image to a local file
--jsonOutput 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.

FlagDescription
-w, --widthViewport width (1--4096)
-h, --heightViewport height (1--4096)
--formatpng or jpg
--qualityImage quality (1--100)
--full-pageCapture the full scrollable page
--device-scaleDevice pixel ratio (1, 2, or 3)
--timeoutRender timeout in ms
--saveDownload the image to a local file
--jsonOutput 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.

FlagDescription
--platformFilter by platform (e.g. twitter, instagram)
--categoryFilter by category
-s, --searchSearch by name or description
-l, --limitMax results (1--50)
--cursorPagination cursor
--jsonOutput 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.

FlagDescription
--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)
--jsonOutput 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:

terminal
rendshot generate -f card.html --width 1200 --height 630 --save card.png

Full-page screenshot with JSON output:

terminal
rendshot screenshot https://example.com --full-page --json

Render from a template with variables:

terminal
rendshot generate --template tpl_abc123 --var title="Hello" --var bgColor="#6B8F5E"

Browse templates and inspect variables:

terminal
rendshot template list --platform twitter
rendshot template info tpl_abc123

Pipe JSON output to jq:

terminal
rendshot generate --html '<h1>Hello</h1>' --json | jq .url

Generate an image from an AI prompt:

terminal
rendshot generate \
  --prompt "Xiaohongshu cover for a new coffee product, warm cream background" \
  --platform xiaohongshu \
  --save cover.png

Generate and save the AI-generated template in one step:

terminal
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:

terminal
rendshot generate --prompt "Product card for a premium coffee" --json > result.json
rendshot template create --name "Coffee Card" --from-result result.json --platform xiaohongshu

Create a template from an HTML file:

terminal
rendshot template create --name "Launch Card" --html-file card.html --platform twitter_card

Next Steps

On this page