Lesson 3 of 3 · OpenAI API Fundamentals

The Model Landscape

reading14 min

Choosing the right model is the single highest-leverage decision you make with the OpenAI API. Pick a model that is too powerful and you burn money. Pick one that is too weak and you get bad results. Pick one that is just right and you get great results at a fraction of the cost.

As of mid-2025, OpenAI offers three main model families, each designed for different use cases.

10-50x

cost difference between the cheapest and most expensive models for the same prompt

The GPT Family

These are the workhorse models -- fast, capable, and available at multiple price points.

GPT-4.1 Family

The GPT-4.1 family is optimized for coding, instruction following, and long-context tasks.

ModelContext WindowInput PriceOutput PriceBest For
gpt-4.11M tokens$3.00/M$12.00/MComplex coding, detailed analysis, long documents
gpt-4.1-mini1M tokens$0.80/M$3.20/MEveryday tasks, good quality at low cost
gpt-4.1-nano1M tokens$0.20/M$0.80/MClassification, extraction, high-volume simple tasks
Start with gpt-4.1-mini

For most applications, gpt-4.1-mini is the right starting point. It handles 90% of tasks well at roughly 1/4 the cost of the full gpt-4.1. Only upgrade when you can demonstrate -- through testing, not assumption -- that the larger model produces meaningfully better results for your specific use case.

GPT-5.4

The newest and most capable model in the GPT family.

ModelContext WindowInput PriceOutput PriceBest For
gpt-5.41M tokens$2.50/M$15.00/MMost capable model, complex reasoning, nuanced tasks
gpt-5.4-mini400K tokens$0.75/M$4.50/MStrong general-purpose model at moderate cost
gpt-5.4-nano400K tokens$0.20/M$1.25/MFastest, cheapest GPT-5.4 variant for high-volume simple tasks

GPT-5.4 represents a significant capability jump. It can use reasoning when needed (configurable via the reasoning parameter), has built-in tool use, and handles complex multi-step tasks better than any previous GPT model.

The o-Series: Reasoning Models

The o-series models are fundamentally different from GPT models. They "think" before answering -- spending extra compute time on an internal chain of thought before producing a response.

ModelContext WindowInput PriceOutput PriceBest For
o3200K tokens$10.00/M$40.00/MHard reasoning, math, science, complex analysis
o4-mini200K tokens$1.10/M$4.40/MCost-effective reasoning, coding, STEM tasks

When to Use Reasoning Models

Reasoning models shine on tasks where thinking step-by-step genuinely improves the answer:

  • Math and logic: Multi-step calculations, proofs, constraint satisfaction
  • Complex coding: Algorithm design, debugging subtle bugs, architecture decisions
  • Science: Research analysis, experimental design, data interpretation
  • Strategic planning: Business analysis, risk assessment, decision frameworks

They are overkill for:

  • Simple text generation or summarization
  • Data extraction and formatting
  • Translation
  • Classification
Do

Use reasoning models when the task genuinely requires multi-step logical deduction. Test with GPT-4.1-mini first -- if it gives good results, you do not need reasoning.

Don't

Default to o3 for everything because it is the most powerful. You will burn budget on tasks that do not benefit from extended thinking, and your latency will increase by 5-20x.

The Decision Framework

Here is how to choose a model for any given task:

Pricing Reality Check

Let's make costs concrete. Assume you are building a customer support bot that handles 10,000 conversations per day, averaging 500 input tokens and 300 output tokens per conversation.

ModelDaily Input CostDaily Output CostDaily TotalMonthly Total
gpt-4.1-nano$1.00$2.40$3.40$102
gpt-4.1-mini$4.00$9.60$13.60$408
gpt-4.1$15.00$36.00$51.00$1,530
gpt-5.4$12.50$45.00$57.50$1,725
o4-mini$5.50$13.20$18.70$561
The $50K Mistake
Model Routing Is a Production Skill

Mature AI applications do not use a single model. They route requests to different models based on task complexity. Simple classification goes to nano. Standard conversations go to mini. Complex analysis goes to the full model. This is called model routing, and it is one of the most impactful optimizations you can make.

Staying Current

OpenAI releases new models regularly. The naming convention tells you what to expect:

  • Date suffixes (e.g., gpt-4.1-mini-2025-04-14): A specific snapshot. Pinned, will not change.
  • Without date (e.g., gpt-4.1-mini): Points to the latest stable version. May be updated.

For production systems, pin to a specific dated version so model updates do not break your application unexpectedly. For development and testing, use the latest version to access improvements.

Model Comparison Challenge

beginner
Concept Card