> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenAI

> Use GPT models from OpenAI in your BoostGPT AI teammates

## Overview

OpenAI provides the GPT family of models, including the latest GPT-5 series and specialized reasoning models. These models offer industry-leading performance across a wide range of tasks from simple chat to complex reasoning.

## Available Models

> [card] GPT-6 Astra
>
> **39 credits** • OpenAI's most capable model, with state-of-the-art coding, computer use and reasoning.
>
> * 1.05M context window
> * Exceptional reasoning (reasoning model)
> * Speed: Medium • Cost: High
> * Vision: images supported

> [card] GPT-6.1 Sol
>
> **8 credits** • Near-Astra performance for complex work at a lower cost.
>
> * 1.05M context window
> * Exceptional reasoning (reasoning model)
> * Speed: Medium • Cost: Medium
> * Vision: images supported
> * Model id: `gpt-6.1-sol`

> [card] GPT-6 Sol
>
> **8 credits** • GPT-6 reasoning at half the cost of GPT-5.6 Sol, for coding and complex professional work.
>
> * 1.05M context window
> * Exceptional reasoning (reasoning model)
> * Speed: Medium • Cost: Medium
> * Vision: images supported
> * Model id: `gpt-6-sol`

> [card] GPT-6 Luna
>
> **1 credit** • The fastest, most affordable GPT-6 model, for high-volume tasks with a clear goal.
>
> * 1.05M context window
> * Excellent reasoning (reasoning model)
> * Speed: Fast • Cost: Low
> * Vision: images supported
> * Model id: `gpt-6-luna`

> [card] GPT-5.6 Sol
>
> **16 credits** • Previous-generation frontier model, built for complex professional work requiring deep reasoning.
>
> * 1.05M context window
> * Exceptional reasoning (reasoning model)
> * Speed: Medium • Cost: High
> * Vision: images supported
> * Model id: `gpt-5.6-sol`

> [card] GPT-5.6 Terra
>
> **8 credits** • Previous-generation balanced tier offering strong reasoning and multimodal input at moderate cost.
>
> * 1.05M context window
> * Exceptional reasoning (reasoning model)
> * Speed: Medium • Cost: Medium
> * Vision: images supported
> * Model id: `gpt-5.6-terra`

> [card] GPT-5.6 Luna
>
> **1 credit** • Previous-generation cost-efficient tier, designed for high-volume, cost-sensitive workloads.
>
> * 1.05M context window
> * Excellent reasoning (reasoning model)
> * Speed: Fast • Cost: Low
> * Vision: images supported
> * Model id: `gpt-5.6-luna`

> [card] GPT-5.5
>
> **20 credits** • Previous-generation frontier GPT model with strong reasoning and a 1M+ context window.
>
> * 1.05M context window
> * Exceptional reasoning (reasoning model)
> * Speed: Medium • Cost: High
> * Vision: images supported
> * Model id: `gpt-5.5`

> [card] GPT-5.4
>
> **10 credits** • Previous-generation flagship GPT model with strong reasoning, creativity, and contextual understanding.
>
> * 1M context window
> * Exceptional reasoning (reasoning model)
> * Speed: Medium • Cost: High
> * Vision: images supported
> * Model id: `gpt-5.4`

> [card] GPT-5.2
>
> **8 credits** • The model for coding and agentic tasks across industries.
>
> * 400K context window
> * Exceptional reasoning (reasoning model)
> * Speed: Medium • Cost: High
> * Vision: images supported
> * Model id: `gpt-5.2`

> [card] GPT-5
>
> **6 credits** • The flagship GPT-5 model offering state-of-the-art performance in reasoning, creativity, and contextual understanding for the most demanding applications.
>
> * 200K context window
> * Exceptional reasoning (reasoning model)
> * Speed: Medium • Cost: High
> * Vision: images supported
> * Model id: `gpt-5`

> [card] GPT-5.4 Mini
>
> **3 credits** • The mid-size GPT-5.4 tier: strong reasoning with a 400K context at a fraction of the flagship cost.
>
> * 400K context window
> * Excellent reasoning (reasoning model)
> * Speed: Fast • Cost: Medium
> * Vision: images supported
> * Model id: `gpt-5.4-mini`

> [card] GPT-5 Mini
>
> **2 credits** • A faster and more affordable GPT-5 variant optimized for everyday use while maintaining strong reasoning and contextual understanding.
>
> * 200K context window
> * Excellent reasoning (reasoning model)
> * Speed: Fast • Cost: Medium
> * Vision: images supported
> * Model id: `gpt-5-mini`

> [card] GPT-5 Nano
>
> **1 credit** • Ultra-lightweight GPT-5 optimized for speed and scale. Perfect for simple tasks, prototyping, and high-volume applications.
>
> * 128K context window
> * Good reasoning (reasoning model)
> * Speed: Very\_fast • Cost: Low
> * Vision: images supported
> * Model id: `gpt-5-nano`

## Setup

### Using BoostGPT-Hosted API Keys

**1. Select OpenAI Models**

In your BoostGPT dashboard, simply select any OpenAI model when creating or configuring your bot. No API key needed!

**2. Choose Your Model**

Select based on your needs:

* **GPT-5**: Complex reasoning, creative tasks
* **GPT-5 Mini**: Balanced everyday use
* **O1/O3 Mini**: Deep analytical work
* **GPT-4o Mini**: Cost-effective simple tasks

### Using Your Own OpenAI API Key

