DeepInfra raises $107M Series B to scale the inference cloud — read the announcement

GLM-5.2 Pricing, Benchmarks, and Cost Comparison

Published on 2026.07.01 by DeepInfra
GLM-5.2 Pricing, Benchmarks, and Cost Comparison

Updated November 2026.

If you care about long-context reasoning but don’t want to lock yourself into a closed model, GLM 5.2 is worth attention for one simple reason: it pairs a 1M-token context window with open weights, MIT licensing, and a real provider market instead of a single take-it-or-leave-it endpoint. That makes it unusually relevant for teams doing cost tuning, provider failover, or self-hosting evaluations right now.

GLM 5.2 is a reasoning model from Z.ai, released on June 16, 2026. Across the research, it appears as GLM-5.2, GLM-5.2 (max), and provider slugs like z-ai/glm-5.2 or zai-org/GLM-5.2, but the core picture is consistent: this is a text-in, text-out Mixture-of-Experts model with 753B total parameters, 40B active parameters per token, and a 1M-token context window. It is open weight, commercially usable under the MIT license, and available both through hosted APIs and public model weights. The GLM-5.2 model card on DeepInfra also positions it as the first GLM release to bring long-horizon capability to a “solid” 1M-token context, with English and Chinese support and production-friendly features like JSON output and function calling.

What makes GLM 5.2 stand out is not that it is the cheapest model overall — it isn’t — but that it combines strong benchmark performance with unusually broad deployment flexibility. Artificial Analysis now marks GLM-5.2 as deprecated and recommends GLM-5.3, so it no longer shows a current Intelligence Index score for it. DeepInfra’s benchmark tables also show it holding up credibly against models like Qwen3.7-Max, MiniMax M3, DeepSeek-V4-Pro, Claude Opus 4.8, GPT-5.5, and Gemini 3.1 Pro across reasoning, coding, and agentic tasks. On raw economics, provider choice matters: OpenRouter lists GLM-5.2 from more than 20 providers, with output prices from $1.80 to $8.00 per million tokens (as of 2026-11-17). For how it prices per completed task against Claude, see our comparison of GLM 5.2 vs Claude Opus 4.8 cost per task.

For developers and ML teams, that nuance is the real story. GLM 5.2 looks strongest when you need long-running agent workflows, project-scale coding, tool use, or document-heavy pipelines where a 1M-token window actually changes system design. It also looks more practical than many benchmark-only contenders because integration paths are already clear: OpenRouter exposes an OpenAI-compatible API with routing modes and reasoning controls, while DeepInfra offers both public and private endpoint deployment.

Newer: GLM-5.3. Z.ai has released GLM-5.3, and Artificial Analysis now recommends it over GLM-5.2. GLM-5.2 remains available on DeepInfra. See the GLM-5.3 pricing guide.

GLM 5.2 Executive Summary

GLM 5.2 sits in an interesting pricing tier. On DeepInfra it costs $0.5625 per 1M input tokens, $1.80 per 1M output tokens and $0.105 per 1M cached input at promotional pricing (25% off a $0.75 / $2.40 / $0.14 list price, no published end date), with Flex at $0.45 / $1.44 and Priority at $0.84375 / $2.70. Pricing as of 2026-11-17. That is the second-lowest price on Artificial Analysis, after Multiverse Computing, and the lowest listed non-Flex output price on OpenRouter, where more than 20 providers list output from $1.80 to $8.00. It is best suited for teams that need open-weight reasoning, long-context coding or agent workflows, and enough provider choice to optimize for cost, latency, or deployment control rather than accepting a single default.

Best ForProviderWhy
RAG, document-heavy, or high-throughput use casesDeepInfra StandardCombines 1M-context access with $0.5625 / $1.80 promotional pricing (list $0.75 / $2.40), $0.105 cached input, JSON and function calling support, and up to 163,840 output tokens per request.
Production workloads needing more predictable service tieringDeepInfra PriorityDeepInfra offers a Priority tier with a clear 1.5× pricing model ($0.84375 / $2.70 per 1M), useful if you want the same model and interface with a higher service tier instead of changing providers.
Lowest price / cost-sensitive workloadsDeepInfra StandardSecond-lowest input, output and blended price on Artificial Analysis (after Multiverse Computing, $0.17 / $0.54), with a 0.0% error rate, and the lowest listed non-Flex output price on OpenRouter ($1.80).
Easiest onboarding / fastest time-to-first-callOpenRouterOpenAI-compatible API for z-ai/glm-5.2, supporting routing modes, streaming, and reasoning controls across OpenAI, Anthropic Messages, and Responses-style integrations.
Managed model access with broad provider choiceOpenRouter Exacto or Balanced routingExposes more than 20 providers for the same model, so you can optimize for fixed-provider consistency with Exacto or let routing balance price and speed automatically.
Batch and async workloadsDeepInfra Flex$0.45 input / $1.44 output / $0.084 cached per 1M, 20% below Standard, for requests that can wait up to 10 minutes for capacity.
Fastest responsesCoreWeave or Databricks214.2 and 222.8 output tokens per second on Artificial Analysis; CoreWeave also prices near the floor at $0.62 / $2.42.

