OpenAI Setup Guide
This guide will help you set up Janito to work with OpenAI's models.
Prerequisites
- An OpenAI account
- An API key from OpenAI
Getting an API Key
- Go to OpenAI's API Keys page
- Sign in to your OpenAI account
- Click on "Create new secret key"
- Copy the generated key and save it in a secure location
Configuration
You can configure your OpenAI API key in several ways:
Option 1: Using the CLI
Option 2: Environment Variable
Set the OPENAI_API_KEY
environment variable:
On Windows:
Option 3: Configuration File
Add the following to your Janito configuration file:
Available Models
Janito supports the following OpenAI models:
- GPT-5 (default)
- GPT-5 Mini
- GPT-5 Nano
- GPT-4
- GPT-4 Turbo
- GPT-3.5 Turbo
Usage
After configuration, you can use OpenAI models with Janito:
# Use the default model (GPT-5)
janito "Explain quantum computing"
# Specify a specific model
janito -m gpt-4 "Explain quantum computing"
# Use in chat mode
janito -c
# Use in chat mode with a specific model
janito -c -m gpt-4-turbo
Troubleshooting
If you encounter issues:
- Verify your API key is correct and active
- Check that you have sufficient credits in your OpenAI account
- Ensure your network connection can reach OpenAI's API endpoints