--- title: Hep.gg ID Generator JavaScript SDK (LLM) description: Use the ID Generator from Node/TypeScript via the hepgg package. Install, construct ID, call generators. --- # Hep.gg ID Generator SDK (hepgg package) Typed Node/TypeScript client for https://id.hep.gg. Part of the unified `hepgg` package. Subpath: `hepgg/id`. Node 20+. Zero runtime dependencies. ## Install Registry: https://npm.hep.gg npm install hepgg --registry https://npm.hep.gg Or add `registry=https://npm.hep.gg` to `.npmrc`, then `npm install hepgg`. ## Construct import { ID, Type, StyleType } from "hepgg/id"; const id = new ID({ username, token }); Constructor config: username string required. Key username from the dashboard. token string required. Key secret token. baseURL string optional. Default https://id.hep.gg timeoutMs number optional. Default 10000. retries number optional. Default 2 (safe retries on transport errors). fetch function optional. Custom fetch. Auth is sent in the request body by the client; you do not set headers. ## Methods generateUUID() -> { id } generateNanoID(length, alphabet?) -> { id } length 1-256; alphabet len 3-256 generateWords(length, style) -> { id } length 1-16; style StyleType.Slug|Title|Formal generate2FA(length = 6) -> { id } generateKeyPair() -> { id, privateID } generateSnowflake() -> { id } id is a string generateLicense() -> { id } generateCUID(length?, fingerprint?) -> { id } length 2-32 generate(type, options?) -> { id } type is Type or string; options merged into body generateMany(type, count, options?) -> Array<{ id }> count concurrent calls Type enum: uuid, nanoid, words, 2fa, keypair, snowflake, license, cuid. StyleType enum: slug, title, formal. ## Errors Non-2xx throws `HepError` (import from `hepgg` or `hepgg/id` core). Fields: status (number|undefined), code (string|undefined), service ("id"), message, body. `err instanceof HepError` works across all hepgg subpaths. ## Example import { ID } from "hepgg/id"; const id = new ID({ username: "my-bot", token: process.env.ID_TOKEN }); const { id: code } = await id.generate2FA(6); ## Part of the hepgg package The same install also provides: hepgg/sms, hepgg/email, hepgg/uploader, hepgg/paste, hepgg/secrets, hepgg/ai, hepgg/login, and the logger (hepgg/logger, documented at https://docs.teamhydra.dev/docs/logger/getting-started). Full ID reference: /llms/idgen/generate, /llms/idgen/types, /llms/idgen/authentication.