Claude Sonnet 5 vs gpt-oss-20b
Claude Sonnet 5 (Anthropic, June 2026) and gpt-oss-20b (OpenAI, August 2025), compared on price, context window, access and specs. gpt-oss-20b is the cheaper API at $0.018 in and $0.09 out per million tokens, about 111× less than Claude Sonnet 5 on a typical 3:1 input-to-output mix. Claude Sonnet 5 reads more at once: a 1M-token context window against 131K. gpt-oss-20b has open weights, so you can also run it on your own hardware.
Updated 5 December 2026 · read each row across; the best value in a row is marked
At a glance
- Tasks
Language modeling
Language generation
Question answering
Language modeling
Language generation
Question answering
- Released
- 30 June 2026
- 5 August 2025
- Access
- API access
- Open weights (unrestricted)
- Country
- United States of America
- United States of America
Price and API
- Input, per 1M tokens
- $2.00on Anthropic
- $0.018on Hugging FaceLowest
- Output, per 1M tokens
- $10.00on Anthropic
- $0.09on Hugging FaceLowest
- Where to run it
- AnthropicGoogle Vertex AIAmazon BedrockAzure AI FoundryAll 5 providers
- Hugging FaceDeepInfraAmazon BedrockGroqAll 6 providersMost choice
- Official API id
anthropic/claude-sonnet-5- Not listed
- Context window
- 1M tokensLargest
- 131K tokens
- Max output
- 128K tokens
- 131K tokensLargest
- Takes
- Text, Image, PDF
- Text
- Returns
- Text
- Text
- Knowledge cutoff
- January 2026
- June 2024
- Supports
- ReasoningTool callingStructured outputFile input
- ReasoningTool callingStructured outputOpen weights
Scale and training
- Parameters
- Not listed
- 21B20,910,000,000
- Training compute
- Not listed
- 5.5 × 10²³ FLOP
- Training hardware
- Not listed
- NVIDIA H100 SXM5 80GB
- Training code
- Unreleased
- Not listed
- Confidence
- Confident
- Confident
Notes
- Parameters
- Not listed
- Total parameters: 20.91B
- Training compute
- Not listed
- "The training run for gpt-oss-120b required 2.1 million H100-hours to complete, with gpt-oss-20b needing almost 10x fewer" assuming "almost 10x fewer" means ~9x fewer: 4.94e24/9 = 5.49e23
- Dataset size
- Not listed
- (pretraining FLOPs)/(6*3.6B active parameters)
In their own words
- Abstract
Claude Sonnet 5 is built to be the most agentic Sonnet model yet. It can make plans, use tools like browsers and terminals, and run autonomously at a level that, just a few months ago, required larger and more expensive models. For many developers, the agentic AI era began with Sonnet-class models: Claude Sonnet 3.5, 3.6, and 3.7 were the first models that showed impressive skills in coding and tool use. More recently, though, the clearest gains in agentic capabilities have been in our Opus-class models. Sonnet 5 narrows the gap: its performance is close to that of Opus 4.8, but at lower prices. It’s a substantial improvement over its predecessor, Sonnet 4.6, on important aspects of agentic performance like reasoning, tool use, coding, and knowledge work:Read all
- Not listed
Which should you pick?
- High-volume or budget workloads
- gpt-oss-20b · Lowest list price: $0.018 in and $0.09 out per million tokens via Hugging Face.
- Long documents, codebases or transcripts
- Claude Sonnet 5 · 1M tokens of context, 7.6× more than gpt-oss-20b.
- Long answers in one response
- gpt-oss-20b · Up to 131K output tokens per response.
- Self-hosting or fine-tuning
- gpt-oss-20b · Open weights: you can download them and run them on your own GPUs.
- Reading images and screenshots
- Claude Sonnet 5 · Accepts image input through the API.
Questions people ask
Is Claude Sonnet 5 better than gpt-oss-20b?
It depends on the job. For high-volume or budget workloads, gpt-oss-20b has the edge: lowest list price: $0.018 in and $0.09 out per million tokens via Hugging Face. For long documents, codebases or transcripts, Claude Sonnet 5 has the edge: 1M tokens of context, 7.6× more than gpt-oss-20b. For long answers in one response, gpt-oss-20b has the edge: up to 131K output tokens per response. Try them on your own prompts in the AIPortalX playground before you commit.
Which is cheaper: Claude Sonnet 5 or gpt-oss-20b?
gpt-oss-20b: $0.018 in and $0.09 out per million tokens at Hugging Face. Claude Sonnet 5 starts at $2.00 in and $10.00 out per million tokens. These are list prices from the cheapest provider we track, and they change often.
Which has the bigger context window?
Claude Sonnet 5, with 1M tokens; gpt-oss-20b takes 131K. A larger window lets one request hold longer documents or conversations.
Where can I use Claude Sonnet 5 and gpt-oss-20b through one API?
Amazon Bedrock and OpenRouter serve all of them, so you can switch models without opening another account.
When were they released?
Claude Sonnet 5 in June 2026 and gpt-oss-20b in August 2025.