On October 16, 2026, OpenCode posted on X: “GLM 5.3 Flash is now free in OpenCode.” The model ID is opencode/glm-5.3-flash-free, and the OpenCode Zen docs say it “is free on OpenCode for a limited time.” We installed a clean copy of OpenCode the same day, ran the model with no sign-in and no API key, and had it write and test a Node.js file.
One correction before you search for “GLM 5.3 free”: the free model is GLM-5.3-Flash, Z.ai’s cheaper multimodal model. The full GLM-5.3 still costs $1.40 per 1M input tokens. The free Flash comes with four catches. It works only inside OpenCode, caps context at 200K tokens instead of 1M, rejects PDF attachments even though its metadata lists them, and answers slowly and unevenly. Below: setup, each limit, and the paid routes. For background, read what GLM-5.3-Flash is. If your code calls an API, Apidog CLI lets the same agent test it.
What OpenCode is giving away
GLM-5.3-Flash launched on August 26, 2026: a 320B-parameter mixture-of-experts model with 18B active parameters, MIT-licensed weights and native image input. OpenCode serves it through its model gateway, OpenCode Zen, in a free version and a paid one. Here is how the routes compare:
| Route | Price per 1M tokens | Context / max output | Where it works |
|---|---|---|---|
OpenCode, glm-5.3-flash-free |
$0 for a limited time | 200K / 32K | Inside OpenCode only |
OpenCode Zen, glm-5.3-flash |
$0.15 in / $0.50 out | 1M / 131K | Any client with a Zen key |
| OpenCode Go plan | $10 a month; $60 monthly usage limit for this model | 1M / 131K | Inside OpenCode |
Z.ai API, glm-5.3-flash |
$0.15 in / $0.50 out, $0.03 cached | 1M | Any client |
OpenCode Zen, glm-5.3 (not free) |
$1.40 in / $4.40 out | 1M / 131K | Any client with a Zen key |
The limits come from the model metadata OpenCode ships, which you can print with opencode models opencode --verbose. Prices come from the Zen docs, the OpenCode Go docs and Z.ai’s pricing page, checked on October 16.
The second free run for this model
OpenCode gave this model away once before, under another name. From August 20, 2026, an anonymous model called Ox Alpha sat in OpenCode’s and OpenRouter’s free lists with a 1M-token window, until Z.ai revealed it as GLM-5.3-Flash on August 26. Our Ox Alpha breakdown covers that launch. This time the model is free under its own name, with a 200K window instead of 1M.
How to use GLM-5.3-Flash free in OpenCode
New to the tool? Our OpenCode overview covers what the agent does. Setup takes three steps.
1. Install OpenCode
curl -fsSL https://opencode.ai/install | bash
npm install -g opencode-ai and brew install anomalyco/tap/opencode work too. On Windows, OpenCode recommends WSL.
2. Refresh the model list and pick the model
OpenCode caches its model list, and our fresh install didn’t show the GLM model until we refreshed it:
opencode models opencode --refresh | grep free
That printed eleven free models, opencode/glm-5.3-flash-free among them. Open a project, start opencode, type /models and choose GLM-5.3-Flash Free. To make it the default for a project, add an opencode.json file at the project root:
{
"$schema": "https://opencode.ai/config.json",
"model": "opencode/glm-5.3-flash-free"
}
3. Run a task
Or send a one-shot task from your shell:
opencode run -m opencode/glm-5.3-flash-free \
"Create status.js exporting isClientError(code) for 4xx codes, add a node:assert self-test, then run it"
What our test showed
We ran OpenCode 1.19.2, the current opencode-ai npm release, with empty config and data directories. Nothing asked us to sign in or add a key. In every run, the model wrote status.js, ran it with node and reported that all tests passed.
Speed was the weak spot. We timed OpenCode’s other new free model on the same prompts:
| Prompt | GLM-5.3-Flash Free | DeepSeek V4.1 Flash Free |
|---|---|---|
| One-line question | 7 to 196 s (11 runs) | 4 to 15 s (3 runs) |
| Write-and-run task above | 13 to 109 s (5 runs) | 16 to 36 s (3 runs) |
Every GLM run finished with a correct answer. The wait was the problem, and it changed from run to run.
The limits behind “free”
Responses are slow and uneven
“Flash” in this model’s name refers to price, not speed. OpenCode exposes three reasoning variants for the free model (low, high and max), and Z.ai’s model docs recommend max. Lowering it didn’t fix the wait: one --variant low run took 196 seconds to answer a one-line question that other runs answered in 11. That points to load on the free endpoint, not reasoning depth. Give the free model work you don’t sit and watch. Our GLM-5.3-Flash vs GLM-5.3 comparison covers how the two models differ.
It works only inside OpenCode
The Zen docs list the free model next to an OpenAI-compatible endpoint, but it isn’t a free API. Call it from anything other than OpenCode and the gateway refuses:
curl https://opencode.ai/inference/openai/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model": "glm-5.3-flash-free", "messages": [{"role": "user", "content": "ping"}]}'
{"type":"error","error":{"type":"FreeTierError","message":"OpenCode's free tier can only be used from within OpenCode. Download it at https://opencode.ai and keep building."}}
We got HTTP 403 on October 16 from both the /inference and /zen endpoints, with and without an Authorization header. Your backend, your scripts and other agents can’t use the free model. To run GLM-5.3-Flash in another agent, see how to use GLM-5.3-Flash in Claude Code and Cline with a paid key.
The context is 200K, and output stops at 32K
The paid model takes 1M tokens of context and returns up to 131K; the free one stops at 200K in and 32K out. That covers most coding sessions but runs out sooner on a large monorepo or a long session that reads many files. When a task needs the full window, switch that session to a paid model with /models.
PDF attachments fail; images work
OpenCode’s metadata lists text, image, video and PDF input for the free model. In our test, images worked and PDFs didn’t. Attaching a one-page PDF spec with opencode run -f returned:
Upstream request failed: [invalid_value] messages[1]: content[2]: content part type "file" is not supported; only text and image_url are
The same page converted to PNG went through, and the model turned it into a valid OpenAPI file. So export the PDF pages you need as images first. On macOS, sips -s format png spec.pdf --out spec.png converts the first page. We didn’t test video.
It’s free for a limited time, with no end date
OpenCode’s free GLM models have ended before. glm-4.7-free and glm-5-free now carry a deprecated status in the models.dev catalog OpenCode reads, and the Ox Alpha free week lasted six days. Keep the model name in opencode.json, not in scripts, so moving to a paid model is a one-line edit.
Privacy is better than most free options
For this model, the Zen docs say the provider “follows a zero-retention policy and does not use your data for model training.” Not every free model in the list makes that promise; Big Pickle, Exo Free and the MiMo models say collected data “may be used to improve the model.” OpenCode says all Zen models are hosted in the US and EU. Neither the Zen docs nor the Go docs publish a rate limit for free models, so expect slowdowns when demand spikes.
What the same model costs when you need the API
Inside your product, you need a paid route. Z.ai’s API and Zen’s paid glm-5.3-flash charge the same: $0.15 per 1M input tokens and $0.50 per 1M output tokens. Z.ai bills cached input at $0.03.
Here’s the math for an agent turn with 20,000 input tokens and 2,000 output tokens:
- 0.02 x $0.15 + 0.002 x $0.50 = $0.004 per turn
- A thousand turns: $4.00 before cache discounts
Agent sessions re-send most of their context on every turn, so cached input at $0.03 cuts the input side of that bill by 80%. If you code in OpenCode every day and the promotion ends, the Go plan is the middle option: $10 a month with a $60 monthly usage limit for GLM-5.3-Flash, which OpenCode estimates at about 31,580 requests. The same plan covers about 1,080 requests a month of the full GLM-5.3.
For launch-discount history and cache math, see our GLM-5.3-Flash pricing guide. For request code with image input, see how to use the GLM-5.3-Flash API.
Let OpenCode test the API with Apidog CLI
Our screenshot test showed why the agent should test what it writes. Reading the spec image, the model typed the weight_grams maximum as 300,000 instead of 30,000 and marked an optional field as required. Both mistakes passed JSON validation. A boundary test against the real API catches them.
Apidog CLI gives OpenCode commands to import a spec, write test cases and run them. Set it up once:
npm install -g apidog-cli@latest
apidog login --with-token <YOUR_TOKEN>
npx -y skills add https://apidog.com # pick your agent when prompted
The token comes from Apidog under Account Settings, API Access Token. The last line installs Apidog’s agent skills, which teach OpenCode how to drive the CLI. Then attach the screenshot (-f spec.png with opencode run) and give the agent one prompt:
The attached image is our shipping partner's API spec. Write shipments.openapi.json,
import it into Apidog project <id> with Apidog CLI, then create test cases for
POST /v2/shipments: weight_grams 30000 returns 201, 30001 returns 422. Run them
against the sandbox environment and list any spec fields the results contradict.
These are the commands it runs, checked against Apidog CLI 2.2.7:
apidog import --project <id> --format openapi --file ./shipments.openapi.json
apidog cli-schema get test-case-create
apidog cli-schema validate test-case-create --file case.json
apidog test-case create --project <id> --file case.json
apidog run --test-case <caseId> --project <id> -e <envId> -r cli,json
Every command returns JSON, and many include agentHints.nextSteps, so the agent knows what to run next. If the CLI refuses a write on your main branch, have the agent work on an AI branch (apidog branch create --project <id> --type ai --name ai/shipments-spec --from main). The same apidog run line with -r junit drops into CI; our Apidog CLI CI/CD pipeline has a copy-paste version.
FAQ
Is GLM-5.3 free in OpenCode? Only the Flash model. opencode/glm-5.3-flash-free has been free since October 16, 2026, as a limited-time offer with no end date. The full GLM-5.3 costs $1.40 in and $4.40 out per 1M tokens on Zen.
Can I call the free model from my own code? No. Requests from outside OpenCode get a 403 FreeTierError. Use Z.ai’s API or Zen’s paid glm-5.3-flash, both at $0.15 in and $0.50 out per 1M tokens.
Why is it so slow? Launch-day load, as far as we can tell. Short one-line questions took 7 to 196 seconds, and --variant low didn’t make runs reliably faster.
Are there other ways to use GLM-5.3-Flash for free? Yes. The MIT-licensed weights run on your own hardware, and our guide to running GLM-5.3-Flash locally covers the quantized builds and the memory they need.
Use it while it lasts
The free model passed our coding test every time and drafted OpenAPI from a spec screenshot, at $0 while you stay inside OpenCode, under 200K tokens and away from PDF attachments. Give it work you don’t wait on, keep the model name in opencode.json, and add Apidog CLI so the agent tests what it writes. Download Apidog to review the specs your agent imports and the test reports it uploads with --upload-report.