Understanding Tokens and How You’re Charged

GLM 5.2 is still billed the usual way: by tokens in, tokens out, and sometimes cached tokens if your provider can reuse prompt prefixes. The catch is that this model has a 1M-token context window and a reasoning-oriented output style, so small pricing differences can turn into real money fast.

Token typeWhat it isWhy it matters
Input tokensEverything you send to the model: system prompt, user prompt, tool schemas, retrieved docs, chat historyThis is where long-context apps get expensive. With GLM 5.2, it is easy to send more context than intended.
Output tokensEverything the model generates backReasoning models can be wordy. GLM 5.2 was described as somewhat verbose in evaluation, so output spend can creep up even when input pricing looks fine.
Cached input tokensReused prompt tokens that the provider can bill at a lower cache-hit rateThis is the main lever for making repeated workflows affordable. Large static prefixes, agent instructions, and stable RAG scaffolding benefit the most.
  • Input tokens are usually the first cost people notice. For GLM 5.2, they matter more because the whole point of the model is long-horizon work. If you dump huge documents, repo context, tool definitions, and conversation history into every call, your bill will reflect that.
  • Output tokens are where reasoning workloads bite back. On OpenRouter, listed output prices run from $1.80 to $8.00 per 1M tokens (as of 2026-11-17). If your app allows long free-form reasoning or large structured outputs, output pricing matters as much as input pricing.
  • Cached input tokens are the part people forget to model. Cache hits cost $0.105 per 1M tokens on DeepInfra Standard ($0.084 on Flex) — a big discount versus normal input pricing. If your prompts share a large stable prefix, caching can matter more than the headline input rate.
  • Reasoning effort settings can indirectly affect token cost. On DeepInfra, reasoning_effort accepts none, minimal, low, medium, high, xhigh or max, and “none” turns thinking off. More reasoning usually means more generated tokens and longer responses — if you only need classification, extraction, or short code edits, paying for maximum thinking burns budget for no reason.
  • The 1M-token context window is a capability, not a budgeting strategy. It’s great when it changes system design, and a good way to accidentally turn a cheap request into an expensive one. For many production flows, the right move is still trimming history, compressing retrieval, and caching the stable parts.

Provider Token Cost Advantages and Tradeoffs

The good news is that GLM 5.2 has an actual provider market. The bad news is that the cheapest listed rate is not always the cheapest real rate once caching, latency, uptime, and output pricing start doing their thing.

