{"slug":"gpt-oss-20b","name":"gpt-oss-20b","family":"openai","family_name":"OpenAI","developer":"OpenAI","color":"#10a37f","status":"active","released":"2025-08-05","snapshot_of":null,"open":true,"context":131072,"max_output":117964,"knowledge_cutoff":"2024-06","modalities":["text"],"output_modalities":["text"],"reasoning":true,"tools":true,"structured_output":true,"huggingface":"openai/gpt-oss-20b","speed":117,"latency":0.61,"short":"Open-weights model from OpenAI and among the cheapest tested, with tool calling and reasoning mode. It ranks last of 114 on the intelligence index, so it suits cost-sensitive work rather than hard tasks.","strengths":["Blended price of $0.11 per million tokens, 6th cheapest of 194","Efficiency of 271 intelligence points per dollar, 9th of 194","Supports tool calling, structured output and reasoning mode","Open weights, 131k context window and six providers"],"weaknesses":["Intelligence index 28.5, last of 114 against a median of 59.5","Terminal-Bench 3.4%, last of 35; GPQA Diamond 60.8%, 92nd of 94","LMArena rating 1287.6, last of 114 against a median of 1437.6"],"best_for":"High-volume, simple text tasks where low cost matters more than accuracy, such as classification, extraction or routing with tool calls.","long":"gpt-oss-20b is an open-weights model from OpenAI, released August 2025. It takes text input only and offers a 131k context window, tool calling, structured output and a reasoning mode. Input costs $0.04 per million tokens and output $0.30 per million, a blended $0.11 against a registry median of $1.01, which ranks sixth cheapest of 194.\n\nCapability is the weak point. Its intelligence index is 28.5, last of 114 against a median of 59.5. It ranks near the bottom on every benchmark given, including 60.8% on GPQA Diamond (92nd of 94), 3.4% on Terminal-Bench (35th of 35) and 1287.6 on LMArena, last of 114.\n\nIt suits high-volume, simple work where cost dominates, and its ninth place on efficiency reflects that low price more than output quality. Six providers serve it, and it is available through the Gateway.","described":true,"gateway":true,"byok":true,"string":"gateway/doubleword:openai/gpt-oss-20b","input":0.04,"output":0.3,"cache_read":null,"blended":0.105,"efficiency":271.4,"bench":{"index":28.5,"gpqa":60.8,"aime":65.3,"terminal":3.4,"scicode":38.9,"lmarena":1287.6,"eci":134.9},"offers":[{"provider":"doubleword","name":"Doubleword","model_id":"openai/gpt-oss-20b","api":["openai"],"input":0.04,"output":0.3,"cache_read":null,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":null,"deprecated":false,"gateway":true,"gateway_route":"doubleword","byok":true,"string":null,"gateway_string":"gateway/doubleword:openai/gpt-oss-20b"},{"provider":"groq","name":"Groq","model_id":"openai/gpt-oss-20b","api":["openai"],"input":0.075,"output":0.3,"cache_read":0.0375,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":131072,"deprecated":false,"gateway":true,"gateway_route":"groq","byok":true,"string":"groq:openai/gpt-oss-20b","gateway_string":"gateway/groq:openai/gpt-oss-20b"},{"provider":"openrouter","name":"OpenRouter","model_id":"openai/gpt-oss-20b","api":["openai"],"input":0.03,"output":0.14,"cache_read":0.009,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":131072,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":"openrouter:openai/gpt-oss-20b","gateway_string":null},{"provider":"ovhcloud","name":"OVHcloud","model_id":"gpt-oss-20b","api":["openai"],"input":0.05,"output":0.18,"cache_read":null,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":131072,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":"ovhcloud:gpt-oss-20b","gateway_string":null},{"provider":"fireworks","name":"Fireworks","model_id":"gpt-oss-20b","api":["openai"],"input":0.07,"output":0.3,"cache_read":0.035,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":131072,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":"fireworks:gpt-oss-20b","gateway_string":null},{"provider":"cloudflare","name":"Cloudflare Workers AI","model_id":"@cf/openai/gpt-oss-20b","api":["openai"],"input":0.2,"output":0.3,"cache_read":null,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":128000,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":null,"gateway_string":null}],"ranks":{"intelligence":111,"popularity":51,"efficiency":9,"speed":30,"price":6},"top_score":0.6688,"about":["Open-weights model from OpenAI and among the cheapest tested, with tool calling and reasoning mode. It ranks last of 114 on the intelligence index, so it suits cost-sensitive work rather than hard tasks.","gpt-oss-20b is an open-weights model from OpenAI, released August 2025. It takes text input only and offers a 131k context window, tool calling, structured output and a reasoning mode. Input costs $0.04 per million tokens and output $0.30 per million, a blended $0.11 against a registry median of $1.01, which ranks sixth cheapest of 194.","Capability is the weak point. Its intelligence index is 28.5, last of 114 against a median of 59.5. It ranks near the bottom on every benchmark given, including 60.8% on GPQA Diamond (92nd of 94), 3.4% on Terminal-Bench (35th of 35) and 1287.6 on LMArena, last of 114.","It suits high-volume, simple work where cost dominates, and its ninth place on efficiency reflects that low price more than output quality. Six providers serve it, and it is available through the Gateway."],"examples":[{"file":"hello.py","lang":"python","code":"# /// script\n# dependencies = [\"pydantic-ai\"]\n# ///\nimport os\n\nfrom pydantic_ai import Agent\n\nos.environ['PYDANTIC_AI_GATEWAY_API_KEY'] = '...'\n\nagent = Agent('gateway/doubleword:openai/gpt-oss-20b', instructions='Be concise, reply with one sentence.')\n\nresult = agent.run_sync('Where does \"hello world\" come from?')\nprint(result.output)","soon":false},{"file":"structured_output.py","lang":"python","code":"# /// script\n# dependencies = [\"pydantic-ai\"]\n# ///\nimport os\n\nfrom pydantic import BaseModel\nfrom pydantic_ai import Agent\n\nos.environ['PYDANTIC_AI_GATEWAY_API_KEY'] = '...'\n\n\nclass CityLocation(BaseModel):\n    city: str\n    country: str\n\n\nagent = Agent('gateway/doubleword:openai/gpt-oss-20b', output_type=CityLocation)\n\nresult = agent.run_sync('Where were the olympics held in 2012?')\nprint(result.output)\n#> city='London' country='United Kingdom'","soon":false},{"file":"tools.py","lang":"python","code":"# /// script\n# dependencies = [\"pydantic-ai\"]\n# ///\nimport os\nimport random\n\nfrom pydantic_ai import Agent, RunContext\n\nos.environ['PYDANTIC_AI_GATEWAY_API_KEY'] = '...'\n\nagent = Agent(\n    'gateway/doubleword:openai/gpt-oss-20b',\n    deps_type=str,\n    instructions=\"You're a dice game, roll the die and see if it matches the user's guess.\",\n)\n\n\n@agent.tool_plain\ndef roll_dice() -> str:\n    \"\"\"Roll a six-sided die and return the result.\"\"\"\n    return str(random.randint(1, 6))\n\n\n@agent.tool\ndef get_player_name(ctx: RunContext[str]) -> str:\n    \"\"\"Get the player's name.\"\"\"\n    return ctx.deps\n\n\nresult = agent.run_sync('My guess is 4', deps='Anne')\nprint(result.output)","soon":false},{"file":"streaming.py","lang":"python","code":"# /// script\n# dependencies = [\"pydantic-ai\"]\n# ///\nimport asyncio\nimport os\n\nfrom pydantic_ai import Agent\n\nos.environ['PYDANTIC_AI_GATEWAY_API_KEY'] = '...'\n\nagent = Agent('gateway/doubleword:openai/gpt-oss-20b')\n\n\nasync def main():\n    async with agent.run_stream('Explain prompt caching in three bullet points.') as response:\n        async for text in response.stream_text(delta=True):\n            print(text, end='', flush=True)\n\n\nasyncio.run(main())","soon":false},{"file":"pax.sh","lang":"sh","code":"export PYDANTIC_AI_GATEWAY_API_KEY='...'\n\nuvx pax --model 'gateway/doubleword:openai/gpt-oss-20b'","soon":true},{"file":"codex.sh","lang":"sh","code":"# npm install -g @openai/codex\nexport PYDANTIC_AI_GATEWAY_API_KEY='...'\n\ncodex --model 'openai/gpt-oss-20b' \\\n  -c model_provider='gateway' \\\n  -c model_providers.gateway.name='Pydantic AI Gateway' \\\n  -c model_providers.gateway.base_url='https://gateway.pydantic.dev/proxy/doubleword/v1' \\\n  -c model_providers.gateway.env_key='PYDANTIC_AI_GATEWAY_API_KEY'","soon":false},{"file":"ai_sdk.ts","lang":"ts","code":"// npm install ai @ai-sdk/openai-compatible\nimport { createOpenAICompatible } from '@ai-sdk/openai-compatible'\nimport { generateText } from 'ai'\n\nprocess.env.PYDANTIC_AI_GATEWAY_API_KEY = '...'\n\nconst doubleword = createOpenAICompatible({\n  baseURL: 'https://gateway.pydantic.dev/proxy/doubleword',\n  apiKey: process.env.PYDANTIC_AI_GATEWAY_API_KEY,\n})\n\nconst { text } = await generateText({\n  model: doubleword('openai/gpt-oss-20b'),\n  system: 'Be concise, reply with one sentence.',\n  prompt: 'Where does \"hello world\" come from?',\n})\nconsole.log(text)","soon":false}],"benchmarks":[{"id":"index","name":"Intelligence index","unit":"","desc":"Our composite of the benchmarks below, 0-100","category":"reference","floor":0,"ceiling":100,"url":"/methodology/","credit":"Pydantic, from the sources credited below"},{"id":"gpqa","name":"GPQA Diamond","unit":"%","desc":"Graduate-level science questions, multiple choice","category":"reasoning","floor":25,"ceiling":97,"url":"https://epoch.ai/benchmarks/gpqa-diamond","credit":"Epoch AI (CC BY 4.0)"},{"id":"aime","name":"OTIS Mock AIME","unit":"%","desc":"Competition mathematics problems with exact answers","category":"reasoning","floor":0,"ceiling":100,"url":"https://epoch.ai/benchmarks/otis-mock-aime-2024-2025","credit":"Epoch AI (CC BY 4.0)"},{"id":"terminal","name":"Terminal-Bench","unit":"%","desc":"Tasks completed in a terminal; the best result of any agent using the model","category":"coding","floor":0,"ceiling":100,"url":"https://www.tbench.ai/leaderboard/terminal-bench/2.0","credit":"Terminal-Bench, via Epoch AI (CC BY 4.0)"},{"id":"scicode","name":"SciCode","unit":"%","desc":"Scientific programming problems written by researchers","category":"coding","floor":0,"ceiling":100,"url":"https://scicode-bench.github.io/","credit":"SciCode, via Epoch AI (CC BY 4.0)"},{"id":"lmarena","name":"LMArena text","unit":"","desc":"Rating from blind human votes between pairs of chat responses","category":"preference","floor":1100,"ceiling":1600,"url":"https://lmarena.ai/leaderboard/text","credit":"LMArena (CC BY 4.0)"},{"id":"eci","name":"Epoch Capabilities Index","unit":"","desc":"Epoch AI's own composite across about 40 benchmarks; shown for comparison, not part of our index","category":"reference","floor":80,"ceiling":180,"url":"https://epoch.ai/benchmarks/eci","credit":"Epoch AI (CC BY 4.0)"}],"generated":"2026-11-25","gaps":{"speed":3,"index":80,"description":0}}