Bottom line up front
GLM-5.2 is a mixture-of-experts model that Z.ai released in June 2026 with MIT-licensed open weights, a 1-million-token context window, and a reported maximum output of about 128K tokens. Z.ai documents an IndexShare technique that shares a lightweight indexer across every fourth sparse-attention layer, which it says cuts per-token compute substantially at long context, plus High and Max thinking levels. The permission to self-host is settled; the hardware question is not, because a roughly 753-billion-parameter model is a data-centre undertaking rather than a laptop run.
A 1M context is a claim about reliability, not just length
Z.ai documents a 1-million-token context window, up from roughly 200K on GLM-5.1, with a reported maximum output of about 128K tokens. The company's framing is that the context is usable for long-horizon engineering work rather than merely advertised, which is the more useful claim to test: a context length that degrades in quality partway through is not the same capability as one that holds up.
Third-party reporting describes the model as positioned between two closed frontier models on coding capability under similar token budgets, and Z.ai's own tables report improvements on Terminal-Bench 2.1 and SWE-bench Pro over the previous generation. Those are vendor and third-party measurements on their own configurations. Whether the context is reliable for your task is a measurement only you can make, on your own repository and harness.
- Test quality at the context length you actually use, not the maximum advertised.
- Record the harness and harness version alongside any result.
- Separate the context window from the completion limit in your design.
MIT is the most permissive common licence for weights
Z.ai publishes GLM-5.2 weights under the MIT licence and distributes them on major model hubs. MIT permits commercial use, modification, and redistribution with attribution, which makes self-hosting a genuine commercial option rather than a research exception. It also means a modified model you train can be deployed and sold without a vendor agreement.
The licence is the easy part. Read it for the exact checkpoint you intend to run, record the version and the date you checked it, and treat the hosted endpoint's terms as a separate document — a model's weight licence and a provider's API terms are not the same thing, and neither substitutes for the other.
- Locate and read the licence for the specific checkpoint you plan to run.
- Record the model version, licence, and the date you checked it.
- Keep the hosted API terms separate from the weights' licence in your records.
Free gateway access sits on top of a real price
GLM-5.2 is reachable at zero cost on at least one gateway. The published commercial price is roughly a dollar and forty cents per million input tokens, twenty-six cents cached, and four dollars forty per million output. That gap between the free tier and the commercial price is the clearest statement of what the free endpoint costs someone else.
For evaluation, prototyping, and low-volume internal work, free access is genuinely useful. For anything that must keep running, the MIT licence gives you a second route — run it yourself — which converts a subsidy you do not control into a cost you can forecast, subject to the hardware question above. Design that fallback before the dependency, not after an endpoint stops responding.
