How Much To Run AI
Open weights

GLM-5.3: Coding, API Pricing and Local Setup

GLM-5.3 is Z.ai’s open-weight text model for complex coding and long-running agent tasks. Start through an API or a compatible coding client; consider self-hosting when you can operate a large model stack. Compare it with GLM-5.3-Flash on the same repository task before paying the higher token rate.

Content reviewed:

Use this model

API docs and console

Official model repository

Choose a first task

  • Repair a reproducible repository bug and verify the patch with its existing tests.
  • Plan and implement a bounded multi-file change with tool access.
  • Review code for defects and validate findings in an authorized environment.

When should you choose GLM-5.3?

Choose GLM-5.3 for a text-based coding or agent workflow where you want to evaluate Z.ai’s larger model. The vendor reports stronger long-horizon coding results than GLM-5.2, but a benchmark score does not tell you how many attempts your repository change will need.

For screenshot-driven frontend work or lower token spend, start with GLM-5.3-Flash. GLM-5.3 accepts text only. Supply extracted text or choose the multimodal model when the source material is visual.

How much does GLM-5.3 cost?

Z.ai lists $1.40 per million input tokens, $0.26 for cached input and $4.40 per million output tokens. An uncached request with 20,000 input and 3,000 output tokens costs 0.02 × $1.40 + 0.003 × $4.40 = $0.0412. A thousand such requests cost $41.20 before tools and other charges.

Cached-input discounts apply to cache hits, not all repeated-looking text. Cache storage is separately marked free for a limited time. Z.ai’s built-in web search adds $0.01 per use; a coding agent can also incur execution and external-service costs.

USD per 1 million tokens
Billing periodUncached inputOutputExample total
Standard$1.40$4.40$1.84

Example: 1M uncached input tokens + 100K output tokens.

Official pricing · Source checked: · Standard

GLM-5.3 vs Flash: compare the same workload

Both offer a 1M-token context and up to 128K output tokens in Z.ai’s model guides. Their input modalities, rates and weight licenses differ. The example below assumes the same token counts, no cache hits and no tool charges; it compares billing arithmetic rather than task quality.

Count the full agent session, including follow-up prompts, reasoning output recorded in usage, tool-result input and retries. Record whether the task passed its tests. Cost per accepted patch is more useful than cost per first response.

ChoiceGLM-5.3GLM-5.3-Flash
Input → outputText → textText, image, video and file inputs → text
Context / maximum output1M / 128K tokens1M / 128K tokens
Input / output per 1M tokens$1.40 / $4.40$0.15 / $0.50
Uncached 20K input + 3K output$0.0412$0.0045
Weight licenseGLM-5.3 LicenseMIT

Send a first GLM-5.3 API request

To call GLM-5.3, use a Z.ai API key on your server and the pay-as-you-go Chat Completions endpoint below. A GLM Coding Plan uses its own subscription allowance and endpoint; configure the client for the product you purchased. A subscription quota is not an API dollar balance.

Start with reasoning_effort=low and a bounded output limit for a small integration check. These models require reasoning to stay enabled. Increase the budget and effort for a longer task after verifying that your client handles reasoning, tool calls and completion limits correctly.

Pay-as-you-go Chat Completions example
curl https://api.z.ai/api/paas/v4/chat/completions \
  -H "Authorization: Bearer $ZAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "glm-5.3", "messages": [{"role": "user", "content": "Write a Python function that returns the distinct items in a list, preserving order. Include two tests."}], "thinking": {"type": "enabled"}, "reasoning_effort": "low", "max_tokens": 4096}'

A code-review example from Kong

In an October 16 engineering report, Kong describes using GLM-5.3 and Flash as default code reviewers after comparing blocking-defect recall, precision and review cost on four pull requests in a synthetic repository. This is an operator’s internal evaluation, with a small test set.

Kong separately reports that triaging reviews by complexity lowered median review cost from $3.93 to $2.47. Model selection and routing are separate savings: reproduce your own acceptance checks before applying either result to another repository.

Control GLM-5.3 reasoning and client limits

GLM-5.3 supports low, high and max reasoning effort, with max as the default. Disabling thinking causes requests to fail. Explicitly choose effort instead of inheriting a client’s setting from a different model.

If an agent stops during reasoning, inspect its output limit, finish reason and timeout before repeating the same request. Long reasoning can consume the response budget before a useful final answer. Increasing a limit can also increase spend; compare completed tasks at the settings you intend to use.

What does local serving require?

The official GLM-5.3 download is FP8, with a separate BF16 checkpoint. Choose the matching runtime and format before estimating memory. The calculator provides a capacity and running-cost estimate; it does not measure throughput or guarantee that a maximum-context configuration fits.

SGLang documents eight-way tensor-parallel FP8 serving on supported AMD accelerators. Its guide notes that the roughly 1.51 TB BF16 checkpoint needs more room than a single MI300X node can provide once cache is included. This is a server-scale deployment rather than a desktop installation.

A community issue reports a sustained-load hang with FP8, eight H200 GPUs and EAGLE on SGLang revision 7760d52. Treat it as a configuration-specific reliability report: include long-context and sustained-load checks in qualification, alongside the initial smoke request.

Which license applies to the weights?

GLM-5.3 uses a custom GLM-5.3 License, separate from Flash’s MIT terms. It permits use, modification and distribution with its notices and conditions.

For a licensee or affiliate operating a Model as a Service business, aggregate revenue above US$10 billion over any consecutive twelve months triggers a Z.ai security-review condition before commercial use. The license defines that business category and excludes certain embedded end-user features and simple request relaying. Read that definition for a hosted offering.

Before you use it

  • Reasoning stays enabled; client output limits and timeouts affect whether a task finishes.
  • The advertised context limit is separate from the capacity available in a particular self-hosted configuration.

How to get started

Run a small task with a fixed acceptance test, record total billed usage and retries, then compare API spend with the complete operating cost of a self-hosted service.

Sources

Sources (8)

Calculators

Using this calculator for this model

Estimate a text model’s ongoing cost by choosing where it runs and how many hours it is active each month. Usage levels are 120, 360 or 720 hours per month; choose the closest to your planned schedule.

For open weights, select the precision and deployment that match the artifact and runtime you plan to use. The hardware result is a capacity estimate; context length, runtime and model-specific components can change actual memory use.

How to fill in the calculator
Precision
Select the weight format you will actually run. GGUF Q4 is a broad capacity estimate for a 4-bit GGUF variant; exact file size depends on the quantization and included components.
Deployment
Local estimates use hardware ownership, electricity and operations; cloud estimates use hourly rental pricing. Compare the path you are considering.
Usage level
Choose 120, 360 or 720 active hours per month, based on your planned schedule. For bursty work, use the nearest level as a comparison.
Electricity rate
Use your billed price per kWh. This changes local electricity cost only.
Wall power
Leave blank to use the GPU TDP reference. For multiple GPUs or a full system, enter measured whole-machine watts.
Salary and FTE
Enter a monthly salary range and the share of one full-time role spent operating the service; use zero if you allocate no labor.
PUE and system cost
Keep defaults if unknown. PUE scales local electricity; the system cost multiplier scales upfront hardware cost.

Use the calculator for a deployment budget; enter your expected usage and measured wall power.