Available Models
O-Series (Reasoning Models)
- o1 - Advanced reasoning with 200K context
- o3 - Enhanced reasoning capabilities
- o3-mini - Compact reasoning model
- o4-mini - Next-generation compact reasoning
GPT-5 Series (Latest)
- gpt-5 - Flagship model with 200K context
- gpt-5-mini - Compact version
- gpt-5-nano - Ultra-compact version
- gpt-5.1 - Enhanced GPT-5
- gpt-5.2 - Latest iteration
- gpt-5.3-codex - Optimized for coding (400K context)
GPT-4 Series
- gpt-4.1 - Enhanced GPT-4
- gpt-4o - Multimodal flagship (128K context)
- gpt-4o-mini - Fast and affordable
- gpt-4-turbo - Enhanced GPT-4
- chatgpt-4o-latest - Latest ChatGPT model
GPT-3.5 Series
- gpt-3.5-turbo - Fast and affordable (16K context)
- Tool calling and parallel execution
- Vision capabilities (GPT-4 and newer)
- Structured outputs
- Function calling
Setup Steps
Get Your API Key
- Visit OpenAI Platform
- Sign up or log in to your account
- Navigate to API Keys
- Click “Create new secret key”
- Copy your API key (starts with
sk-...)
Configure Forge
Run the interactive login command:Select OpenAI from the list and paste your API key when prompted.
Configuration
API Endpoint
- Chat Completions:
https://api.openai.com/v1/chat/completions - Models List:
https://api.openai.com/v1/models
Authentication
OpenAI uses Bearer token authentication via theAuthorization header.
Model Selection Guide
For Coding and Development
Best Overall:gpt-5.3-codex- 400K context, optimized for agentic codinggpt-4o- Excellent balance of capability and speed
gpt-4o-mini- Fast and affordablegpt-3.5-turbo- Good for simple tasks
For Reasoning Tasks
Complex Problem-Solving:o3- Advanced reasoningo1- Strong reasoning capabilities
o3-mini- Compact but capableo4-mini- Next-generation efficiency
For General Use
Latest and Greatest:gpt-5- 200K context, most advancedchatgpt-4o-latest- Continuously updated
gpt-4.1- Enhanced vision and textgpt-4o- Flagship multimodal
Switching Models
Change models during a session:Features
Reasoning Models
O-series models show their reasoning process:- Explicit chain of thought
- Step-by-step problem solving
- Verification of logic
- Self-correction
Vision Capabilities
GPT-4 and newer models support:- Image analysis
- Screenshot understanding
- Diagram interpretation
- UI/UX review
Tool Calling
All models support:- Function calling
- Parallel tool execution
- Structured outputs
- Multi-step workflows
Long Context
Context window sizes:- 400K: gpt-5.3-codex
- 200K: o1, o3, gpt-5 series
- 128K: gpt-4 series
- 16K: gpt-3.5-turbo
Best Practices
Rate Limits
OpenAI enforces rate limits by:- Requests per minute (RPM)
- Tokens per minute (TPM)
- Tokens per day (TPD)
Cost Optimization
Save Money:- Use
gpt-4o-minifor simple tasks - Use
gpt-3.5-turbofor basic operations - Cache frequently used prompts
- Limit context size when possible
- Use
gpt-5.3-codexfor complex coding - Use
o3for difficult reasoning - Use
gpt-5for maximum capability
Token Management
- Monitor token usage in real-time
- Set spending limits in your account
- Use shorter system prompts
- Summarize long conversations
Troubleshooting
Invalid API Key
If authentication fails:- Verify your key starts with
sk- - Check that it’s active in your OpenAI account
- Ensure you have sufficient credits/quota
- Try regenerating the key
Rate Limit Errors
If you hit rate limits:- Check your tier and limits in the dashboard
- Implement exponential backoff retry logic
- Spread requests over time
- Consider upgrading your tier
Insufficient Quota
If you run out of quota:- Add credits to your account
- Check your billing settings
- Set up auto-recharge if needed
- Monitor usage to avoid surprises
Context Length Exceeded
If requests are too large:- Reduce conversation history
- Summarize previous context
- Switch to a model with larger context
- Split work into smaller chunks
Deprecated: Environment Variable Setup
For backward compatibility:Next Steps
- Explore OpenAI’s documentation
- Learn about prompt engineering
- Set up custom commands for your workflow
- Configure temperature and other parameters