openai
chat completion
TLDR
Chat completion
$ openai api chat.completions.create -m gpt-4 -g user "[prompt]"
Create embedding$ openai api embeddings.create -m text-embedding-ada-002 -i "[text]"
List models$ openai api models.list
Generate image$ openai api images.generate -p "[description]"
SYNOPSIS
openai [command] [options]
DESCRIPTION
openai is the OpenAI CLI. Interacts with GPT models and other APIs.
The tool provides command-line API access. Requires API key.
PARAMETERS
api ENDPOINT
API command.-m MODEL
Model name.-g ROLE MESSAGE
Message with role.-i INPUT
Input text.-p PROMPT
Prompt text.--help
Display help information.
CAVEATS
Requires OPENAIAPIKEY. API usage billed. Rate limits apply.
HISTORY
openai CLI was created by OpenAI for command-line API access.
