--- title: Hep.gg Snippets JavaScript SDK (LLM) description: Create and read pastes from Node/TypeScript via the hepgg package. --- # Hep.gg Snippets SDK (hepgg package) Typed Node/TypeScript client for https://paste.hep.gg. Subpath: `hepgg/paste` (class name: Paste). Part of the unified `hepgg` package. Node 20+. ## Install npm install hepgg --registry https://npm.hep.gg ## Construct import { Paste, Visibility } from "hepgg/paste"; const paste = new Paste({ token, baseURL?, timeoutMs?, retries?, fetch? }); token string required. hepgg_pst_ key. Sent as Authorization: Bearer . baseURL string optional. Default https://paste.hep.gg. ## Methods paste.create(input) -> { id, url, expiresAt, anonymous } input.content string required, non-empty (1 MB Free / 8 MB Prime). input.title string optional, trimmed to 200 chars. input.language string optional, lower-cased, <=32 chars; omit for auto-detect. input.visibility string optional, default "public": "public" | "unlisted" | "private". "private" requires a session, not a key-only call. input.isPermanent boolean optional, default false. Prime only. paste.raw(id) -> string GET //raw, no auth. 404 -> HepError(status 404). paste.read(id) -> string alias of raw. paste.url(id) -> string https://paste.hep.gg/ paste.rawUrl(id) -> string https://paste.hep.gg//raw Visibility enum: Public, Unlisted, Private. ## Errors Empty content throws TypeError (before request). API failures throw HepError { status, code, service: "paste", message, body }. Common: 413 over cap, 429 total cap. ## Part of the hepgg package Also provides: hepgg/id, hepgg/sms, hepgg/email, hepgg/uploader, hepgg/secrets, hepgg/ai, hepgg/login, hepgg/logger (logger docs: https://docs.teamhydra.dev/docs/logger/getting-started). Full snippets reference: /llms/snippets/create, /llms/snippets/read.