{"slug":"claude-opus-4.1","name":"Claude Opus 4.1","family":"claude","family_name":"Claude","developer":"Anthropic","color":"#d97757","status":"active","released":"2025-08-05","snapshot_of":null,"open":false,"context":200000,"max_output":32000,"knowledge_cutoff":"2025-03","modalities":["text","image","file"],"output_modalities":["text"],"reasoning":true,"tools":true,"structured_output":false,"huggingface":null,"speed":20,"latency":3.29,"short":"Closed model from Anthropic, released August 2025, with reasoning mode and tool calling. Benchmark scores mostly trail the registry median, and its price is among the highest.","strengths":["200k context window and 32k maximum response length","Accepts text, image and file input","Supports tool calling and reasoning mode","Available via Anthropic and AWS Bedrock, and built into the Gateway"],"weaknesses":["Intelligence index 47.7, 92nd of 114 models tested","FrontierMath score of 12.6%, last of 80 tested","Blended price of $30 per million tokens, 185th of 194 on price"],"best_for":"Agents that need tool calling and image or file input, where a high price is acceptable.","long":"Claude Opus 4.1 is a closed-weight model from Anthropic, released August 2025. It has a 200k context window, a 32k response limit, and accepts text, image and file input. It supports tool calling and reasoning mode but not structured output. It is available through Anthropic and AWS Bedrock and is built into the Pydantic AI Gateway.\n\nBenchmark results generally sit below the registry median. Its intelligence index of 47.7 ranks 92nd of 114 against a median of 59.5, and it scores 12.6% on FrontierMath, last of 80 tested. Results on SWE-bench Verified and Terminal-Bench are close to the median but still slightly under it.\n\nPrice is the main cost. At $15 per million input tokens and $75 per million output tokens, its blended price is $30, ranking 185th of 194 on price. A team choosing it would pay a premium for scores that the registry places mostly below the median.","described":true,"gateway":true,"byok":true,"string":"gateway/anthropic:claude-opus-4-1","input":15,"output":75,"cache_read":1.5,"blended":30,"efficiency":1.6,"bench":{"index":47.7,"gpqa":77.3,"aime":68.9,"frontiermath":12.6,"swe":73.3,"terminal":38,"webdev":1389,"lmarena":1418.5,"eci":144.8},"offers":[{"provider":"anthropic","name":"Anthropic","model_id":"claude-opus-4-1","api":["anthropic"],"input":15,"output":75,"cache_read":1.5,"cache_write":18.75,"input_tiers":[],"output_tiers":[],"context":200000,"deprecated":false,"gateway":true,"gateway_route":"anthropic","byok":true,"string":"anthropic:claude-opus-4-1","gateway_string":"gateway/anthropic:claude-opus-4-1"},{"provider":"aws","name":"AWS Bedrock","model_id":"regional.anthropic.claude-opus-4-1-20250805-v1:0","api":["anthropic","bedrock-converse"],"input":15,"output":75,"cache_read":1.5,"cache_write":18.75,"input_tiers":[],"output_tiers":[],"context":200000,"deprecated":false,"gateway":true,"gateway_route":"bedrock","byok":true,"string":"bedrock:regional.anthropic.claude-opus-4-1-20250805-v1:0","gateway_string":"gateway/bedrock:regional.anthropic.claude-opus-4-1-20250805-v1:0"}],"ranks":{"intelligence":89,"popularity":180,"efficiency":110,"speed":176,"price":185},"top_score":0.2955,"about":["Closed model from Anthropic, released August 2025, with reasoning mode and tool calling. Benchmark scores mostly trail the registry median, and its price is among the highest.","Claude Opus 4.1 is a closed-weight model from Anthropic, released August 2025. It has a 200k context window, a 32k response limit, and accepts text, image and file input. It supports tool calling and reasoning mode but not structured output. It is available through Anthropic and AWS Bedrock and is built into the Pydantic AI Gateway.","Benchmark results generally sit below the registry median. Its intelligence index of 47.7 ranks 92nd of 114 against a median of 59.5, and it scores 12.6% on FrontierMath, last of 80 tested. Results on SWE-bench Verified and Terminal-Bench are close to the median but still slightly under it.","Price is the main cost. At $15 per million input tokens and $75 per million output tokens, its blended price is $30, ranking 185th of 194 on price. A team choosing it would pay a premium for scores that the registry places mostly below the median."],"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/anthropic:claude-opus-4-1', 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/anthropic:claude-opus-4-1', 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/anthropic:claude-opus-4-1',\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/anthropic:claude-opus-4-1')\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/anthropic:claude-opus-4-1'","soon":true},{"file":"pi.sh","lang":"sh","code":"# npm install -g @earendil-works/pi-coding-agent\nexport PYDANTIC_AI_GATEWAY_API_KEY='...'\n\n# pi has no built-in Gateway provider, so register one.\n# Merge this by hand if you already have a models.json.\nmkdir -p ~/.pi/agent\ncat > ~/.pi/agent/models.json <<'EOF'\n{\n  \"providers\": {\n    \"pydantic-ai-gateway\": {\n      \"baseUrl\": \"https://gateway.pydantic.dev/proxy/anthropic\",\n      \"api\": \"anthropic-messages\",\n      \"apiKey\": \"$PYDANTIC_AI_GATEWAY_API_KEY\",\n      \"models\": [\n        {\n          \"id\": \"claude-opus-4-1\"\n        }\n      ]\n    }\n  }\n}\nEOF\n\npi --provider pydantic-ai-gateway --model 'claude-opus-4-1'","soon":false},{"file":"cc.sh","lang":"sh","code":"# npm install -g @anthropic-ai/claude-code\nexport PYDANTIC_AI_GATEWAY_API_KEY='...'\nexport ANTHROPIC_BASE_URL='https://gateway.pydantic.dev/proxy/anthropic'\nexport ANTHROPIC_AUTH_TOKEN=\"$PYDANTIC_AI_GATEWAY_API_KEY\"\n\nclaude --model 'claude-opus-4-1'","soon":false},{"file":"ai_sdk.ts","lang":"ts","code":"// npm install ai @ai-sdk/anthropic\nimport { createAnthropic } from '@ai-sdk/anthropic'\nimport { generateText } from 'ai'\n\nprocess.env.PYDANTIC_AI_GATEWAY_API_KEY = '...'\n\nconst anthropic = createAnthropic({\n  baseURL: 'https://gateway.pydantic.dev/proxy/anthropic',\n  apiKey: process.env.PYDANTIC_AI_GATEWAY_API_KEY,\n})\n\nconst { text } = await generateText({\n  model: anthropic('claude-opus-4-1'),\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":"frontiermath","name":"FrontierMath","unit":"%","desc":"Original research-level mathematics problems, tiers 1 to 3","category":"reasoning","floor":0,"ceiling":95,"url":"https://epoch.ai/frontiermath","credit":"Epoch AI (CC BY 4.0)"},{"id":"swe","name":"SWE-bench Verified","unit":"%","desc":"Real GitHub issues resolved, run by Epoch with one fixed scaffold","category":"coding","floor":0,"ceiling":100,"url":"https://epoch.ai/benchmarks/swe-bench-verified","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":"webdev","name":"WebDev Arena","unit":"","desc":"Rating from human votes on web apps the models built","category":"coding","floor":1000,"ceiling":1900,"url":"https://web.lmarena.ai/leaderboard","credit":"LMArena, 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}}