{"slug":"glm-4.5-air","name":"GLM 4.5 Air","family":"zai","family_name":"Z.ai","developer":"Z.ai","color":"#12b5cb","status":"active","released":"2025-07-28","snapshot_of":null,"open":true,"context":128000,"max_output":98304,"knowledge_cutoff":"2025-04","modalities":["text"],"output_modalities":["text"],"reasoning":true,"tools":true,"structured_output":false,"huggingface":"zai-org/GLM-4.5-Air","speed":60,"latency":0.85,"short":"Open-weights text model from Z.ai in the budget tier, with tool calling and reasoning mode. Its standout is a low price, with a blended rate well under the registry median.","strengths":["Blended price of $0.43 per million tokens, below the $1.01 median","Open weights, with tool calling and reasoning mode supported","128k context window and up to 98k response tokens","Available from four providers, including Z.ai and OpenRouter"],"weaknesses":["LMArena text score of 1383.6, 102nd of 114, below median 1437.6","No structured output support","Popularity rank 158th of 194"],"best_for":"Cost-sensitive agents that need tool calling on text-only tasks, tested against their own workloads first.","long":"GLM 4.5 Air is an open-weights text model from Z.ai, released July 2025, with a 128k context window, tool calling and reasoning mode. Its main draw is price: $0.20 per million input tokens and $1.10 per million output, a blended $0.43 against a registry median of $1.01.\n\nBenchmark evidence is thin. Its only result is LMArena text, where it scores 1383.6 and ranks 102nd of 114, below the median of 1437.6. No intelligence or value rank is available, so the choice rests mainly on specifications and price. It does not support structured output.\n\nIt is offered by four providers, including Z.ai, Zhipu AI, Novita and OpenRouter. Its popularity rank is 158th of 194. Teams needing a low-cost open model with tool calling should test it on their own tasks.","described":true,"gateway":false,"byok":true,"string":"zai:GLM-4.5-Air","input":0.2,"output":1.1,"cache_read":0.03,"blended":0.425,"efficiency":null,"bench":{"lmarena":1383.6},"offers":[{"provider":"zai","name":"Z.ai","model_id":"GLM-4.5-Air","api":["openai"],"input":0.2,"output":1.1,"cache_read":0.03,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":null,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":"zai:GLM-4.5-Air","gateway_string":null},{"provider":"zhipuai","name":"Zhipu AI","model_id":"GLM-4.5-Air","api":["openai"],"input":0.11,"output":0.276,"cache_read":0.022,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":128000,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":null,"gateway_string":null},{"provider":"novita","name":"Novita","model_id":"zai-org/glm-4.5-air","api":["openai"],"input":0.13,"output":0.85,"cache_read":0.025,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":131072,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":null,"gateway_string":null},{"provider":"openrouter","name":"OpenRouter","model_id":"z-ai/glm-4.5-air","api":["openai"],"input":0.2,"output":1.1,"cache_read":0.03,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":131072,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":"openrouter:z-ai/glm-4.5-air","gateway_string":null}],"ranks":{"intelligence":null,"popularity":158,"efficiency":null,"speed":105,"price":52},"top_score":0.0762,"about":["Open-weights text model from Z.ai in the budget tier, with tool calling and reasoning mode. Its standout is a low price, with a blended rate well under the registry median.","GLM 4.5 Air is an open-weights text model from Z.ai, released July 2025, with a 128k context window, tool calling and reasoning mode. Its main draw is price: $0.20 per million input tokens and $1.10 per million output, a blended $0.43 against a registry median of $1.01.","Benchmark evidence is thin. Its only result is LMArena text, where it scores 1383.6 and ranks 102nd of 114, below the median of 1437.6. No intelligence or value rank is available, so the choice rests mainly on specifications and price. It does not support structured output.","It is offered by four providers, including Z.ai, Zhipu AI, Novita and OpenRouter. Its popularity rank is 158th of 194. Teams needing a low-cost open model with tool calling should test it on their own tasks."],"examples":[{"file":"hello.py","lang":"python","code":"# /// script\n# dependencies = [\"pydantic-ai\"]\n# ///\nimport os\n\nfrom pydantic_ai import Agent\n\nos.environ['ZAI_API_KEY'] = '...'\n\nagent = Agent('zai:GLM-4.5-Air', 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['ZAI_API_KEY'] = '...'\n\n\nclass CityLocation(BaseModel):\n    city: str\n    country: str\n\n\nagent = Agent('zai:GLM-4.5-Air', 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['ZAI_API_KEY'] = '...'\n\nagent = Agent(\n    'zai:GLM-4.5-Air',\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['ZAI_API_KEY'] = '...'\n\nagent = Agent('zai:GLM-4.5-Air')\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 ZAI_API_KEY='...'\n\nuvx pax --model 'zai:GLM-4.5-Air'","soon":true},{"file":"pi.sh","lang":"sh","code":"# npm install -g @earendil-works/pi-coding-agent\nexport ZAI_API_KEY='...'\n\npi --model 'zai/GLM-4.5-Air'","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.ZAI_API_KEY = '...'\n\nconst zai = createOpenAICompatible({\n  name: 'zai',\n  baseURL: 'https://api.zai.example/v1',\n  apiKey: process.env.ZAI_API_KEY,\n})\n\nconst { text } = await generateText({\n  model: zai('GLM-4.5-Air'),\n  system: 'Be concise, reply with one sentence.',\n  prompt: 'Where does \"hello world\" come from?',\n})\nconsole.log(text)","soon":false}],"benchmarks":[{"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)"}],"generated":"2026-11-25","gaps":{"speed":3,"index":80,"description":0}}