{"slug":"glm-5-turbo","name":"GLM 5 Turbo","family":"zai","family_name":"Z.ai","developer":"Z.ai","color":"#12b5cb","status":"active","released":"2026-03-16","snapshot_of":null,"open":false,"context":202752,"max_output":131072,"knowledge_cutoff":null,"modalities":["text"],"output_modalities":["text"],"reasoning":true,"tools":true,"structured_output":true,"huggingface":null,"speed":49,"latency":2.05,"short":"A closed-weight text model from Z.ai, released March 2026, with tool calling, reasoning mode and structured output. It has no benchmark results in the registry, so its profile rests on specifications and price.","strengths":["Context window of 202k tokens with up to 131k tokens of output","Supports tool calling, reasoning mode and structured output","Input at $1.20 and output at $4 per million tokens"],"weaknesses":["No benchmark results recorded, so capability cannot be compared","Blended price of $1.90 per million tokens sits above the registry median of about $1.01","Accepts text only and is served by just two providers"],"best_for":"Agents that need tool calling and structured output at a moderate price, where benchmark evidence is not a deciding factor.","long":"GLM 5 Turbo is a closed-weight model from Z.ai, released in March 2026. It accepts text only, and its specifications cover the needs of agent work: a context window of 202k tokens, output of up to 131k tokens, tool calling, reasoning mode and structured output. The registry holds no benchmark results for it, so no claim about its quality can be checked against other models, and a developer choosing it would need to test it directly on the intended task.\n\nPrice is the clearest measured fact. Input costs $1.20 per million tokens and output costs $4 per million, giving a blended rate of $1.90 per million tokens, above the registry median of about $1.01. It ranks 120th of 194 on price, which places it in the more expensive half of the registry. Its popularity rank is 153 of 194.\n\nThe model is available through Zhipu AI and OpenRouter. It is not built into the Pydantic AI Gateway, which does not count against it. No knowledge cutoff is recorded.","described":true,"gateway":false,"byok":true,"string":"openrouter:z-ai/glm-5-turbo","input":1.2,"output":4,"cache_read":0.24,"blended":1.9,"efficiency":null,"bench":{},"offers":[{"provider":"zhipuai","name":"Zhipu AI","model_id":"GLM-5-Turbo","api":["openai"],"input":0.69,"output":3.034,"cache_read":0.166,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":200000,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":null,"gateway_string":null},{"provider":"openrouter","name":"OpenRouter","model_id":"z-ai/glm-5-turbo","api":["openai"],"input":1.2,"output":4,"cache_read":0.24,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":202752,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":"openrouter:z-ai/glm-5-turbo","gateway_string":null}],"ranks":{"intelligence":null,"popularity":153,"efficiency":null,"speed":122,"price":120},"top_score":0.0881,"about":["A closed-weight text model from Z.ai, released March 2026, with tool calling, reasoning mode and structured output. It has no benchmark results in the registry, so its profile rests on specifications and price.","GLM 5 Turbo is a closed-weight model from Z.ai, released in March 2026. It accepts text only, and its specifications cover the needs of agent work: a context window of 202k tokens, output of up to 131k tokens, tool calling, reasoning mode and structured output. The registry holds no benchmark results for it, so no claim about its quality can be checked against other models, and a developer choosing it would need to test it directly on the intended task.","Price is the clearest measured fact. Input costs $1.20 per million tokens and output costs $4 per million, giving a blended rate of $1.90 per million tokens, above the registry median of about $1.01. It ranks 120th of 194 on price, which places it in the more expensive half of the registry. Its popularity rank is 153 of 194.","The model is available through Zhipu AI and OpenRouter. It is not built into the Pydantic AI Gateway, which does not count against it. No knowledge cutoff is recorded."],"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:z-ai/glm-5-turbo', 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:z-ai/glm-5-turbo', 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:z-ai/glm-5-turbo',\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:z-ai/glm-5-turbo')\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:z-ai/glm-5-turbo'","soon":true},{"file":"pi.sh","lang":"sh","code":"# npm install -g @earendil-works/pi-coding-agent\nexport OPENROUTER_API_KEY='...'\n\npi --model 'openrouter/z-ai/glm-5-turbo'","soon":false},{"file":"codex.sh","lang":"sh","code":"# npm install -g @openai/codex\nexport OPENROUTER_API_KEY='...'\n\ncodex --model 'z-ai/glm-5-turbo' \\\n  -c model_provider='openrouter' \\\n  -c model_providers.openrouter.name='Zhipu AI' \\\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('z-ai/glm-5-turbo'),\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}}