Using OpenAI With Roo Code
Roo Code supports accessing models directly through the official OpenAI API.
Website: https://openai.com/
Getting an API Key
- Sign Up/Sign In: Go to the OpenAI Platform. Create an account or sign in.
- Navigate to API Keys: Go to the API keys page.
- Create a Key: Click "Create new secret key". Give your key a descriptive name (e.g., "Roo Code").
- Copy the Key: Important: Copy the API key immediately. You will not be able to see it again. Store it securely.
Supported Models
Roo Code supports a variety of OpenAI models, including:
o3-mini
(medium reasoning effort)o3-mini-high
(high reasoning effort)o3-mini-low
(low reasoning effort)o1
o1-preview
o1-mini
gpt-4o
gpt-4o-mini
Refer to the OpenAI Models documentation for the most up-to-date list of models and capabilities.
Configuration in Roo Code
- Open Roo Code Settings: Click the gear icon () in the Roo Code panel.
- Select Provider: Choose "OpenAI" from the "API Provider" dropdown.
- Enter API Key: Paste your OpenAI API key into the "OpenAI API Key" field.
- Select Model: Choose your desired model from the "Model" dropdown.
Tips and Notes
- Pricing: Refer to the OpenAI Pricing page for details on model costs.
- Azure OpenAI Service: If you'd like to use the Azure OpenAI service, please see our section on OpenAI-compatible providers.