Once you have your OpenAI API key, you can use it with the command-line interface (CLI) by setting the key as an environment variable within your shell environment. This allows you to easily authenticate your requests to the API from the command line.
export OPENAI_API_KEY="your-api-key"
Replace your-api-key with your actual API key. After setting the environment variable, you can start making requests to the API using the appropriate commands and libraries.