ID types

Every ID flavour the generator supports, with its options, limits, and a worked example.

ID types

The type field in the generate request picks one of eight generators. This page documents each one with its options and a copy-pasteable example. Every example assumes you have already set username and token from your dashboard key.

All examples below send JSON. Form-urlencoded bodies work too.

uuid

An RFC 4122 version 4 UUID. No options.

curl
curl -X POST https://id.hep.gg/ \
  -H "Content-Type: application/json" \
  -d '{ "username": "my-bot", "token": "<token>", "type": "uuid" }'

nanoid

A compact, URL-safe identifier. length is required. By default it uses the standard URL-safe alphabet; pass a custom alphabet to draw from your own character set.

Options
length
integerrequired
Number of characters. Maximum 256. A request with no length returns 400 Please specify the length; a value over 256 returns 400 Length too large, please use a smaller number.
alphabet
stringoptional
Custom character set to draw from. Its length must be between 3 and 256 characters, otherwise 400 Alphabet length must be between 3 and 256 characters. Omit for the default URL-safe alphabet.
curl
curl -X POST https://id.hep.gg/ \
  -H "Content-Type: application/json" \
  -d '{ "username": "my-bot", "token": "<token>", "type": "nanoid", "length": 16, "alphabet": "0123456789abcdef" }'

2fa

A numeric one-time code using digits 0-9 only. Useful for verification codes.

Options
length
integeroptionaldefault: 6
Number of digits. Maximum 256; a larger value returns 400 Length too large, please use a smaller number.
curl
curl -X POST https://id.hep.gg/ \
  -H "Content-Type: application/json" \
  -d '{ "username": "my-bot", "token": "<token>", "type": "2fa", "length": 6 }'

license

A license-key-style string: five groups of five characters drawn from 0-9A-Z, joined by hyphens (for example AB12C-3DE4F-GH56J-7KL8M-N90PQ). No options.

curl
curl -X POST https://id.hep.gg/ \
  -H "Content-Type: application/json" \
  -d '{ "username": "my-bot", "token": "<token>", "type": "license" }'

words

A human-readable identifier built from random words. length is the word count and is required. The singular word is accepted as an alias for the type.

Options
length
integerrequired
Number of words. Maximum 16. A request with no length returns 400 Please specify the length of the words; a value over 16 returns 400 Length too large, please use a smaller number.
style
stringoptionaldefault: slug
How the words are joined. slug is lowercase joined by hyphens (brave-yellow-otter). title is Title Case joined by spaces (Brave Yellow Otter). formal is Title Case with spaces stripped (BraveYellowOtter).
curl
curl -X POST https://id.hep.gg/ \
  -H "Content-Type: application/json" \
  -d '{ "username": "my-bot", "token": "<token>", "type": "words", "length": 3, "style": "slug" }'

snowflake

A Discord-style 64-bit snowflake. It is returned as a string to avoid JavaScript number precision loss, so treat it as text, not a number. The generator uses epoch 1638169647. No options.

curl
curl -X POST https://id.hep.gg/ \
  -H "Content-Type: application/json" \
  -d '{ "username": "my-bot", "token": "<token>", "type": "snowflake" }'

keypair

An Ed25519 signing keypair. Unlike every other type, the response carries two fields: id is the public key (hex) and privateID is the secret key (hex). Store privateID securely and never expose it.

Response fields
id
stringoptional
The public key, hex-encoded.
privateID
stringoptional
The secret key, hex-encoded. Treat as a secret.
curl
curl -X POST https://id.hep.gg/ \
  -H "Content-Type: application/json" \
  -d '{ "username": "my-bot", "token": "<token>", "type": "keypair" }'

cuid

A collision-resistant identifier (CUID2). Both options are optional.

Options
length
integeroptionaldefault: 5
Number of characters. Must be between 2 and 32, otherwise 400 Length must be between 2 and 32.
fingerprint
stringoptionaldefault: TeamHydra
A host-identifying string folded into the hash for extra collision resistance.
curl
curl -X POST https://id.hep.gg/ \
  -H "Content-Type: application/json" \
  -d '{ "username": "my-bot", "token": "<token>", "type": "cuid", "length": 10 }'