Skip to content
Security & Data Validation

Strong password generator

The password generator API creates a random password with a chosen length and checks a SHA-1 hash against a breach list without sending the password.

GET https://api2.globus.studio/v2/password

Reference

Parameters

Name Type Required Description
length integer no 1–1024. The generator always emits at least four characters. Default: 20.
check string no SHA-1 hash to check against known breaches.
format string no plain or json. Default: plain.

Example request

curl -s "https://api2.globus.studio/v2/password?length=24&format=json"
Open documentation

strong password

The strong password generator returns a random value with upper case, lower case, digits and special characters. The optional breach check compares a SHA-1 hash with a list of known leaked passwords. The password itself never leaves the request.

What the strong password generator returns

The response has the password and its length. With the check parameter it also has a breached flag: true, false or null when the lookup failed.

{"password":"K94A)rAFYAoUMdKF)SkGvka*","length":24}

Length and character set

Length matters more than a list of required character classes. A 20-character random value is stronger than a short value with one symbol. The endpoint accepts a length and uses a mixed character set. Very long values are capped to keep the response predictable, and the generator always emits at least four characters.

The breach check

Hash the password locally, send the hash and compare the flag. A SHA-1 hash is enough for this check because the source list uses SHA-1. Do not store that hash as the password hash; use a slow hash such as Argon2id or bcrypt for storage.

hash=$(printf '%s' 'correct horse battery staple' | sha1sum | cut -d' ' -f1)
curl "https://api2.globus.studio/v2/password?check=$hash&format=json"

When to generate

Generate a temporary password when an admin creates an account or when a user asks for a suggestion. Let the user replace it. A generated value that nobody can remember often ends up on a note, which is worse than a passphrase. For an account stored in a manager, a random string is the right fit.

Storage

Rotate a password when a device is lost or a manager is shared with the wrong person. A strong password is only as safe as the place that stores it. Show the value once and store only a slow hash. Do not log generated passwords. The endpoint is public in the legacy contract, so add authentication before you use it for real accounts. A password that appears in a shared log is no longer a secret.

Entropy and policy

Strength comes from the number of possible values, not from a symbol counter. A 20-character random string has more combinations than a short string with every character class. If a target system forces a symbol, the generator can meet the rule, but the rule should not make the value shorter.

Passphrases and password managers

A random string is hard to remember and easy to paste into a manager. A passphrase is easier to type and can be strong with enough words. The strong password generator returns a random string, so use it for accounts stored in a manager. For a value a person must type on a TV remote, a passphrase from a separate tool is the better fit.

Do not ask a user to memorize a generated value and then hide the reveal button. Show it once, offer a copy action and explain where it is stored. A password that the user cannot save will be written on paper or replaced with something weak.

Limits

A strong password saved in a manager needs a strong master password. The strong password generator does not know your password policy. Check the result against the target system before you show it. The endpoint is fast and rate limited. Read the password generator guide for a rotation flow.

For a WordPress site, rotate the salts with the WordPress salt generator after a password change. To separate a real login from a script, see the bot detector.

Further reading: NIST SP 800-63B, passwords.

Custom work

Need an API that does not exist yet?

Describe the task and the response format. We will estimate the endpoint, the integration and the maintenance.

Start a conversation