Provider / routeBase token pricingAdvantageDownside
DeepInfra Standard$0.5625 input / $1.80 output / $0.105 cached input (promotional; list $0.75 / $2.40 / $0.14)Second-lowest input, output and blended price on Artificial Analysis, after Multiverse Computing, with a 0.0% error rate; lowest listed non-Flex output price on OpenRouter. Good fit for repeated prompts, RAG templates, and agent loops with stable prefixes.Promotional rate with no published end date; budget against list price if you are planning far ahead.
DeepInfra Flex$0.45 input / $1.44 output / $0.084 cached input0.8× Standard for the same model and API. A request Flex can’t place is not charged.Waits up to 10 minutes for capacity, then returns HTTP 429. Not for interactive traffic.
DeepInfra Priority$0.84375 input / $2.70 output / $0.1575 cached inputPredictable premium: exactly 1.5× Standard pricing. Useful when you want a higher service tier without reworking integrations or routing logic.You are paying a clear surcharge on every token. Only makes sense if service tiering matters more than raw token efficiency.
NovitaAI via OpenRouter$0.6496 / $2.0416 / $0.1206A low-cost OpenRouter route close to DeepInfra’s price.Slightly above DeepInfra’s promotional rate on input, output and cached input.
Multiverse Computing (CompactifAI)$0.17 / $0.54 / $0.015Lowest price on Artificial Analysis for GLM-5.2.Served through Multiverse’s CompactifAI; evaluate output quality on your own tasks before switching.
Z.ai via OpenRouter$1.40 input / $4.40 output / $0.26 cached inputFirst-party route, and the price most providers on Artificial Analysis match. Useful if you want Z.ai’s own endpoint.More expensive than the lowest-cost providers on both input and output. Hard to justify for cost-sensitive bulk inference.
CoreWeave$0.62 / $2.42 / $0.14One of the fastest providers on Artificial Analysis (214.2 t/s, 10.84 s to first answer token) at a near-floor price.Output costs about a third more than DeepInfra’s promotional rate.
OpenRouter Balanced / Nitro / Exacto routingDepends on routed providerOne API with the ability to optimize for cost, speed, or provider consistency without changing app code. Exacto keeps token cost behavior more stable.Routing convenience can obscure what you are actually paying unless you monitor provider selection and token mix carefully.
  • If your workload is input-heavy and cacheable, DeepInfra Standard is a strong default: $0.5625 input and $0.105 cached input, with Flex at $0.45 / $0.084 for work that can wait.
  • If your workload is output-heavy, watch output pricing first. The spread from $1.80 to $8.00 per 1M output tokens on OpenRouter is large enough to dominate total spend on verbose reasoning chains, code generation, or long JSON outputs.
  • If response speed is your product, test CoreWeave (214.2 t/s at $0.62 / $2.42) or Databricks (222.8 t/s); DeepInfra measured 81.1 t/s on Artificial Analysis, and for cost-sensitive and agent work its per-token rates compound.
  • If you need predictable procurement and deployment, DeepInfra Priority is easier to reason about than multi-provider routing — you know the markup and don’t need to reverse-engineer which backend served which request.
  • If you use OpenRouter, separate three numbers in your head: the listed base price, the effective price after caching, and the real blended request cost based on your own input/output ratio.
  • Z.ai’s first-party price is a useful sanity check: $1.40 input / $4.40 output / $0.26 cache, which most providers on Artificial Analysis match, and about 2.5× DeepInfra’s promotional rate. If you assume “GLM 5.2 pricing” is one number, you will probably budget wrong.
  • The practical trap with GLM 5.2 is not just expensive prompts — it’s expensive prompts plus long outputs plus inconsistent caching assumptions. That combination has wrecked plenty of otherwise sensible cost models.

DeepInfra: the Power User’s Choice for GLM 5.2

If you want GLM 5.2 on an endpoint built for serious production use, DeepInfra is the power-user pick. DeepInfra owns its GPU infrastructure, which helps with both performance consistency and cost efficiency. In practice, it’s best suited for developers who want sharp token pricing, predictable deployment options, and a path from public API access to more controlled setups without changing models. If you want to compare GLM 5.2 against its predecessor before committing, the GLM-5.1 model overview is a good reference for how the family has evolved.

Model NameBest Use CaseContext WindowInput Price (per 1M tokens)Output Price (per 1M tokens)
GLM 5.2 Standard (promotional)High-volume production inference1,048,576 tokens$0.5625$1.80
GLM 5.2 Standard (list)Budget baseline if the promotion ends1,048,576 tokens$0.75$2.40
GLM 5.2 FlexBatch and async jobs that can wait for capacity1,048,576 tokens$0.45$1.44
GLM 5.2 PriorityHigher service tier for production workloads needing priority handling1,048,576 tokens$0.84375$2.70

Why this matters: On DeepInfra Standard, GLM 5.2 is $0.5625 per 1M input tokens and $1.80 per 1M output tokens at promotional pricing (pricing as of 2026-11-17), with cached input at $0.105 and up to 163,840 output tokens per request. Z.ai’s first-party price, which most providers on Artificial Analysis match, is $1.40 input and $4.40 output, so DeepInfra is well below it while still offering Flex and Priority tiers if you need them. For teams pushing a lot of long-context traffic, that gap adds up fast.

If GLM 5.2 is headed into a high-volume pipeline, DeepInfra is one of the cleanest places to pressure-test the economics before spend gets away from you. It’s especially compelling when you want low base pricing now and the option to scale into more controlled deployment later. For teams that also want to weigh the older generation, the GLM-5.1 pricing guide breaks down how the 5.1 provider market compares across the same axes.

Real-World Cost Scenarios for Developers

Below are the kinds of workloads where DeepInfra is a particularly strong GLM 5.2 provider choice: long-context inputs, repeated prompt scaffolding, structured outputs, and production environments where you may want to start on a public endpoint and later move to a private deployment path without changing models.

Scenario 1: Repo-wide coding assistant with stable system prompts

