Skip to content

zyhazz/openai_key_tester

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenAI API Key Tester

A simple Node.js script to test if an OpenAI API key is valid.

Installation

npm install

Usage

Run the script by providing your OpenAI API key as a command line argument:

node test-key.js YOUR_API_KEY

The script will tell you if the API key is valid and, if it is, show you the available models.

Example Output

For a valid key:

✅ API key is valid!
Available models: gpt-4, gpt-3.5-turbo, ...

For an invalid key:

❌ API key is invalid!
Error message: Invalid API key provided

About

A simple Node.js script to test if an OpenAI API key is valid.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published