Prerequisites
- An OpenAI account
- An active OpenAI subscription or API access plan
The models available to you depend on your OpenAI account’s subscription tier. See OpenAI’s pricing page for details on what’s included in each plan.
Connecting Your OpenAI Account
1
Open Cline Settings
Click the settings gear icon in the top-right corner of the Cline extension.
2
Select OpenAI Codex Provider
Choose “OpenAI Codex” from the “API Provider” dropdown menu.
3
Sign In with OpenAI
Click the “Sign in with OpenAI” button. This will open a browser window for authentication.
4
Authorize Cline
In the browser window that opens:
- Sign in to your OpenAI account (if not already signed in)
- Review the permissions Cline is requesting
- Click “Authorize” to grant access
5
Select Your Model
Once authorized, you’ll be returned to Cline. Choose your desired model from the “Model” dropdown.
If a model doesn’t appear in your dropdown, it may not be available on your OpenAI subscription tier.
Managing Your Connection
Disconnecting Your Account
To disconnect your OpenAI account from Cline:- Open Cline Settings
- With OpenAI Codex selected as the provider, click “Sign out”
- Confirm the disconnection
Token Refresh
OAuth tokens are automatically refreshed by Cline. If you encounter authentication errors:- Try disconnecting and reconnecting your account
- Ensure your OpenAI account is in good standing
- Check that your subscription is active
Troubleshooting
”Authentication failed” error
- Ensure you’re signing in with the correct OpenAI account
- Check that your OpenAI subscription is active
- Try clearing your browser cache and signing in again
Models not appearing
- The available models depend on your OpenAI subscription tier
- Some models may require specific plan upgrades
- Check OpenAI’s pricing page for model availability by plan
OAuth window doesn’t open
- Check if pop-ups are blocked in your browser
- Try using a different browser
- Ensure you have a stable internet connection
Connection keeps expiring
- This is rare but can happen if your OpenAI account session expired
- Disconnect and reconnect to refresh your authentication
Good to Know
Cline only requests the permissions necessary to make API calls on your behalf. Your OpenAI credentials are never stored by Cline. When using OpenAI Codex, Cline accesses models through your OpenAI/ChatGPT subscription. There is no separate per-token API billing or consumption of OpenAI API credits for this provider; usage and limits are governed by your ChatGPT (or OpenAI account) subscription plan, not by Cline.Related Documentation
- OpenAI (API Key): Alternative configuration using API keys
- Model Selection Guide: Help choosing the right model

