GLM Coding Plan has quota, but your balance is charged: keys, endpoints and 429 fixes
Identify Standard, Coding Plan and legacy Compatible keys, trace GLM billing to the correct route, and distinguish quota errors from rate limits and model-access failures.
A GLM Coding Plan subscription does not make every key in your account spend plan quota. For Standard and Coding Plan keys created from October 16, 2026, Z.ai says the key type determines billing across supported endpoints. Older Compatible keys follow a different, endpoint-dependent set of rules.
That distinction explains why “I still have quota” can coexist with a balance deduction or a failed request. This guide provides a route-and-key worksheet, an error classifier and a controlled verification procedure. It is based on official documentation checked on November 17, 2026; we did not run paid account-billing experiments or inspect your account.
This article expands the GLM usage cluster. It does not announce GLM 5.5: the official public index checked today still lists the GLM-5.3 family. For that separate question, see our GLM 5.5 release and availability check. Do not substitute a guessed glm-5.5 identifier into a working configuration.
Identify the key class in the console
Use Z.ai’s API Key Management Guide to identify the key configured in the actual tool process. Check the console label and creation context, not the appearance of the secret string. An account can contain several classes of key at once.
| Console key class | Where it comes from | Billing rule to investigate |
|---|---|---|
| Standard API Key | Standard API Key creation entry | Account balance or applicable usage bundles, not Coding Plan quota |
| Personal Coding Plan API Key | Personal Coding Plan entry | Individual Plan quota |
| Team Plan Key | Team Coding Plan → My Plan | Team Plan and seat rules, including any configured overage policy |
| Legacy Compatible key | Automatically classified older key | Endpoint plus account plan history determine behavior |
The October 16 notice says existing key values do not need replacement merely because classification changed. Older keys associated with a Team Plan project become Team Plan keys; eligible older personal keys on accounts that have ever had a Coding Plan become Compatible keys. Older accounts without that history use Standard classification. Dedicated enterprise or partner-channel exceptions may retain their contracted behavior.
Do not rotate every key as your first troubleshooting step. First determine which key is actually used: a terminal export, IDE setting, project config or provider-switching tool may still reference an older credential. Record only a non-secret console label or internal identifier in your troubleshooting notes. Never paste the full key into a ticket or a public screenshot.
Apply the correct endpoint rule
For new Standard and Coding Plan keys, changing among supported endpoints does not change their billing type. A Standard key in Claude Code may charge the API balance even while an active Coding Plan has quota. To consume plan quota, use the corresponding plan key and a supported tool configuration.
For a legacy Compatible key, Z.ai’s notice gives the following route-dependent behavior:
| Base URL | Protocol/use | Compatible-key behavior |
|---|---|---|
https://api.z.ai/api/paas/v4 | Standard Chat Completions | Balance or applicable usage bundles; not Coding Plan quota |
https://api.z.ai/api/coding/paas/v4 | Coding Plan Chat Completions | Plan quota if the account has ever had a plan; calls stop when that plan expires |
https://api.z.ai/api/anthropic | Anthropic Messages | Same plan-history rule in the official Compatible-key table |
https://api.z.ai/api/v1 | OpenAI Responses | Same plan-history rule in the official Compatible-key table |
The notice also describes balance or bundle billing on the latter routes for accounts that have never had a Coding Plan. If your console classification does not fit that scenario, do not infer it from the URL alone; ask support to reconcile the key classification and request record. Team overage and dedicated enterprise arrangements require their own account-specific check.
These are Z.ai routes. They do not describe BigModel’s Chinese-service account or a third-party provider’s billing. An Ofox key follows Ofox’s authentication contract, not your Z.ai subscription. Check Ofox model availability and provider-specific documentation before switching. Do not copy the table’s URLs into an Ofox configuration.
Trace one request from client to usage record
Create a small worksheet before changing anything:
Client and version:
Process actually launched (CLI / IDE / container):
Provider and Base URL:
Protocol (Messages / Chat Completions / Responses):
Exact model ID or alias mapping:
Key class shown in provider console (NO secret value):
Plan active? Remaining quota? Team overage enabled?:
Local timestamp and time zone:
HTTP status / business code / sanitized request ID:
Usage record and billing bucket after the test:
Pause unrelated test sessions so they do not contaminate the comparison. Capture the relevant plan usage and balance views, then make one small, non-sensitive request only if you authorize its possible cost. For example, ask the configured model to return the single word READY, with no tools or repository access. This checks a basic call; it is not a quality benchmark.
Then reconcile the client timestamp, request identifier where available, selected model and provider usage entry. A successful response alone does not prove which bucket paid for it. Allow for the provider dashboard’s reporting delay; if attribution is still unclear, stop further experiments and retain the sanitized evidence for support rather than generating a series of paid probes.
Consider three illustrative, not measured, outcomes:
- A new Standard key in Claude Code succeeds and appears in standard API usage. This is consistent with the documented rule even if plan quota remains.
- A legacy Compatible key succeeds on the standard Chat Completions endpoint and charges the balance. Changing only that legacy key’s route can change the bucket, but that does not generalize to newly created Standard keys.
- An expired-plan Compatible key fails on a plan route. The notice says it does not automatically switch to pay-as-you-go. To deliberately use API billing, create a Standard key and use it with a supported endpoint and sufficient balance; this is a billing choice, not a free fallback.
For a newly created key, replace the key with the correct class, restart the actual client process, and repeat one controlled check. For a Compatible key, first decide whether you want plan billing or standard API billing and apply the documented rule. Do not change key, endpoint, model and retry policy together: you will lose the evidence of which change fixed the issue.
Read the business code inside a 429
Z.ai’s error-code reference assigns HTTP 429 to several different causes. A generic exponential-backoff loop is not a fix for every one of them.
| Business code | Documented category | Useful response |
|---|---|---|
1113 | Insufficient balance or resource package | Check the billing bucket and funding; do not assume plan quota applies |
1302 | Request rate limit | Reduce concurrency and use bounded backoff |
1305 | Temporary overload | Retry with a bounded policy; record persistent failures |
1308, 1310 | Usage-window limits | Read the returned reset information; do not infer reset time from your local midnight |
1309 | Coding Plan expired | Check plan status and choose an authorized renewal or deliberate standard-API route |
1311 | Plan lacks access to the selected model | Check model entitlement and exact mapping |
1313 | Fair-usage restriction | Follow the provider’s support process; more keys are not a workaround |
1315 | Key restricted to enterprise coding scenarios | Use the appropriate product key and account configuration |
1316–1321 | Usage window plus extra-usage balance or spend-limit condition | Read the exact message; check overage eligibility and configured limits before changing spend |
Authentication errors are a separate branch: for example, 1000 and 1001 are associated with HTTP 401 in the reference. A quota increase cannot repair a missing authentication header. Conversely, repeatedly replacing a valid key does not restore an expired plan.
To classify a saved error response locally, save the following as classify_glm_error.py. It reads JSON from standard input and prints only the code and a diagnostic category, not the response message or any credentials.
import json
import sys
categories = {
"1000": "authentication", "1001": "authentication",
"1003": "authentication", "1005": "authentication",
"1113": "billing-balance", "1302": "request-rate",
"1305": "temporary-overload", "1308": "usage-window",
"1309": "plan-expired", "1310": "usage-window",
"1311": "model-entitlement", "1313": "fair-usage",
"1314": "enterprise-plan-expired", "1315": "key-product-mismatch",
}
categories.update({str(n): "extra-usage-condition" for n in range(1316, 1322)})
data = json.load(sys.stdin)
error = data.get("error", {}) if isinstance(data, dict) else {}
code = str(error.get("code", "unknown")) if isinstance(error, dict) else "unknown"
print(json.dumps({"code": code, "category": categories.get(code, "inspect-provider-response")}))
A synthetic local check:
printf '%s\n' '{"error":{"code":"1311","message":"synthetic example"}}' | python3 classify_glm_error.py
The expected category is model-entitlement. We tested this classifier locally, including numeric codes and missing error objects. It does not diagnose network failures, flatten gateway-specific response formats or replace reading the provider’s exact message. An unknown result means inspect the response structure; it does not mean the request succeeded. For an abnormal termination during an SSE stream, Z.ai documents the exception reason in finish_reason rather than these ordinary error codes. Save and inspect the streaming events separately; this JSON classifier does not parse SSE.
Check model selection after fixing billing
Once the key and route are correct, verify the exact model mapping independently. The official model-switching guide currently documents GLM-5.3 and GLM-5.3-Flash. A subscription tier, a client alias such as Opus, and a model’s public API identifier are different things.
If the client says a model is missing, compare its configured identifier and protocol with the current provider documentation. The provider/endpoint checklist in our OpenAI model-not-found troubleshooting guide explains how to distinguish a naming error from unavailable access. For broader request pacing on Ofox routes, use Ofox rate-limit documentation; those limits must not be applied to Z.ai accounts by analogy.
Do not use a speculative GLM 5.5 model name to test whether your plan is working. Start with a model explicitly available to the account and route. Only after a basic call and its billing attribution pass should you test long agent runs, tools or context extensions.
Close the incident with evidence, not another retry loop
A resolved case should identify the key class, intended endpoint, accepted model and actual billing bucket, then show that the relevant error stopped under the corrected configuration. Preserve the previous settings so you can reverse a configuration change without recreating secrets.
If the provider’s records contradict the documented rule, send support the timestamp with time zone, sanitized request ID, key class, model and error code. Do not send the full credential or private prompt content unless there is a separately approved reason and secure channel. This makes a billing investigation possible without turning it into another uncertain batch of requests.
Frequently Asked Questions
- Does changing the Base URL make a new Standard key use Coding Plan quota?
- No. Z.ai says the type of Standard or Coding Plan keys created from October 16, 2026 determines billing across supported endpoints. Legacy Compatible keys have different rules.
- Does every GLM HTTP 429 mean I should retry later?
- No. The provider's business code can indicate balance, quota, plan expiration, model entitlement or rate limiting. Fix the named cause before retrying.


