A practical OpenAI model pricing guide for GPT-5 and GPT-4.1, including costs, strengths, and which model to use for agentic AI, coding, routing, extraction, and high-volume automation.
If you are trying to choose the best OpenAI model for an AI agent, the first question is usually not raw intelligence.
It is cost.
More specifically:
Which OpenAI model is cheap enough to use at scale, but still strong enough to handle real agentic work?
That is the practical buying question behind terms like:
This guide is built to answer that question clearly.
All prices and model descriptions below were checked against official OpenAI API docs on March 24, 2026. One important clarification up front: people often search for models like GPT-5.1 mini or GPT-5.1 nano, but OpenAI's public general-purpose lineup currently lists GPT-5.1, GPT-5 mini, GPT-5 nano, GPT-5.4, GPT-5.4 mini, and GPT-5.4 nano instead.
If you only need the short version:
GPT-5 nanoGPT-5 miniGPT-5.4GPT-5.4 miniGPT-4.1GPT-4.5 Preview, because it is deprecated and dramatically more expensivePrices below are for text tokens and shown per 1 million tokens.
| Model | Positioning | Input | Cached input | Output | Best fit |
|---|---|---|---|---|---|
GPT-5.4 | Flagship frontier model | $2.50 | $0.25 | $15.00 | High-stakes agentic workflows, advanced coding, professional work |
GPT-5.4 mini | Strongest mini in the 5.4 line | $0.75 | $0.075 | $4.50 | Coding agents, computer use, subagents |
GPT-5.4 nano | Cheapest 5.4-class model | $0.20 | $0.02 | $1.25 | Classification, extraction, ranking, high-volume agent steps |
GPT-5.2 | Previous frontier professional model | $1.75 | $0.175 | $14.00 | Older 5.x frontier deployments not yet moved to 5.4 |
GPT-5.1 | Best model for coding and agentic tasks in its generation | $1.25 | $0.125 | $10.00 | Serious coding and agent workflows with configurable reasoning |
GPT-5 | Previous reasoning model | $1.25 | $0.125 | $10.00 | Existing GPT-5 deployments that have not upgraded to 5.1 |
GPT-5 mini | Cost-efficient general 5.x model | $0.25 | $0.025 | $2.00 | Cheap general agent work, prompt-driven workflows |
GPT-5 nano | Cheapest 5.x model | $0.05 | $0.005 | $0.40 | Ultra-cheap routing, summarization, tagging, simple automation |
GPT-4.5 Preview | Deprecated large model | $75.00 | $37.50 | $150.00 | Rare research comparison only |
GPT-4.1 | Smartest non-reasoning GPT-4.1 model | $2.00 | $0.50 | $8.00 | Tool calling and instruction following without a reasoning step |
GPT-4.1 mini | Smaller, faster GPT-4.1 | $0.40 | $0.10 | $1.60 | Lower-cost GPT-4.1 workloads |
GPT-4.1 nano | Cheapest GPT-4.1 model | $0.10 | $0.025 | $0.40 | Fast low-cost 4.x automation and routing |
Pricing alone is not enough. For agentic AI, the better question is what each model is optimized to do.
OpenAI describes GPT-5.4 as its best intelligence at scale for agentic, coding, and professional workflows. This is the model to reach for when:
For enterprise agents, this is the premium option.
This is probably the most interesting model in the current lineup for production builders. OpenAI positions it as its strongest mini model for coding, computer use, and subagents.
That matters because many agent systems do not need the absolute top model on every step. They need a model that is:
For many agentic AI systems, GPT-5.4 mini is the model that lets you keep quality reasonably high without paying frontier-model prices on every turn.
This is not the cheapest OpenAI model overall, but it is the cheapest model in the 5.4 generation. OpenAI explicitly calls out use cases like:
That makes it a strong fit for high-volume pipelines where each call is narrow and structured.
OpenAI describes GPT-5.1 as the best model for coding and agentic tasks in that generation. It still matters because many teams compare it directly against GPT-5.4.
If you already built around GPT-5.1, the model is still strong. But if you are starting fresh and want the current frontier recommendation, OpenAI now points builders toward GPT-5.4.
These are best understood as previous generation reference points inside the 5.x family.
GPT-5 is the older reasoning model in the familyGPT-5.2 is the previous frontier professional model before GPT-5.4They are useful in migration discussions, but not usually the first recommendation for new projects.
GPT-5 mini is the practical budget choice for many teams. OpenAI positions it as a faster, more cost-efficient version of GPT-5, and says it is great for well-defined tasks and precise prompts.
That makes it attractive for:
If someone asks for the best cheap OpenAI model for an AI agent, this is often the safest first answer.
This is the cheapest current general-purpose GPT-family model in the official docs. OpenAI describes it as great for summarization and classification.
That means it is ideal for:
For agentic systems, GPT-5 nano is usually not the model that should own the entire workflow. It is the model that should handle the boring high-volume pieces around the workflow.
The GPT-4.1 family still matters because it is positioned differently from the GPT-5 line. OpenAI calls GPT-4.1 the smartest non-reasoning model and highlights:
That makes it relevant when you want strong capability but do not want a reasoning-style model on the path.
These are still viable, but OpenAI's own docs increasingly point people toward the GPT-5 equivalents for more complex tasks:
GPT-4.1 mini is a smaller, faster GPT-4.1 modelGPT-4.1 nano is the fastest and cheapest model in the 4.1 familyIf you are already using them, they are not broken. But for new builds, the GPT-5 family is usually the more interesting comparison.
The simplest way to think about it is this:
GPT-4.1 family is the strong non-reasoning line.GPT-5 family is the stronger reasoning and agentic line.GPT-5.4 line is the current frontier recommendation.For many teams, the pricing comparison is enough to force a rethink.
GPT-5 nano vs GPT-4.1 nanoGPT-5 nano input is cheaper: $0.05 vs $0.10If your workload is mostly routing, extraction, or short classification, GPT-5 nano is hard to ignore.
GPT-5 mini vs GPT-4.1 miniGPT-5 mini input is cheaper: $0.25 vs $0.40GPT-5 mini output is higher: $2.00 vs $1.60That means GPT-5 mini is not strictly cheaper on every dimension, but it is often a better cost-capability tradeoff if your workflow is prompt-heavy and output-light.
GPT-5.4 mini vs GPT-4.1 miniGPT-5.4 mini is materially more expensiveThis is the classic agentic AI tradeoff: pay more per call, or pay less and compensate with more retries, more guardrails, or more human intervention.
Here is the practical routing logic.
GPT-5 nano when:GPT-5 mini when:GPT-5.4 nano when:GPT-5.4 mini when:GPT-5.4 when:GPT-4.1 only when:Most teams make the same mistake: they try to pick one model for the entire agent.
That is usually the wrong architecture.
A better design is a tiered model stack:
GPT-5 nano or GPT-5.4 nano for intake, routing, and extractionGPT-5 mini for the bulk of repeatable task handlingGPT-5.4 mini or GPT-5.4This matters because agentic systems are rarely one prompt. They are pipelines:
Not every step deserves flagship-model pricing.
If you are choosing today and want a practical default:
GPT-5 mini for cheap general-purpose work.GPT-5 nano for ultra-cheap support tasks around the main workflow.GPT-5.4 mini for coding-heavy or subagent-heavy systems.GPT-5.4 for the steps where mistakes are expensive.That is usually a more defensible production strategy than forcing one expensive model to do everything.
The most important pricing insight is not that OpenAI has more models now.
It is that the pricing ladder is much more useful for agentic AI system design:
GPT-5 nano is the cheapest current general-purpose entry pointGPT-5 mini is often the strongest cost-performance defaultGPT-5.4 mini is the mini model many serious agent builders should evaluateGPT-5.4 is the premium model for complex professional workflowsIf you are still testing with GPT-4.1 mini, the right next comparison is usually not GPT-4.5 Preview.
It is:
GPT-5 mini for cheap general workloadsGPT-5 nano for ultra-low-cost stepsGPT-5.4 mini for better agent qualityTalk through workflow selection, approval design, and where governed agent execution can save the most operational time for your team.