Claude Sonnet 4.5 vs GPT-4.1
Comparing two widely-used large-context flagship models for production agent and assistant workloads that mix long documents with structured extraction and tool calls.
Pricing & context
All figures below are list prices pulled directly from the Harpd pricing registry (last verified 2026-08-18). Prices change often — open each model’s source link to confirm before budgeting.
| Metric | Claude Sonnet 4.5 | GPT-4.1 |
|---|---|---|
| Provider | Anthropic | OpenAI |
| Input / 1M tokens | $3 | $2 |
| Output / 1M tokens | $15 | $8 |
| Cached input / 1M tokens | $0.3 | $0.2 |
| Batch discount | 50% off | 50% off |
| Context window | 200,000 tokens | 1,000,000 tokens |
| Source | Anthropic pricing ↗ | OpenAI pricing ↗ |
Capabilities
Claude Sonnet 4.5 offers strong tool-calling and agentic reliability, well-regarded structured-output and long-document reasoning, with a 200k token context window and published prompt caching for repeat prefixes.
Capabilities
GPT-4.1 provides a 1M token context window, strong instruction-following and code generation, and prompt caching, making it a common choice for very long-context retrieval and code-heavy tasks.
Both are strong general-purpose flagships, so the right pick depends on your workload rather than a fixed quality ranking. If your tasks stretch past 200k tokens or lean heavily on code, GPT-4.1’s larger window is worth testing; for agentic and document-heavy flows, Claude Sonnet 4.5 is a frequent default. Because price does not predict which passes your real tasks, validate both on a representative sample before committing.
Updated 2026-08-18.
Price tells you what a model costs. It does not tell you whether it can replace your current model on your real tasks.
- Benchmarks measured on Harpd are planned — see /benchmarks/.