A developer team is using GLM 5.2 for project-level code edits, architecture Q&A, and multi-file refactors. Each request includes a large, mostly stable prompt prefix: coding standards, repo conventions, tool schemas, and shared instructions. That is exactly the kind of pattern where DeepInfra Standard looks good: low base token pricing and cached input at $0.105/1M.

  • Why DeepInfra fits: long context, repeated prefixes, JSON/function calling support, and token pricing well below Z.ai’s first-party rate.
  • Best match: teams building internal coding copilots, repo assistants, or CI remediation tools.
MetricValue
Volume10,000 requests/month
ModelGLM 5.2
ProviderDeepInfra Standard
Input Tokens500M/month
Output Tokens100M/month
Monthly Cost$461.25

Cost math:

  • Input: 500M × $0.5625/1M = $281.25
  • Output: 100M × $1.80/1M = $180
  • Total = $461.25/month

Same workload at Z.ai’s first-party price ($1.40 input / $4.40 output), which most providers on Artificial Analysis match: $1,140/month — $678.75/month more than DeepInfra Standard. At DeepInfra’s list price ($0.75 / $2.40): $615/month.

Scenario 2: Long-document RAG pipeline for support or compliance

A team is feeding long manuals, policy docs, or customer history into GLM 5.2 for grounded answers and structured extraction. This is a classic use case for the model’s 1,048,576-token context window, but it can become expensive quickly if input pricing is mediocre. DeepInfra is appealing here because it has the second-lowest price on Artificial Analysis and supports cached input for repeated retrieval scaffolding.

  • Why DeepInfra fits: document-heavy requests, stable retrieval wrappers, structured JSON output, and strong economics for input-heavy workloads.
  • Best match: support copilots, compliance review, contract analysis, or internal knowledge assistants.
MetricValue
Volume2,000 jobs/month
ModelGLM 5.2
ProviderDeepInfra Standard
Input Tokens2B/month
Output Tokens200M/month
Monthly Cost$1,485

Cost math:

  • Input: 2B × $0.5625/1M = $1,125
  • Output: 200M × $1.80/1M = $360
  • Total = $1,485/month

Same workload at Z.ai’s first-party price ($1.40 input / $4.40 output): $3,680/month — $2,195/month more than DeepInfra Standard. At DeepInfra’s list price: $1,980/month.

Scenario 3: Agent workflow with predictable higher service tier needs

Some teams do not want to juggle multi-provider routing just to get a stronger service tier. They want the same model, same interface, and a simple premium for higher-priority handling. This is one of DeepInfra’s cleaner advantages: Priority pricing is exactly 1.5× Standard, which makes planning straightforward. If latency under load is a key concern, the GLM-5.1 API benchmarks for latency and throughput provide a useful baseline for setting expectations on the GLM family.

  • Why DeepInfra fits: easy upgrade path from Standard to Priority without changing provider or application logic.
  • Best match: production agents handling customer-facing workflows, internal operations tooling, or higher-stakes automation.
MetricValue
Volume5,000 workflows/month
ModelGLM 5.2
ProviderDeepInfra Priority
Input Tokens750M/month
Output Tokens150M/month
Monthly Cost$1,037.81

Cost math:

  • Input: 750M × $0.84375/1M = $632.81
  • Output: 150M × $2.70/1M = $405
  • Total = $1,037.81/month

Same workload at Z.ai’s first-party price ($1.40 input / $4.40 output): $1,710/month — $672.19/month more than DeepInfra Priority. Priority at list price ($1.125 / $3.60): $1,383.75/month.

Scenario 4: High-volume structured extraction API

Suppose you are building an API that turns messy text into validated JSON: invoices, forms, tickets, case notes, or multilingual business docs. GLM 5.2’s JSON output and function calling support matter here, but so does not overpaying for output. DeepInfra stands out because it keeps output at $1.80/1M, while some providers push far higher. To try extraction prompts before wiring them up, the GLM-5.2 model page has a browser demo.

  • Why DeepInfra fits: structured output support plus low output-token pricing for production extraction workloads.
  • Best match: data pipelines, ETL enrichment, backend document parsing, and workflow automation.
MetricValue
Volume1,000,000 documents/month
ModelGLM 5.2
ProviderDeepInfra Standard
Input Tokens300M/month
Output Tokens300M/month
Monthly Cost$708.75

Cost math:

  • Input: 300M × $0.5625/1M = $168.75
  • Output: 300M × $1.80/1M = $540
  • Total = $708.75/month

Same workload at Z.ai’s first-party price ($1.40 input / $4.40 output): $1,740/month — $1,031.25/month more than DeepInfra Standard. At DeepInfra’s list price: $945/month.

