Tiny, zero-dependency clients for the screenshot and PDF API. They are served from this domain, so you install them by URL: no registry account, nothing else gets pulled in. Each is one readable file you can vendor into your project if you prefer.
Get a free key (25 renders a month) API reference · OpenAPI spec
npm install https://shotmint.creasework.com/sdk/dist/shotmint-0.3.0.tgz
Uses the built-in fetch, ships TypeScript types, and works with import or require. Save as shot.mjs and run with SHOTMINT_KEY=sm_... node shot.mjs:
import Shotmint from 'shotmint';
import { writeFile } from 'node:fs/promises';
const sm = new Shotmint(); // reads SHOTMINT_KEY
const png = await sm.screenshot({ url: 'https://example.com', full_page: true });
await writeFile('shot.png', png);
console.log('credits left:', png.credits);
const pdf = await sm.pdf({ html: '<h1>Invoice #1</h1>', format: 'A4' });
await writeFile('invoice.pdf', pdf);
// Signed, cached <img src> URL: the key never appears in it
console.log(await sm.signedScreenshotUrl({ url: 'https://example.com', width: 1200 }));
pip install https://shotmint.creasework.com/sdk/dist/shotmint-0.3.0-py3-none-any.whl
Standard library only (urllib). Add the same URL to requirements.txt to pin it. Run with SHOTMINT_KEY=sm_... python shot.py:
from shotmint import Shotmint, ShotmintError
sm = Shotmint() # reads SHOTMINT_KEY
png = sm.screenshot(url="https://example.com", full_page=True)
open("shot.png", "wb").write(png)
print("credits left:", png.credits)
pdf = sm.pdf(html="<h1>Invoice #1</h1>", format="A4")
open("invoice.pdf", "wb").write(pdf)
try:
sm.screenshot(url="https://does-not-exist.invalid")
except ShotmintError as e:
print(e.status, e)
| Method | Does |
|---|---|
screenshot(params) | POST /v1/screenshot. Returns the image bytes with credits, creditsLow / credits_low, the content type and pageStatus / page_status (the target page's own HTTP status) attached.Every screenshot parameter passes straight through. |
pdf(params) | POST /v1/pdf. Returns the PDF bytes. Every PDF parameter passes straight through. |
content(params) | POST /v1/content. Returns the page as Markdown (or format text / html) with title, author, date, word count, status and credits. 1 credit.For LLM and RAG pipelines; max_chars caps the size. |
og(params) | GET /v1/og. A 1200×630 Open Graph card PNG from title, subtitle, site and theme. 1 credit; identical repeats within 24 hours are free. |
check(type, url) | GET /v1/check, free (0 credits, 500 a day per key). type is ssl, redirects, headers, links, tech, dns, llms or up. Returns the JSON report. |
account() | Credits left, the low-credit flag and your top-up link. |
signedScreenshotUrl / signed_screenshot_url | A signed /s/ image URL for <img> tags, cached 24h (or up to 30 days with cache_ttl), key never exposed. |
Shotmint.freeKey() / free_key() | Creates a free key with 25 renders a month (one key per IP per 24h). |
Checks don't use credits, so a free key covers an SSL-expiry alert or a nightly broken-link check. Save as monitor.py and run it from cron:
from shotmint import Shotmint
sm = Shotmint()
for site in ["example.com", "expired.badssl.com"]:
ssl = sm.check("ssl", site)
days = ssl.get("days_left") # missing when the TLS handshake itself fails
if not ssl["ok"] or days is None or days < 21:
print(site, "certificate needs attention:", ssl.get("error") or f"{days} days left")
up = sm.check("up", site)
if up["verdict"] != "up":
print(site, up["verdict"] + ":", up["reason"])
On 2026-10-26 this printed nothing for example.com, and for expired.badssl.com it printed -4215 days left (or the TLS error, when the handshake itself fails) and down: The HTTPS connection failed because of a certificate problem. The same calls in Node are await sm.check('ssl', site).
Renders run in parallel on our side, so fire requests concurrently instead of one by one. Measured on 2026-10-25 with SDK 0.2.0 from a server in Canada, six real sites (example.com, a Wikipedia article, github.com, Hacker News, python.org, MDN) at 1280×800:
| How | Wall time for 6 screenshots |
|---|---|
Node, one await after another | 4.8 s 0.4 s (example.com) to 2.1 s (github.com) each |
Node, Promise.all | 2.3 s |
Python, ThreadPoolExecutor(max_workers=6) | 2.9 s |
| One full-page Wikipedia article | 3.0 s 1280×7529 PNG |
Check pageStatus on each result: a site that blocks bots or a dead link still renders an image, and the status tells you it isn't the page you wanted (a missing GitHub repo gives 404 here). Save as batch.mjs:
import Shotmint from 'shotmint';
import { writeFile } from 'node:fs/promises';
const sm = new Shotmint();
const urls = ['https://example.com', 'https://github.com', 'https://www.python.org'];
// Requests run in parallel on our side: 6 sites took 2.3 s this way vs 4.8 s one by one.
const shots = await Promise.all(urls.map(url => sm.screenshot({ url })));
for (const [i, png] of shots.entries()) {
if (png.pageStatus >= 400) console.warn(urls[i], 'answered', png.pageStatus); // a bot wall or a 404, not your page
await writeFile(`site-${i}.png`, png);
}
console.log('credits left:', shots.at(-1).credits);
The Python version, using threads (the client is stdlib urllib, which is safe to share across threads):
from concurrent.futures import ThreadPoolExecutor
from shotmint import Shotmint
sm = Shotmint()
urls = ["https://example.com", "https://github.com", "https://www.python.org"]
with ThreadPoolExecutor(max_workers=6) as pool:
shots = list(pool.map(lambda url: sm.screenshot(url=url), urls))
for i, png in enumerate(shots):
if png.page_status and png.page_status >= 400:
print(urls[i], "answered", png.page_status) # a bot wall or a 404
open(f"site-{i}.png", "wb").write(png)
print("credits left:", shots[-1].credits)
Each URL costs one credit, the same as sequential calls. Requests over the server's queue limit get a 503 to retry, never a silent drop.
Every API error raises ShotmintError with status, the API's message and the parsed JSON in body. A request that fails is never billed:
| Status | Meaning and next step |
|---|---|
| 400 | A bad parameter or an unreachable URL. The message names it, e.g. format must be png, jpeg or webp (got "gif"). |
| 401 | Missing or unknown key. Pass it to the constructor or set SHOTMINT_KEY. |
| 402 | Out of credits. body.topup_url tops up the same key; free keys also refill on the 1st of the month. |
| 422 | The page itself failed to render (crashed or never loaded). Not billed. |
| 503 | Busy. Retry after a few seconds. |
| Timeout | Client side: Node throws TimeoutError after timeout ms (default 60000), Python after timeout seconds (default 60). If you hang up before the file is ready, the credit is refunded (measured with a 1-second timeout on a full-page render). |
import Shotmint, { ShotmintError } from 'shotmint';
const sm = new Shotmint();
try {
await sm.screenshot({ url: 'https://example.com', format: 'gif' });
} catch (e) {
if (!(e instanceof ShotmintError)) throw e; // network error or TimeoutError
if (e.status === 402) console.log('Top up:', e.body.topup_url);
else if (e.status === 503) console.log('Busy, retry in a few seconds');
else console.log(e.status, e.message); // 400: the message names the bad parameter
}
0.3.0 (2026-10-26): content(), og() and the free check(). 0.2.0 (2026-10-25): pageStatus / page_status on every result, and a shotmint-node User-Agent. Older versions stay downloadable at the same path for pinned installs. Install any of them in about half a second: the Node package is 28 KB on disk with no dependencies.
The same API is available as a remote MCP server at /mcp for Claude, Cursor, VS Code and n8n agents. See MCP server setup.
The API is plain HTTP, so any client works: see the copy-paste guides for PHP, Go, Ruby, C# and Java, or no-code recipes on the integrations page.
Pricing stays the same with or without the SDK: from €5 for 2,000 renders, prepaid, credits never expire.