openai Command Examples

CLI tool providing access to the OpenAI API. More information: https://github.com/openai/openai-python.

openai api models.list

openai api completions.create --model {{ada}} --prompt {{"Hello world"}}

openai api chat_completions.create --model {{gpt-3.5-turbo}} --message {{user "Hello world"}}

openai api image.create --prompt {{"two dogs playing chess, cartoon"}} --num-images {{1}}