Snippets

Hep.gg's paste service on paste.hep.gg. Create code, log, and text pastes from the CLI, ShareX, or a script with a bearer key.

Snippets is the Hep.gg paste service, live at paste.hep.gg. Post code, logs, prose, anything text, with syntax highlighting and a shareable link. Pastes can be public, unlisted, or private. You can create them three ways: in the dashboard, in the web editor at paste.hep.gg, or programmatically over HTTP with a bearer API key (the path this reference covers).

Authentication

The create endpoint accepts a bearer API key. Keys are minted in the dashboard at dashboard/snippets/keys, never via a public endpoint. A key looks like hepgg_pst_ followed by 32 characters, and you send it as an Authorization: Bearer hepgg_pst_... header.

  • Free accounts can have 1 active key.
  • Prime accounts can have 5 active keys.

Read endpoints (GET /<id> and GET /<id>/raw) need no authentication for public and unlisted pastes. Private pastes are readable only by their owner.

Quickstart

Create a paste with a single call. The response is a JSON envelope; the link to share is in data.url.

curl
curl https://paste.hep.gg/api/paste \
  -H "Authorization: Bearer hepgg_pst_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"content":"hello world","language":"plaintext"}'

A successful call returns:

{
  "ok": true,
  "data": {
    "id": "aB3dE6kp",
    "url": "https://paste.hep.gg/aB3dE6kp",
    "expiresAt": "2026-08-27T00:00:00.000Z",
    "anonymous": false
  }
}

Limits by plan

Size caps and expiry depend on how the paste was created.

Plan limits
Anonymous
no accountoptional
1 MB max. Expires after 90 days. No dashboard access. Web-only (captcha required).
Free
key or sessionoptional
1 MB max. Expires after 365 days. Mark up to 100 pastes as permanent to keep them forever. 1 API key.
Prime
key or sessionoptional
8 MB max. Pastes never expire by default. 5 API keys.

If Prime lapses, your pastes get a 30-day grace window to pick what stays before the 365-day free expiry applies.

Pages