OpenAI / ChatGPT¶
Official Docs: platform.openai.com/docs Category: AI Model
OpenAI's GPT models power GitHub Copilot and many other AI coding tools.
Quick Links¶
Used By
OpenAI models power GitHub Copilot, Cursor, Codex CLI, and Aider.
Model Variants¶
| Model | Best For | Context Window |
|---|---|---|
| GPT-4 Turbo | Complex coding tasks | 128K tokens |
| GPT-4o | Balanced performance | 128K tokens |
| GPT-4o Mini | Cost-effective tasks | 128K tokens |
| o1 | Complex reasoning | Varies |
API Setup¶
Get an API Key¶
- Create an account at platform.openai.com
- Navigate to API Keys
- Create a new key
- Set up billing
Set Environment Variable¶
Or add to your shell profile:
Tips & Tricks¶
Community Tips
This section collects tips from real users. Contribute your tips!
Model selection:
- GPT-4 Turbo: Best for complex coding tasks
- GPT-4o: Good balance of speed and capability
- GPT-4o Mini: Cost-effective for simpler tasks
- o1: Use for problems requiring deep reasoning
Prompting tips:
- Be specific about the programming language and framework
- Provide examples of desired output format
- Use system prompts to set coding style preferences
Common Issues¶
"Rate limited"
- Check your tier and limits at platform.openai.com
- Implement exponential backoff
- Consider upgrading your tier
"Unexpected behavior"
- GPT models can be more creative/variable than Claude
- Be more explicit in your instructions
- Consider using a system prompt for consistency
Community Resources¶
Help Improve This Page
Know a tip that's not listed? Found a helpful video tutorial? Contribute to this page.