The direct answer: to reduce LLM costs, optimize cost per accepted result, not token price alone. Write the acceptance test first, let deterministic software do the work it can do reliably, then buy only the model work needed to pass. A cheap attempt that triggers retries, review, or cleanup makes you pay twice.
Keep these ledgers separate:
| Ledger | What it buys | What it is not |
|---|---|---|
| Included subscription allowance | Account-specific use inside a product and its supported surfaces | Cash, portable tokens, or general API credit |
| Purchased product credits or usage bundles | Additional use under that product’s rules | A refill of included allowance unless the provider says so |
| API billing | Metered model, tool, cache, service-tier, and data-processing use | Subscription capacity or evidence that the output was accepted |
| Promotional access | Temporary or eligibility-limited use | A durable price or entitlement |
| Local inference | Compute on hardware you control | Zero cost; hardware, power, setup, maintenance, and review remain |
| Human and retry cost | Time spent rerunning, checking, correcting, and integrating | Usually visible on a provider receipt |
The Smart Spend router owns the current model shortlist. The prompt-caching guide owns cache mechanics, the subscription-capacity guide owns non-rollover allowance, and the benchmark-literacy guide explains why evaluator cost is not your workflow cost. This playbook connects those decisions without replacing them.
The savings stack, in order
- Use deterministic work first. Parse, filter, sort, diff, validate, calculate, and format with ordinary code when the rule is known. Do not pay a model to rediscover a reliable local operation.
- Choose the right access path. Decide whether the task belongs in already-paid subscription capacity, a metered API, a purchased-credit lane, verified promotional access, or local inference. Never treat one ledger as another.
- Write the acceptance test. Define the required files, schema, checks, evidence, latency, and rejection conditions before choosing a model or effort level.
- Retrieve only what the task needs. Search filenames and symbols first, inspect bounded ranges, and fetch targeted sources. A larger context is not a substitute for finding the right context.
- Route by task and effort. Start bounded work on the least expensive lane that has passed your test on representative tasks. Escalate ambiguity, consequential judgment, or a failed acceptance check—not mere task length.
- Stabilize reusable prefixes. Put stable instructions, schemas, tools, and examples before changing task data. Measure cache writes and hits; do not assume a stateful conversation is free.
- Batch independent deferred work. Use a provider’s Batch or deferred tier only when jobs can complete asynchronously and each output can be validated independently.
- Use only documented reset or off-peak rules. Schedule around a reset or lower-consumption window only when current provider documentation or the account UI proves it. Expired advice is not a saving mechanism.
- Verify offers at execution time. Confirm eligibility, material restrictions, expiry, and checkout or in-product terms before changing the route. A marketing page is not a receipt.
- Measure CAR and escalate selectively. Compare equal task sets, include every failed attempt and minute of review, and send only rejected or high-risk work to the more expensive lane.
Three worked workflows
1. Interactive coding
Before opening the agent, write “done” as a small contract: exact files, behavior, tests, and non-goals. Use repository search to locate the owning code and feed the model bounded excerpts instead of the whole tree. Keep project instructions and tool definitions stable so eligible repeated prefixes can cache. Start with the lower-cost model and normal effort; raise effort or model only after ambiguity remains or a check fails.
Bound tool output too. A failed build usually needs the relevant error and nearby context, not an entire log. Stop after the acceptance commands pass and the diff matches scope. For current coding-agent routing and price lanes, use Smart Spend, not this evergreen method page.
2. Bulk structured extraction
First run deterministic parsing and normalization. Give the model only the rejected or genuinely semantic rows, a fixed JSON schema, one stable instruction prefix, and a compact example set. Submit independent records through a provider’s batch service when the completion window is acceptable. Validate every response against the schema and source evidence; retry only rejected rows.
This can reduce prompt repetition, output drift, and human spot-checking together. Compare the all-in accepted-row cost with a deterministic-only baseline and a synchronous API lane. A batch discount is irrelevant if the job misses its latency or correction requirements.
3. Repository work with bounded context
Pin the branch or exact commit, protect unrelated work, and search with rg before reading. Inspect named files and line ranges, keep command output capped, and save compact phase conclusions instead of replaying full transcripts. Use tools for facts—status, diffs, tests, generated output—and the model for judgment that the tools cannot encode.
Run the acceptance tests after the smallest coherent edit. If a failure identifies one surface, reread that surface rather than reloading the repository. This is the same principle behind prompt-caching and agent context control: stable useful context is valuable; unbounded context is a recurring tax.
Provider decision table
| Provider or route | Use the saving mechanism when | Keep this boundary |
|---|---|---|
| OpenAI | Use already-paid ChatGPT capacity for eligible interactive work and the API for metered automation. Route model and effort to the task, preserve reusable cache prefixes, and use Batch or Flex pricing only when the workload fits. | OpenAI’s flexible-usage terms say supported features such as ChatGPT Work and Codex can draw from the same agentic allowance and credit balance. Included plan use, purchased ChatGPT credits, and API billing remain separate. |
| Anthropic | Use Message Batches and prompt caching for suitable API work. Eligible Pro, Max, and Team subscribers can buy usage bundles that apply after included limits. | Claude, Claude Code, and Desktop count toward the same subscription usage limit. A usage bundle does not replace included allowance, and API Batch remains an asynchronous API lane. |
| Z.AI | Treat the GLM Coding Plan as a supported-tool subscription lane. Its current FAQ assigns different quota multipliers to models, so routine work may consume less plan quota on a lower-multiplier eligible model. | The Coding Plan is restricted to officially supported tools. Its FAQ still shows an older limited-time 1× off-peak benefit that ended in June; do not reuse it. Plan quota, invite credits, and general API billing are separate. Reduced quota consumption is not cheaper API tokens. |
| DeepSeek direct API / OpenCode Zen | Compare DeepSeek’s metered direct API with the separately operated OpenCode Zen route. Use provider caching where the exact route qualifies. | OpenCode currently lists deepseek-v4-flash-free as DeepSeek V4 Flash Free for a limited time, but the label does not prove the exact backend revision, durable availability, or direct-API equivalence. OpenCode’s privacy note says free-period data may be used to improve the model; do not send confidential material. |
Gemini is excluded from v1. The execution-day primary-source review found Batch and context-caching mechanisms, but neither adds a distinct decision to this stack. Exclusion is not a claim that Gemini is expensive or incapable.
Dated promotions ledger
Promotions are execution-time options, not the foundation of a cost plan.
| Offer | Status | Eligibility | Material restriction | Expiry | Primary source | Verified |
|---|---|---|---|---|---|---|
| ChatGPT Desktop referral promotion | Current terms; account-specific offer | Inviter and recipient accounts that meet the offer shown in-product | Benefit, qualifying action, cap, cooldown, and redemption rules vary. AIHackers publishes no OpenAI referral link. | Not published universally; the offer controls | OpenAI terms and the AIHackers guide | 2026-08-13 |
| OpenCode DeepSeek V4 Flash Free | Free, limited-time | OpenCode Zen account while deepseek-v4-flash-free remains listed | Separate from direct DeepSeek API; exact backend revision is unverified; free-period data may be used to improve the model | Not published | OpenCode Zen | 2026-08-13 |
Z.AI’s invite discount is omitted. Its public rules now say 10% on an eligible first GLM Coding subscription, but an execution-day account checkout was not available to confirm the payable result. Kimi’s current Code and membership pages expose subscription credits but no current negotiated offer; the Kimi Work half-consumption event found in first-party rules ended June 30. The alleged Anthropic “50% more until August 19” offer is also omitted because no current first-party source was found. See the broader deals ledger and Free Stack for offers with their own evidence and expiry boundaries.
Measure Cost per Accepted Result
AIHackers uses one formula:
CAR = (model/tool cost + human review and cleanup hours × loaded hourly rate) / accepted tasks
CAR is not API token price, subscription quota consumption, benchmark cost per task, or a provider’s self-reported session cost. Use equal task coverage, keep rejected attempts in the numerator, and return not-run rather than manufacturing missing receipts or review time.
Hypothetical comparison—not an AIHackers result: Lane A spends $0.60 on four attempts, accepts two tasks, and needs 72 minutes of review and cleanup at $60/hour. Its CAR is ($0.60 + 1.2 × $60) / 2 = $36.30. Lane B spends $4.00, accepts all four tasks, and needs 24 minutes at the same rate. Its CAR is ($4.00 + 0.4 × $60) / 4 = $7.00. The higher model bill wins because retries and human time dominate.
DeepSeek is still not-run
PR #92 proves tooling and connectivity preflight only. The repository’s DeepSeek CAR remains not-run. Publishing a result requires reviewed receipts, equal task coverage, explicit acceptance decisions, billing reconciliation, and an owner-approved sanitized aggregate. The OpenCode guide and DeepSeek analysis describe the current routes; neither is a site-owned accepted-result finding.
The ten-minute cost audit
- Pick one repeated workflow and write its acceptance rule.
- Label its access path: subscription, purchased credit, API, promotion, or local.
- Record model/tool cost, attempts, accepted tasks, review minutes, and cleanup minutes.
- Identify deterministic work and context that can be removed before the next run.
- Check whether stable prefixes, targeted retrieval, or Batch fit the workload.
- Calculate CAR with a real loaded hourly rate.
- Change one variable, rerun the same task set, and keep the cheaper accepted-result lane.
Frequently asked questions
What is the best first step for reducing LLM costs?
Write the acceptance test before choosing a model. Cost per accepted result includes retries and human cleanup, so the cheapest token route can be the more expensive workflow.
Are subscription limits the same as API credits?
No. Included subscription allowance, purchased product credits, promotional access, and metered API billing are separate ledgers with different rules.
When should an LLM task use Batch processing?
Use Batch for asynchronous, independent work that can tolerate the provider’s completion window and that has a machine-checkable output contract.
Does AIHackers have a DeepSeek cost-per-accepted-result finding?
No. The repository has connectivity and tooling preflight evidence, but its DeepSeek CAR remains not-run.
This page is the provider-spanning method. Use Smart Spend for current routing, Free Stack and deals for bounded access, the ChatGPT referral guide for account-specific referral terms, the Z.AI guide for Coding Plan details, and the canonical caching, subscription-capacity, OpenCode, DeepSeek, and benchmark-literacy pages for the underlying evidence.