Models

Explore our diverse set of models with different capabilities and price points.

Flagship Models

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.

ModelDescription
GPT-4oOur versatile, high-intelligence flagship model
GPT-4o miniFast, affordable model for focused tasks
o1Advanced reasoning model for complex tasks
o1-miniEfficient 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.