Skip to main content

is_valid_api_key

Determine if input is valid OpenAI API key. As of 2024-09-24 there’s no official definition of the key structure so we will allow anything starting with “sk-” and having at least 48 alphanumeric (plus underscore and dash) characters.
Keys are known to start with “sk-”, “sk-proj”, “sk-None”, and “sk-svcaat”
Parameters: Returns: