Skip to content

About

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

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

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

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages