ottersnap (Python SDK)
Official Python SDK for the Glint Render rendering API — screenshots, PDFs, OG images, page extraction, AI extraction and AI vision, from one client.
Install
pip install glint-render
Quick start
import os
from glint_render import GlintRender
client = GlintRender(os.environ["GLINT_API_KEY"])
# Screenshot -> PNG bytes
png = client.screenshot("https://github.com", full_page=True, scale=2)
open("shot.png", "wb").write(png)
# Page -> clean Markdown (LLM/RAG ready)
data = client.extract("https://example.com/blog/post", format="markdown")
print(data)
# AI extraction: natural language -> structured JSON
res = client.ai_extract("https://example.com/store", "List every product name and price as JSON")
print(res["data"])
# AI vision: render the page and let a multimodal model analyze the screenshot
v = client.ai_vision("https://example.com", "Does this page have a pricing section?")
print(v["analysis"], v["screenshot_url"])
# PDF, OG cards, QR, crawl, batch, record...
client.pdf("https://example.com/invoice", paper="A4")
og = client.og(title="Shipping v2", theme="nocturne")
qr = client.qr("https://ottersnap.com")
crawl = client.crawl("https://mysite.com", limit=10)
rec = client.record("https://example.com", duration=15, scroll=True)
usage = client.usage()
Free tier: 100 renders/month -> get a key
Methods
| Method | Endpoint | Returns |
|---|---|---|
screenshot(url, **opts) |
POST /v1/screenshot | bytes (PNG/JPEG) |
pdf(url, paper) |
POST /v1/pdf | bytes (PDF) |
og(title, ...) |
POST /v1/og | bytes (PNG) |
extract(url, format, **opts) |
POST /v1/extract | dict or str (Markdown) |
ai_extract(url, prompt, **opts) |
POST /v1/ai/extract | dict |
ai_vision(url, prompt, **opts) |
POST /v1/ai/vision | dict |
crawl(url, limit, format, **opts) |
POST /v1/crawl | dict or str |
batch(requests, **opts) |
POST /v1/batch | dict |
record(url, duration, **opts) |
POST /v1/record | dict (hosted webm URL) |
meta(url) |
POST /v1/meta | dict |
qr(text, size, **opts) |
POST /v1/qr | bytes (PNG) |
code_image(code, **opts) |
POST /v1/code-image | bytes (PNG) |
usage() |
GET /v1/me | dict |
All opts map 1:1 to the REST parameters in the docs.
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
glint_render-1.0.0.tar.gz
(4.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file glint_render-1.0.0.tar.gz.
File metadata
- Download URL: glint_render-1.0.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e8e2a50ad3d0f886f850dfacf290d2b912518581781512d1e27700d763509e5
|
|
| MD5 |
e6f492221be0408e6d19d723281f36f8
|
|
| BLAKE2b-256 |
74b86f169a403ec58e8e65f0d69241d310428a9befc54bef1a608ead238b9874
|
File details
Details for the file glint_render-1.0.0-py3-none-any.whl.
File metadata
- Download URL: glint_render-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15b1872769ccf1ee633581cd193776fd553c66540403aaae4a94a57f562d9856
|
|
| MD5 |
4e032c6cc79fcd74998646173c33bed9
|
|
| BLAKE2b-256 |
8057cddac9547ddc505f738aea999e4f2fdd45e6d4ff8cec8f0f2409579d5954
|