# OpenAI

## Step-by-Step Token Generation

1. **Access API Keys Section**
    - Log into OpenAI Platform
    - Navigate to **API Keys** in the left sidebar  
        [![Screenshot 2025-09-08 at 11.55.40 AM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/Xd4fEGq9FrDVnwui-screenshot-2025-09-08-at-11-55-40-am.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/Xd4fEGq9FrDVnwui-screenshot-2025-09-08-at-11-55-40-am.png)
    - Click **"Create new secret key"**
2. **Configure Key Settings**
    - **Name**: Enter descriptive name (e.g., "RoostGPT Production")
    - **Permissions**: Select "All"
    - **Project**: Choose specific project (if using project-based organization)
    - Click **"Create secret key"**
3. **Secure Key Storage**
    - **Copy immediately**: Key shown only once

#### OpenAI Recommended Models for RoostGPT Integration  
  
**GPT-4o** (Primary Recommended)

- **Model Name**: `gpt-4o`
- **Context Window**: 128K tokens
- **Pricing**: ~$2.50/1M input tokens, ~$10/1M output tokens
- **Best For**: **Primary choice** for all RoostGPT tasks - reliable, proven performance
- **Key Features**: 
    - Multimodal capabilities (text, images, code)
    - Well-tested and stable in production
    - Excellent code understanding and generation
    - Strong performance across diverse tasks
    - Widely adopted and documented

#### **GPT-5** (Advanced Alternative)

- **Model Name**: `gpt-5`
- **Context Window**: 272K tokens <span class="inline-flex" data-state="closed">[<span class="relative transition-colors h-full max-w-[180px] overflow-hidden px-1.5 inline-flex items-center font-small rounded-full border-0.5 border-border-300 bg-bg-200 group-hover/tag:bg-accent-secondary-900 group-hover/tag:border-accent-secondary-100/60"><span class="text-nowrap text-text-300 break-all truncate font-normal group-hover/tag:text-text-200">GPT-5: Key characteristics, pricing and model card</span></span><span class="transition-all opacity-[0%] h-[17px] absolute right-[0.5px] inline rounded-r-full flex items-center px-1.5 bg-gradient-to-r from-accent-secondary-900/0 via-accent-secondary-900/100 via-30% to-accent-secondary-900/100 group-hover/tag:opacity-[100%]"><svg class="transition-all group-hover/tag:ease-out duration-[500ms] ease-in text-accent-secondary-100 group-hover/tag:scale-[100%] scale-[80%] group-hover/tag:opacity-[100%] opacity-[0%] -mr-[2px]" fill="currentColor" height="14" viewbox="0 0 256 256" width="14" xmlns="http://www.w3.org/2000/svg"><path d="M200,64V168a8,8,0,0,1-16,0V83.31L69.66,197.66a8,8,0,0,1-11.32-11.32L172.69,72H88a8,8,0,0,1,0-16H192A8,8,0,0,1,200,64Z"></path></svg></span>](https://simonwillison.net/2025/Aug/7/gpt-5/)</span>
- **Pricing**: $1.25/1M input tokens, $10/1M output tokens <span class="inline-flex" data-state="closed">[<span class="relative transition-colors h-full max-w-[180px] overflow-hidden px-1.5 inline-flex items-center font-small rounded-full border-0.5 border-border-300 bg-bg-200 group-hover/tag:bg-accent-secondary-900 group-hover/tag:border-accent-secondary-100/60"><span class="text-nowrap text-text-300 break-all truncate font-normal group-hover/tag:text-text-200">Introducing GPT‑5 for developers | OpenAI</span></span><span class="transition-all opacity-[0%] h-[17px] absolute right-[0.5px] inline rounded-r-full flex items-center px-1.5 bg-gradient-to-r from-accent-secondary-900/0 via-accent-secondary-900/100 via-30% to-accent-secondary-900/100 group-hover/tag:opacity-[100%]"><svg class="transition-all group-hover/tag:ease-out duration-[500ms] ease-in text-accent-secondary-100 group-hover/tag:scale-[100%] scale-[80%] group-hover/tag:opacity-[100%] opacity-[0%] -mr-[2px]" fill="currentColor" height="14" viewbox="0 0 256 256" width="14" xmlns="http://www.w3.org/2000/svg"><path d="M200,64V168a8,8,0,0,1-16,0V83.31L69.66,197.66a8,8,0,0,1-11.32-11.32L172.69,72H88a8,8,0,0,1,0-16H192A8,8,0,0,1,200,64Z"></path></svg></span>](https://openai.com/index/introducing-gpt-5-for-developers/)</span>
- **Best For**: Complex reasoning tasks, advanced code analysis
- **Key Features**: 
    - Built-in reasoning capabilities <span class="inline-flex" data-state="closed">[<span class="relative transition-colors h-full max-w-[180px] overflow-hidden px-1.5 inline-flex items-center font-small rounded-full border-0.5 border-border-300 bg-bg-200 group-hover/tag:bg-accent-secondary-900 group-hover/tag:border-accent-secondary-100/60"><span class="text-nowrap text-text-300 break-all truncate font-normal group-hover/tag:text-text-200">Introducing GPT-5 | OpenAI</span></span><span class="transition-all opacity-[0%] h-[17px] absolute right-[0.5px] inline rounded-r-full flex items-center px-1.5 bg-gradient-to-r from-accent-secondary-900/0 via-accent-secondary-900/100 via-30% to-accent-secondary-900/100 group-hover/tag:opacity-[100%]"><svg class="transition-all group-hover/tag:ease-out duration-[500ms] ease-in text-accent-secondary-100 group-hover/tag:scale-[100%] scale-[80%] group-hover/tag:opacity-[100%] opacity-[0%] -mr-[2px]" fill="currentColor" height="14" viewbox="0 0 256 256" width="14" xmlns="http://www.w3.org/2000/svg"><path d="M200,64V168a8,8,0,0,1-16,0V83.31L69.66,197.66a8,8,0,0,1-11.32-11.32L172.69,72H88a8,8,0,0,1,0-16H192A8,8,0,0,1,200,64Z"></path></svg></span>](https://openai.com/index/introducing-gpt-5/)</span>
    - Enhanced coding performance <span class="inline-flex" data-state="closed">[<span class="relative transition-colors h-full max-w-[180px] overflow-hidden px-1.5 inline-flex items-center font-small rounded-full border-0.5 border-border-300 bg-bg-200 group-hover/tag:bg-accent-secondary-900 group-hover/tag:border-accent-secondary-100/60"><span class="text-nowrap text-text-300 break-all truncate font-normal group-hover/tag:text-text-200">Introducing GPT‑5 for developers | OpenAI</span></span><span class="transition-all opacity-[0%] h-[17px] absolute right-[0.5px] inline rounded-r-full flex items-center px-1.5 bg-gradient-to-r from-accent-secondary-900/0 via-accent-secondary-900/100 via-30% to-accent-secondary-900/100 group-hover/tag:opacity-[100%]"><svg class="transition-all group-hover/tag:ease-out duration-[500ms] ease-in text-accent-secondary-100 group-hover/tag:scale-[100%] scale-[80%] group-hover/tag:opacity-[100%] opacity-[0%] -mr-[2px]" fill="currentColor" height="14" viewbox="0 0 256 256" width="14" xmlns="http://www.w3.org/2000/svg"><path d="M200,64V168a8,8,0,0,1-16,0V83.31L69.66,197.66a8,8,0,0,1-11.32-11.32L172.69,72H88a8,8,0,0,1,0-16H192A8,8,0,0,1,200,64Z"></path></svg></span>](https://openai.com/index/introducing-gpt-5-for-developers/)</span>
    - Larger context window for complex codebases
    - Latest generation technology

#### **GPT-4.1** (Balanced Option)

- **Model Name**: `gpt-4.1`
- **Context Window**: Similar to GPT-4o
- **Pricing**: Competitive with GPT-4o
- **Best For**: Enhanced performance when GPT-4o needs upgrade
- **Key Features**: 
    - Improved over GPT-4o baseline
    - Good balance of cost and capability
    - Reliable for standard development tasks