Back to Models

GPT OSS 20B

openaiopenai/gpt-oss-20b

OpenAI's open-source 20B model with hybrid reasoning, extended thinking, efficient code generation, agentic search, and tool use. Cost-effective alternative to the 120B variant.

GPT OSS 20B is the smaller sibling of OpenAI's first open-weight language model family since GPT-2, released in August 2025 under the Apache 2.0 license. It is a 21B-parameter Mixture-of-Experts (MoE) transformer that activates only 3.6B parameters per forward pass, making it deployable on devices with as little as 16GB of memory β€” including edge hardware and consumer laptops. Despite its compact size, it was post-trained with the same chain-of-thought reinforcement learning pipeline as the 120B variant, delivering configurable reasoning effort (low / medium / high), full CoT visibility, tool use, and Structured Outputs.

In production, GPT OSS 20B is ideal for edge scenarios, on-device AI, and rapid iteration workflows where GPU budget is limited or latency must be minimized. It matches or exceeds OpenAI o3-mini on most benchmarks, often outperforming it on competition mathematics and health-related reasoning β€” remarkable for a 21B total / 3.6B active parameter model. Through TheRouter, you can access it via a managed OpenAI-compatible API without self-hosting; alternatively, the Apache 2.0 license lets you download, fine-tune, and deploy it entirely on your own infrastructure.

Best for
  • β€’ Edge and local inference β€” runs on 16GB devices including laptops, edge servers, and single-board computers.
  • β€’ Cost-sensitive agentic workflows β€” tool use, function calling, and agent loops at a fraction of the cost of larger frontier models.
  • β€’ Rapid prototyping and iteration β€” fast CoT with low reasoning effort, ideal for debugging prompts and agent orchestration before scaling up.
  • β€’ On-device customization β€” Apache 2.0 license permits unfettered fine-tuning and commercial deployment.
Reach for something else if
  • β€’ High-complexity reasoning under one shot β€” for tasks requiring sustained deep reasoning (e.g., hard HLE problems), prefer gpt-oss-120b in high reasoning mode.
  • β€’ Multimodal tasks β€” this is a text-only model. For vision or audio, use GPT-4o or GPT-4o-mini via TheRouter.
  • β€’ Latency-critical high-throughput APIs β€” the medium/high reasoning modes still produce CoT traces; for bare-minimum latency, pair low reasoning effort with Mistral Small 4 or GPT-4.1 Nano via TheRouter.
Context Length
128K
Max Output
16K
Input Priceper 1M tokens
$0.0756/ 1M tokens
Output Priceper 1M tokens
$0.324/ 1M tokens

Modalities

text→text

Pricing Breakdown

TypeRate
Input$0.0756 / 1M tokens
Output$0.324 / 1M tokens

Supported Parameters

temperaturemax_tokenstop_ptoolstool_choiceresponse_formatreasoningstop

Specifications

Release date2025-08-05openai.com β†—verified
ArchitectureMoE Transformer β€” 24 layers, 32 experts, top-4 active, 21B total / 3.6B active paramsopenai.com β†—verified
LicenseApache 2.0openai.com β†—verified
Knowledge cutoffJune 2024arxiv.org β†—verified
Tokenizero200k_harmony (201,088 tokens)arxiv.org β†—verified
Minimum memory16 GB (consumer edge device deployment)openai.com β†—verified
QuantizationMXFP4 (4.25 bits/param on MoE weights)arxiv.org β†—verified
Checkpoint size12.8 GiBhuggingface.co β†—verified
Reasoning modeslow / medium / high (configurable in system prompt)openai.com β†—verified

Benchmarks

BenchmarkDistributionScoreSource
MMLU
High reasoning mode
85.3%%arxiv.org β†—
AIME 2024
With tools, high reasoning mode
96.0%%arxiv.org β†—
AIME 2025
With tools, high reasoning mode
98.7%%arxiv.org β†—
Codeforces Elo
Estimated Elo rating; high reasoning mode with terminal tool
~2516openai.com β†—
SWE-Bench Verified
High reasoning mode
60.7%%arxiv.org β†—
GPQA Diamond
With tools, high reasoning mode
71.5%%arxiv.org β†—
HLE
With tools, high reasoning mode. HLE is an extremely difficult benchmark.
17.3%%arxiv.org β†—
HealthBench
High reasoning mode. Outperforms o3-mini on health-related reasoning despite smaller size.
42.5%%arxiv.org β†—
Tau-Bench Retail
High reasoning mode β€” agentic function calling evaluation
54.8%%arxiv.org β†—

