Generate a random string with custom length and character set.
It uses the Web Crypto API's getRandomValues, a cryptographically secure random number generator — the same source used for the password and token generators — rather than Math.random(), which isn't safe for anything security-sensitive.
Test data, temporary identifiers, database seed values, unique filenames, or any place you need a random-looking string that isn't necessarily meant as a secret credential (for actual API keys, use the Random Token Generator).