{"slug":"grok-4.20-multi-agent","name":"Grok 4.20 Multi-Agent","family":"xai","family_name":"xAI","developer":"xAI","color":"#5b6470","status":"active","released":"2026-03-31","snapshot_of":null,"open":false,"context":2000000,"max_output":1800000,"knowledge_cutoff":"2025-09","modalities":["text","image","file"],"output_modalities":["text"],"reasoning":true,"tools":false,"structured_output":true,"huggingface":null,"speed":493,"latency":13,"short":"A closed-weights, reasoning-capable model from xAI with a 2M-token context window, released March 2026. It has no benchmark results in the registry, so it is described by its specifications and price.","strengths":["2M-token context window, among the largest listed","Largest response of 1.8M tokens","Accepts text, image and file inputs","Supports structured output and reasoning mode"],"weaknesses":["No benchmark results, so capability is unmeasured in the registry","Tool calling is not supported","Blended price of $1.56 per million tokens, above the $1.01 median"],"best_for":"Long-document analysis and multimodal tasks that need structured output but do not require tool calling.","long":"Grok 4.20 Multi-Agent is a closed-weights model from xAI, released in March 2026, with a knowledge cutoff of September 2025. Its main feature is a 2M-token context window, and it accepts text, image and file inputs. It supports structured output and offers a reasoning mode.\n\nThe model does not support tool calling, which rules it out for agents that depend on function calls. It has no benchmark results in the registry, so its capability cannot be compared with other models here. It is available only through OpenRouter.\n\nPricing is $1.25 per million input tokens and $2.50 per million output tokens, a blended price of about $1.56 against a registry median of about $1.01. It ranks 113 of 194 on price and 173 of 194 on popularity.","described":true,"gateway":false,"byok":true,"string":"openrouter:x-ai/grok-4.20-multi-agent","input":1.25,"output":2.5,"cache_read":0.2,"blended":1.5625,"efficiency":null,"bench":{},"offers":[{"provider":"openrouter","name":"OpenRouter","model_id":"x-ai/grok-4.20-multi-agent","api":["openai"],"input":1.25,"output":2.5,"cache_read":0.2,"cache_write":null,"input_tiers":[{"start":200000,"price":2.5}],"output_tiers":[{"start":200000,"price":5}],"context":2000000,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":"openrouter:x-ai/grok-4.20-multi-agent","gateway_string":null}],"ranks":{"intelligence":null,"popularity":173,"efficiency":null,"speed":1,"price":113},"top_score":0.0405,"about":["A closed-weights, reasoning-capable model from xAI with a 2M-token context window, released March 2026. It has no benchmark results in the registry, so it is described by its specifications and price.","Grok 4.20 Multi-Agent is a closed-weights model from xAI, released in March 2026, with a knowledge cutoff of September 2025. Its main feature is a 2M-token context window, and it accepts text, image and file inputs. It supports structured output and offers a reasoning mode.","The model does not support tool calling, which rules it out for agents that depend on function calls. It has no benchmark results in the registry, so its capability cannot be compared with other models here. It is available only through OpenRouter.","Pricing is $1.25 per million input tokens and $2.50 per million output tokens, a blended price of about $1.56 against a registry median of about $1.01. It ranks 113 of 194 on price and 173 of 194 on popularity."],"examples":[{"file":"hello.py","lang":"python","code":"# /// script\n# dependencies = [\"pydantic-ai\"]\n# ///\nimport os\n\nfrom pydantic_ai import Agent\n\nos.environ['OPENROUTER_API_KEY'] = '...'\n\nagent = Agent('openrouter:x-ai/grok-4.20-multi-agent', 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['OPENROUTER_API_KEY'] = '...'\n\n\nclass CityLocation(BaseModel):\n    city: str\n    country: str\n\n\nagent = Agent('openrouter:x-ai/grok-4.20-multi-agent', 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['OPENROUTER_API_KEY'] = '...'\n\nagent = Agent(\n    'openrouter:x-ai/grok-4.20-multi-agent',\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['OPENROUTER_API_KEY'] = '...'\n\nagent = Agent('openrouter:x-ai/grok-4.20-multi-agent')\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 OPENROUTER_API_KEY='...'\n\nuvx pax --model 'openrouter:x-ai/grok-4.20-multi-agent'","soon":true},{"file":"pi.sh","lang":"sh","code":"# npm install -g @earendil-works/pi-coding-agent\nexport OPENROUTER_API_KEY='...'\n\npi --model 'openrouter/x-ai/grok-4.20-multi-agent'","soon":false},{"file":"codex.sh","lang":"sh","code":"# npm install -g @openai/codex\nexport OPENROUTER_API_KEY='...'\n\ncodex --model 'x-ai/grok-4.20-multi-agent' \\\n  -c model_provider='openrouter' \\\n  -c model_providers.openrouter.name='OpenRouter' \\\n  -c model_providers.openrouter.base_url='https://api.openrouter.example/v1' \\\n  -c model_providers.openrouter.env_key='OPENROUTER_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.OPENROUTER_API_KEY = '...'\n\nconst openrouter = createOpenAICompatible({\n  name: 'openrouter',\n  baseURL: 'https://api.openrouter.example/v1',\n  apiKey: process.env.OPENROUTER_API_KEY,\n})\n\nconst { text } = await generateText({\n  model: openrouter('x-ai/grok-4.20-multi-agent'),\n  system: 'Be concise, reply with one sentence.',\n  prompt: 'Where does \"hello world\" come from?',\n})\nconsole.log(text)","soon":false}],"benchmarks":[],"generated":"2026-11-25","gaps":{"speed":3,"index":80,"description":0}}