API Usage Examples

Use the global api.therouter.ai endpoint shown below for new integrations; the legacy China accelerated endpoint is retired.

cURL
curl https://api.therouter.ai/v1/chat/completions   -H "Content-Type: application/json"   -H "Authorization: Bearer $THE_ROUTER_API_KEY"   -d '{
    "model": "openai/gpt-oss-20b",
    "messages": [
      {"role": "user", "content": "Summarize the key points from this input."}
    ]
  }'

Chat completion

Use standard OpenAI-compatible chat completion via TheRouter. The model uses the harmony chat format; TheRouter handles the conversion automatically.

cURL
curl https://api.therouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $THEROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-oss-20b",
    "messages": [
      {"role": "user", "content": "What makes Mixture-of-Experts models efficient for edge deployment?"}
    ]
  }'

More from openai

Similar models

Cross-provider sibling models

Frequently asked

Can I use GPT OSS 20B through TheRouter's API without self-hosting?

Yes. TheRouter routes requests to gpt-oss-20b through its managed infrastructure. You access the open-weight model via a standard OpenAI-compatible API at https://api.therouter.ai/v1, without managing your own GPU hardware. The 20B variant is particularly well-suited for rapid iteration and edge-scale workloads.

re-authored by TheRouteropenai.com β†—
What license does GPT OSS 20B use?

Apache 2.0 β€” a permissive license that allows commercial use, modification, distribution, and sublicensing without copyleft restrictions or patent risk.

re-authored by TheRouteropenai.com β†—
How does GPT OSS 20B compare to GPT OSS 120B?

GPT OSS 20B is the smaller (21B total / 3.6B active) sibling of the 120B (117B total / 5.1B active). It runs on as little as 16GB memory instead of 80GB, while the 120B achieves higher scores on hard reasoning benchmarks (HLE, HealthBench) and agentic evaluations (Tau-Bench). The 20B still matches or exceeds o3-mini on most benchmarks β€” a strong tradeoff for edge deployment and cost-sensitive workloads.

re-authored by TheRouteropenai.com β†—
What hardware do I need to self-host GPT OSS 20B?

A device with 16GB of memory β€” such as an NVIDIA RTX 4060/4070, an Apple Mac with M-series chip and 16GB unified memory, or an edge server GPU. The quantized checkpoint is 12.8 GiB. With MXFP4 quantization and MoE architecture, only 3.6B parameters are active per forward pass, enabling efficient local inference on consumer hardware.

re-authored by TheRoutergithub.com β†—
Fact ledger β€” every claim on this page traces here
sourceURLretrieved
Release dateopenai.com β†—2026-05-29verified
Architectureopenai.com β†—2026-05-29verified
Licenseopenai.com β†—2026-05-29verified
Knowledge cutoffarxiv.org β†—2026-05-29verified
Tokenizerarxiv.org β†—2026-05-29verified
Minimum memoryopenai.com β†—2026-05-29verified
Quantizationarxiv.org β†—2026-05-29verified
Checkpoint sizehuggingface.co β†—2026-05-29verified
Reasoning modesopenai.com β†—2026-05-29verified
MMLUarxiv.org β†—2026-05-29verified
AIME 2024arxiv.org β†—2026-05-29verified
AIME 2025arxiv.org β†—2026-05-29verified
Codeforces Eloopenai.com β†—2026-05-29to verify
SWE-Bench Verifiedarxiv.org β†—2026-05-29verified
GPQA Diamondarxiv.org β†—2026-05-29verified
HLEarxiv.org β†—2026-05-29verified
HealthBencharxiv.org β†—2026-05-29verified
Tau-Bench Retailarxiv.org β†—2026-05-29verified
Can I use GPT OSS 20B through TheRouter's API without self-hosting?openai.com β†—2026-05-29to verify
What license does GPT OSS 20B use?openai.com β†—2026-05-29to verify
How does GPT OSS 20B compare to GPT OSS 120B?openai.com β†—2026-05-29to verify
What hardware do I need to self-host GPT OSS 20B?github.com β†—2026-05-29to verify
Help & contact