OpenAI CLI is the official command-line interface for interacting with the OpenAI API directly from terminal environments. Written in Go, it enables developers to access AI models without building dedicated API clients. Users can generate text and images, manage uploaded files, and submit batch processing requests. The application provides interactive command discovery and detailed offline help documentation. It supports local token counting, streamed responses, and configurable model selection. Structured output formats, including JSON, JSONL, and YAML, facilitate integration with external applications and shell scripts. Additional capabilities include organization administration, API usage monitoring, and HTTP debugging.
Features
- Direct command-line access to OpenAI API resources and AI models
- Text and image generation with configurable model selection and response parameters
- File uploading, batch request submission, and automated result downloading
- Interactive command discovery with offline documentation and local token counting
- Structured JSON, JSONL, and YAML output with configurable field extraction
- Organization administration, API usage monitoring, and HTTP request diagnostics