CometAPI’s developer guide to GLM-5.3 Flash (Mia Maren, published 20 September 2026) says its focus is “integration behavior and production decisions.” Its cost section answers one narrower question: for long-document and agent workloads on the glm-5.3-flash route, how much context should a request carry, and where should output be capped?
All figures below use the rates the guide attributes to the CometAPI model page when it was written: $0.06 per million input tokens and $0.20 per million output tokens. The guide calls pricing time-sensitive and asks readers to confirm the live input, cached-input and output rates before budgeting, so every dollar figure here is dated.
What the guide’s own table shows
The guide gives the formula cost = input_tokens / 1,000,000 x 0.06 + output_tokens / 1,000,000 x 0.20 and four worked rows. The input-share column is derived from those rows; the guide does not state it.
| Workload (guide) | Input tokens | Output tokens | Estimated cost | Input share (derived) |
|---|---|---|---|---|
| Short question | 2,000 | 400 | $0.00020 | 60% |
| Code review | 50,000 | 4,000 | $0.00380 | 79% |
| Large document analysis | 250,000 | 10,000 | $0.01700 | 88% |
| Long agent run | 800,000 | 30,000 | $0.05400 | 89% |
At these rates an output token costs about 3.3 times an input token, yet input is 88–89% of the bill in both long-context rows: $0.015 of $0.017, and $0.048 of $0.054. For these workloads, what you send costs far more than what the model writes.
The same arithmetic bounds a single call. The guide lists a 1,048,576-token context window and up to 131,072 output tokens, and its troubleshooting table attributes “Context length exceeded” to prompt plus requested output exceeding the route limit. A request that filled the window with the full output allowance (917,504 in, 131,072 out) would cost about $0.08. That assumes the CometAPI route honours the listed maximum output. The guide warns that model and gateway capability differ and says to “Treat the live CometAPI model page and API schema as the contract for the route you actually call”, and maximum output is on its pre-launch verification list.
Where the budget actually grows
So the risk is less the size of one call than the number of calls a task takes. Three points in the guide explain why:
- Thinking is always on. Reasoning effort accepts
low,highormax, and the guide says not to send a parameter that tries to disable thinking. Its trade-offs are qualitative:lowmeans lower latency and output-token use with less depth;maxmeans the most depth with “potentially greater latency and cost.” - Tool loops repeat input. In the guide’s words: “Reasoning and tool loops can increase billed output and repeated input, so estimate complete workflows rather than one visible answer.”
- Streaming does not help. The guide says it “does not reduce the total number of generated tokens”.
The “Long agent run” row gives only totals under a formula for “estimated request cost”, with no turn count. By inference, its 800,000 input tokens could be one very large prompt or several rounds that each re-send accumulated history, paying the input rate again every round.
Setting the caps
These recommendations are the guide’s, applied to this decision:
- Treat the 1M window as capacity, not a target. Retrieve relevant files, remove duplicated logs, place stable instructions near the beginning, and “measure whether additional context improves task success.” Given the input shares above, trimming context is the largest cost lever in the long-context rows.
- Cap output per workflow class. Small caps for classification and extraction, medium for analysis, larger only for explicit long-form or agent tasks, each set from the live route schema. The guide’s own samples set
max_completion_tokensbetween 800 and 1,800. A lower cap also leaves more of the window for input. - Match effort to class. The guide maps
lowto classification and short extraction,highto code review and document analysis, andmaxto complex debugging and tool agents, passed viaextra_body. If the route rejects the field, it says to remove it and use the route default, which it does not name. - Cap the loop. Set maximum tool rounds, total tokens, elapsed time and cost, and expose only the tools the workflow needs.
- Budget per completed task. Track input, cached-input, reasoning and output tokens, tool calls and retries, and judge cost per completed task rather than per isolated call. Usage metadata comes back “when the route returns it”, and in streams may appear only in the final event.
The guide also points to another model for “a tiny, low-risk classification that a smaller model can handle reliably”, or when a workflow “cannot tolerate always-on reasoning or its associated latency profile.”
What the source does not settle
- No cached-input price, so caching savings cannot be estimated.
- No reasoning-token counts per effort level, latency figures or rate-limit numbers.
- Nothing on whether failed or retried requests are billed.
- It cites a “Lower listed route price” but names no baseline and gives no Z.ai direct price, so it supports no cross-route comparison.
- Its benchmark scores are vendor-reported under specific harnesses and say nothing about cost per successful task.
A defensible budget starts with the listed rates, an output cap per workflow class and a tool-loop cap, then replaces the guide’s estimates with measured tokens per completed task on the live route.