Snipget.ai

Generate random tokens

Generated
generators_token

Valid by construction but non-reproducible — a fresh call returns new values.

Generate random tokens. charset = hex (default), base64url, alphanumeric, or custom (supply custom_alphabet). CSPRNG-backed unless seeded (seeding is insecure — tests only). Use count for many.

Parameters

lengthintegeroptional

Token length in characters.

charsetstringoptional

hex (default), base64url, alphanumeric, or custom.

custom_alphabetstringoptional

Alphabet for charset=custom (>=2 chars).

countintegeroptional

How many to generate.

seedintegeroptional

Reproducible (insecure) output for testing.

Call it

curl -X POST https://api.snipget.ai/v1/generators/token \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"length":32,"charset":"hex","count":1}'

FAQ

What is a token for?

A long random string for things like API keys, reset links, webhook secrets, or session identifiers. It is built from a proper random source so it is hard to guess, unlike anything a person or an AI would type out.

What formats can I choose?

Pick a charset: hex (the default), base64url (compact and URL-safe), alphanumeric (letters and digits only), or custom with your own alphabet. Set length for how long it should be.

Can I get the same token back on another call?

No. Each call returns a fresh value you cannot reproduce, so save it when you create it. A seed option exists for tests only and must never be used for a real secret, because seeded output is not cryptographically secure.

How is this different from the password generator?

A token is one long random string in a single format, meant for machines (keys and secrets). A password lets you mix character types and guarantees one of each, meant for people to use at a login.

What if my request is invalid?

Bad parameters, for example choosing custom without supplying an alphabet of at least two characters, are request mistakes: rejected with an INVALID_INPUT error naming the problem, not billed.

Related tools