Skip to main content

OpenAI CLI Commands

Manage and test OpenAI provider via the command line.

Environment Setup

Commands

Check Provider Status

Output:

JSON Output

Output:

Test Provider

Output:

Test with JSON Output

Output:

Chat with OpenAI

List All Providers

Advanced Usage

Custom Base URL (Proxy)

With Organization ID

Verbose Output

Options Reference

Troubleshooting

Missing API Key

Solution:

Connection Error

Solution: Check your internet connection and any proxy settings.

Invalid Model

Solution: Use a valid model name like gpt-4o-mini, gpt-4o, or gpt-4-turbo.

OpenAI Code Usage

OpenAI Code Usage

Providers CLI Overview

Providers CLI Overview