Models
Explore our diverse set of models with different capabilities and price points.
Flagship Models
GPT-4o
Our versatile, high-intelligence flagship model
- Text and image input, text output
- 128k context length
- Smarter model, higher price per token
GPT-4o mini
Our fast, affordable small model for focused tasks
- Text and image input, text output
- 128k context length
- Faster model, lower price per token
o1 & o1-mini
Reasoning models that excel at complex tasks
- Text and image input, text output
- 128k context length
- Uses additional tokens for reasoning
Quick Start
Get started with our models in just a few lines of code. Here's an example using our GPT-4o model:
import OpenAI from "openai";
const openai = new OpenAI();
const completion = await openai.chat.completions.create({
model: "gpt-4o",
messages: [
{ role: "developer", content: "You are a helpful assistant." },
{
role: "user",
content: "Write a haiku about recursion in programming.",
},
],
});
console.log(completion.choices[0].message);
Models Overview
The OpenAI API is powered by a diverse set of models with different capabilities and price points. You can also make customizations to our models for your specific use case with fine-tuning.
Model | Description |
---|---|
GPT-4o | Our versatile, high-intelligence flagship model |
GPT-4o mini | Fast, affordable model for focused tasks |
o1 | Advanced reasoning model for complex tasks |
o1-mini | Efficient reasoning model for simpler tasks |
Model ID Aliases and Snapshots
Model IDs can be used in REST APIs to generate outputs. Some model IDs are aliases which point to specific dated snapshots. These aliases are periodically updated to newer snapshots a few months after a newer snapshot becomes available.
How We Use Your Data
Your data is your data. Data sent to the OpenAI API will not be used to train or improve our models (unless you explicitly opt-in). API data may be retained for up to 30 days to help identify abuse, after which it will be deleted (unless otherwise required by law).
For trusted customers with sensitive applications, zero data retention may be available. With zero data retention, request and response bodies are not persisted to any logging mechanism and exist only in memory to serve the request.