> [!NOTE]
>
> Want to use your own OpenAI API key? See the [Bring Your Own Keys](/docs/providers/bring-your-own-keys.md) guide.

> [tab] Dashboard Setup
>
> **1. Navigate to Integrations**
>
> Go to [app.boostgpt.co](https://app.boostgpt.co/integrations) and select **Integrations**
>
> **2. Select OpenAI**
>
> Find and click on the **OpenAI** provider
>
> **3. Add API Key**
>
> Enter your OpenAI API key and select which AI teammates will use this key
>
> **4. Save Configuration**
>
> Click save to apply your custom API key
>
> > [!TIP]
> >
> > Using your own API key can reduce costs for high-volume applications and gives you direct control over rate limits.

> [tab] Core SDK
>
> ```javascript bot.js theme={null}
> import { BoostGPT } from 'boostgpt';
>
> const client = new BoostGPT({
>   project_id: process.env.BOOSTGPT_PROJECT_ID,
>   key: process.env.BOOSTGPT_API_KEY
> });
>
> // Create bot with OpenAI model
> const botResponse = await client.createBot({
>   name: 'My GPT-5 Bot',
>   model: 'gpt-5-mini',
>   instruction: 'You are a helpful assistant.',
>   max_reply_tokens: 1000,
>   status: 'active'
> });
>
> if (botResponse.err) {
>   console.error('Error:', botResponse.err);
> } else {
>   console.log('Bot created:', botResponse.response);
> }
> ```

> [tab] Router SDK
>
> ```javascript router.js theme={null}
> import { Router, DiscordAdapter } from '@boostgpt/router';
>
> const router = new Router({
>   apiKey: process.env.BOOSTGPT_API_KEY,
>   projectId: process.env.BOOSTGPT_PROJECT_ID,
>   defaultBotId: process.env.BOOSTGPT_BOT_ID, // Bot using OpenAI
>   adapters: [
>     new DiscordAdapter({
>       discordToken: process.env.DISCORD_TOKEN
>     })
>   ]
> });
>
> // Router automatically handles chat with your OpenAI bot
> router.onMessage(async (message, context) => {
>   // Handle custom commands
>   if (message.content === '/help') {
>     return 'I can help you with anything!';
>   }
>
>   // Return null to let BoostGPT handle the message
>   return null;
> });
>
> await router.start();
> console.log('✓ Router started with OpenAI bot');
> ```

## Model Selection Guide

### When to Use Each Model

> [accordion] GPT-5 - Complex & Creative Tasks
>
> **Best for:**
>
> * Creative writing and content generation
> * Complex reasoning and analysis
> * Multi-step problem solving
> * High-stakes customer interactions
>
> **Avoid for:**
>
> * Simple FAQ responses
> * High-volume/cost-sensitive applications
>
> **Cost:** 5 credits per request

> [accordion] GPT-5 Mini - Everyday Workhorse
>
> **Best for:**
>
> * Customer support chatbots
> * General conversation
> * Content moderation
> * Most production use cases
>
> **Sweet spot:** Balance of performance and cost
>
> **Cost:** 3 credits per request

> [accordion] GPT-5 Nano - Speed & Scale
>
> **Best for:**
>
> * High-volume applications
> * Simple queries and responses
> * Quick classifications
> * Prototyping and testing
>
> **Cost:** 2 credits per request (most affordable GPT-5)

> [accordion] O1/O3 Mini - Deep Reasoning
>
> **Best for:**
>
> * Mathematical problem solving
> * Code debugging and optimization
> * Scientific analysis
> * Strategic planning
>
> **Note:** Higher minimum tokens (2000+), slower responses
>
> **Cost:** 3-6 credits per request

> [accordion] GPT-4o Mini - Budget Option
>
> **Best for:**
>
> * Development and testing
> * Simple chatbots
> * Low-budget projects
> * Learning and experimentation
>
> **Cost:** 1 credit per request (cheapest option)

## Troubleshooting

> [accordion] Rate limit errors (429)
>
> **Cause:** Too many requests to OpenAI API
>
> **Solutions:**
>
> * Implement request throttling
> * Use exponential backoff retries
> * Upgrade your OpenAI API tier
> * Switch to GPT-4o Mini for high-volume use

> [accordion] Context length exceeded
>
> **Cause:** Input + completion tokens exceed model's context window
>
> **Solutions:**
>
> * Truncate conversation history
> * Use models with larger context (GPT-5: 200K)
> * Implement sliding window for message history

> [accordion] Slow responses with O1 models
>
> **Expected behavior:** Reasoning models take longer
>
> **Solutions:**
>
> * Set user expectations (show "thinking..." indicator)
> * Use O1 Mini instead of O1 for faster responses
> * Reserve reasoning models for truly complex tasks

> [accordion] High costs
>
> **Solutions:**
>
> * Use GPT-5 Mini or GPT-4o Mini for most tasks
> * Implement dynamic model selection
> * Cache common responses
> * Set max\_tokens to limit completion length

## Next Steps

> [card] [Model Comparison](/docs/providers/model-comparison.md)
>
> Compare OpenAI models with other providers

> [card] [Reasoning Models](/docs/providers/reasoning-models.md)
>
> Deep dive into O1 and O3 reasoning capabilities

> [card] [Bring Your Own Key](/docs/providers/bring-your-own-keys.md)
>
> Use your own OpenAI API key

> [card] [SDK Reference](/docs/sdk/core/api-reference.md)
>
> Full API documentation


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.