Scenario 5: Cache-friendly internal developer agent

This one is less about the list price and more about how DeepInfra performs when your prompt shape is repetitive. DeepInfra bills cached input at $0.105 per 1M, under a fifth of the $0.5625 input rate. If your internal agent reuses the same long prompt skeleton across thousands of calls, DeepInfra gets even more compelling. For teams tracking the family, the newer GLM-5.3 is also available on DeepInfra.

  • Why DeepInfra fits: repeated prompt prefixes, long-lived agents, and workflows with lots of shared scaffolding.
  • Best match: internal tooling, engineering assistants, SDLC bots, and ops copilots.
MetricValue
Volume50,000 agent turns/month
ModelGLM 5.2
ProviderDeepInfra Standard
Input Tokens1B/month
Output Tokens100M/month
Monthly Cost$742.50

Cost math:

  • Input: 1B × $0.5625/1M = $562.50
  • Output: 100M × $1.80/1M = $180
  • Total = $742.50/month

Same workload at Z.ai’s first-party price ($1.40 input / $4.40 output): $1,840/month — $1,097.50/month more than DeepInfra Standard. At DeepInfra’s list price: $990/month.

For teams with strong cache reuse, DeepInfra’s $0.105 cached-input rate is where repeated-workload economics show up: the more of each prompt that hits the cache, the further the bill falls below the headline rate.

Conclusion

The provider decision for GLM 5.2 is not really about picking the cheapest number on a comparison table. It is about matching your workload shape — input volume, output verbosity, cache reuse, and service tier requirements — to a provider whose actual economics hold up under your real traffic patterns. A model with a 1M-token context window and reasoning-oriented output can look affordable at the headline rate and expensive in practice if you are not thinking about the full token mix.

The two criteria that separate good GLM 5.2 deployments from expensive ones are output pricing discipline and prompt caching strategy. The spread from $1.80 to $8.00 per million output tokens across OpenRouter’s providers is wide enough to dominate your bill on any verbose workload, and the difference between a good cache hit rate and a poor one can shift your effective input cost by 60–70%. If your application has stable system prompts, shared retrieval scaffolding, or repeated agent instructions, that cached input rate at $0.105 per million tokens on DeepInfra Standard is a core part of the cost model, not a footnote. API compatibility matters too: JSON output and function calling support are table stakes for most production pipelines, and not every provider exposes them cleanly.

DeepInfra has the second-lowest price on Artificial Analysis (after Multiverse Computing) and the lowest listed non-Flex output price on OpenRouter, as of 2026-11-17, while also offering Flex for batch work and a clear Priority tier for teams that want higher service levels without reworking their integration. When you are ready to wire it into your application, the GLM-5.2 API reference covers everything you need to make your first call. And if you want to compare GLM 5.2 against other models in the same family or across the broader catalog, DeepInfra’s full model listing is a practical starting point for scoping alternatives.

Related articles
Kimi K3.1 Pro Pricing: API Costs, Providers & Flex (2026)Kimi K3.1 Pro Pricing: API Costs, Providers & Flex (2026)<p>Kimi K3.1 Pro Executive Summary Pricing as of 2026-11-17. DeepInfra&#8217;s Standard rate is promotional (5% off a $2.00 / $10.00 list price, no published end date). Budget against list if you&#8217;re planning past this quarter. Best For Provider Recommendation Why Lowest price with a 0% error rate DeepInfra Standard $1.90 input / $9.50 output / [&hellip;]</p>
GLM-4.7-Flash API Benchmarks: Latency, Throughput & CostGLM-4.7-Flash API Benchmarks: Latency, Throughput & Cost<p>About GLM-4.7-Flash GLM-4.7-Flash is Z.AI&#8217;s open-weights reasoning model released in January 2026. Built on a Mixture-of-Experts (MoE) Transformer architecture, it features 30 billion total parameters with only ~3 billion active per inference — making it exceptionally efficient for its capability class. The model is designed as a lightweight, cost-effective alternative to Z.AI&#8217;s flagship GLM-4.7, optimized [&hellip;]</p>
DeepSeek V4 Flash vs Qwen3.6 vs GLM-4.6 BenchmarksDeepSeek V4 Flash vs Qwen3.6 vs GLM-4.6 Benchmarks<p>What&#8217;s Changed Since This Comparison First Ran All three models here have moved since this article published, and Artificial Analysis has materially changed how it scores them. GLM-4.6 is now deprecated by Artificial Analysis. As of today, Artificial Analysis&#8217;s own page for this model states it only continues benchmarking GLM-4.6 on a default workload and [&hellip;]</p>