# Costs of Online LLM Usage

> Source: <https://www.dotnetperls.com/2026_9_26_costs-online-llm-usage>
> Published: 2026-09-26 07:00:00+00:00

Over the past few months I have been trying to understand how to use **LLMs** **cost-effectively** on OpenRouter. AI bills can quickly become excessive. And with agentic coding, code quality can deteriorate as costs go sky-high.

Using **spec-driven** development—where one writes a spec, and then has an agent implement it in **chat**—can **lower costs**. In many of my experiments, costs were between 1 and 7 cents to evaluate a Markdown prompt (up to 180 lines) and generate a function. This is significantly less expensive than a coding harness like OpenCode—less context is needed.

Besides generating code from specifications, using **cheaper models** (cost per million tokens) is beneficial. For example, GLM 5.3 Flash and MiMo-V2.6 Flash were much cheaper for code generation.

• GPT-6-Sol evaluated a 180-line prompt for 5 cents, while Kimi-K3 evaluated a shorter prompt for 32 cents—the difference is that GPT generated fewer thinking tokens.

• GLM 5.3 Flash and MiMo-V2.6 Flash had such low per-token costs that they could generate output for a tiny fraction of a cent.

• GPT-6-Sol, because it was more frugal with thinking tokens, was cheaper than Kimi-K3; the cheapest options were GLM 5.3 Flash and MiMo-V2.6 Flash.
