OpenAI GPT Setup Guide
Get started with GPT-4o, o1 reasoning, and DALL-E for powerful AI development.
o1 Reasoning
Advanced reasoning model for complex multi-step problems.
DALL-E 3
Generate high-quality images from text descriptions.
Realtime Voice
Real-time voice conversations with WebRTC support.
Get Your OpenAI API Key
Create an account and get your API key from OpenAI Platform.
Visit the OpenAI Platform to create your API key:
Open OpenAI PlatformYou will need to add billing to use the API beyond free credits.
Install OpenAI SDK
Install the official OpenAI Node.js library.
npm install openaiOr with yarn:
yarn add openaiConfigure Environment
Set up your API key in environment variables.
Add to your environment:
export OPENAI_API_KEY="sk-proj-..."Or in your .env file:
OPENAI_API_KEY=sk-proj-...Quick Start Code
Test your setup with GPT-4o.
import OpenAI from "openai";
const openai = new OpenAI();
const response = await openai.chat.completions.create({
model: "gpt-4o",
messages: [{ role: "user", content: "Hello, GPT!" }],
});
console.log(response.choices[0].message.content);Install gICM OpenAI Agents
Add GPT-optimized agents from the marketplace.
npx @gicm/cli add agent/openai-reasoning-pro --platform=openai
npx @gicm/cli add agent/openai-code-auditor --platform=openaiBrowse all OpenAI agentsModel Pricing
GPT-4o
Best for most tasks, fast and capable
GPT-4o-mini
Cheaper, great for simple tasks
o1
Deep reasoning, complex problems
DALL-E 3
Image generation