OpenAI CLI is an official tool for calling REST APIs such as Responses, images, files, and batches from a terminal. Its purpose differs from Codex CLI, which carries out coding work. Its default output is designed for people to read, so scripts should explicitly request JSON or JSONL. It also separates the roles of regular API keys and administrative keys. Safeguards prevent implicit file reads from untrusted standard input. Official documentation advises checking the installation path because the executable can be confused with the same-named command from the existing Python SDK.
Back to Tech
Tech
OpenAI releases an official CLI for its REST API
The API tool serves a different purpose from a coding agent; automation should specify output formats and key permissions explicitly.