Your team lands a free token allowance. Ten million tokens. The dashboard looks generous. The agent skeleton is live by Friday. By Tuesday the allowance is gone.
Nobody measured the price of a single task before the spending started. This week's AI discourse keeps asking who guards the reviewer. That is a fair question, but the guard is not a second model. It is a measurement.
This post is a benchmark for that failure mode. It answers one practical question: how many completed tasks does a token allowance actually buy?
Why a token count is a constraint, not a benefit
A token allowance is inventory. What you plan with is tokens per task.
Ten million tokens sounds like a lot. Split across heavy agent attempts, it can vanish in a weekend. The gap is not a pricing problem. It is a definition problem: you never fixed the unit you were buying.
Step 1: Define a task unit
A task must be repeatable and atomic. A fuzzy task produces a fuzzy price.
| Level | Task unit |
|---|---|
| Small | Classify one GitHub issue into one of five labels |
| Medium | Summarize an issue thread into a triage decision |
| Large | Draft a release summary from a filtered commit list |
Pick one unit for the first run. One model. One prompt. That unit is your currency.
Step 2: Freeze a dataset
Collect 20–30 real inputs. Store them as JSON. Add an id and an expected outcome where one exists.
{
"id": "issue-001",
"title": "Worker dies on SIGTERM during batch flush",
"body": "After 30 minutes of processing, the worker exits without flushing pending rows.",
"expected_labels": ["bug", "reliability"]
}
Four rules:
- No new samples mid-run.
- No prompt edits between runs.
- The dataset lives in version control.
- Hold out five samples for a later pass.
If the dataset changes, the benchmark is a new benchmark.
Step 3: Decide what you will report
Report all of these. Any single one hides the story.
- Tokens per attempt — the cost of asking.
- Tokens per success — the real price after retries.
- Success rate — the share of attempts that pass your check.
- Wall-clock per success — the latency humans actually feel.
- Retry rate — how often you pay twice for one win.
The number that matters is tokens per success. It is also the number missing from every marketing page.
Step 4: Lock the controls
- Model: fixed.
- Temperature: 0 for deterministic work.
- Prompt version: pinned in git.
- Caching: off, or recorded explicitly.
- Concurrency: 1 for the first run.
- Warmup: one call before timing starts.
Controls are what make your number comparable next week.
Step 5: Run a minimal harness
The runner below is OpenAI-compatible, so it points at most providers without changes.
import json
import os
import time
from concurrent.futures import ThreadPoolExecutor
from openai import OpenAI
client = OpenAI(
base_url=os.environ.get("LLM_BASE_URL"),
api_key=os.environ.get("LLM_API_KEY"),
)
def build_prompt(sample: dict) -> str:
return (
"Label the issue below. Reply with one label and one short sentence.\n"
f"Title: {sample['title']}\nBody: {sample['body']}"
)
def run_task(sample: dict) -> dict:
prompt = build_prompt(sample)
t0 = time.monotonic()
resp = client.chat.completions.create(
model=os.environ["LLM_MODEL"],
messages=[{"role": "user", "content": prompt}],
temperature=0,
)
elapsed = time.monotonic() - t0
usage = resp.usage
return {
"id": sample["id"],
"seconds": round(elapsed, 2),
"input_tokens": usage.prompt_tokens,
"output_tokens": usage.completion_tokens,
"finish_reason": resp.choices[0].finish_reason,
}
def main(path: str, workers: int = 1) -> None:
samples = json.load(open(path))
with ThreadPoolExecutor(max_workers=workers) as pool:
results = list(pool.map(run_task, samples))
with open("results.jsonl", "w") as f:
for result in results:
f.write(json.dumps(result) + "\n")
if __name__ == "__main__":
main("dataset.json")
Run it with one thread first:
export LLM_BASE_URL="https://your-endpoint.example/v1"
export LLM_API_KEY="your_key"
export LLM_MODEL="your_model"
python harness.py dataset.json
Concurrency hides cold starts. The free tier is exactly where cold starts live.
Step 6: Do the allowance math
Convert the results into a budget.
Take illustrative numbers and do the arithmetic:
- 4,900 tokens per attempt.
- 80% success rate.
- That is 6,125 tokens per success.
- A 10,000,000-token free allowance buys roughly 1,630 successful tasks.
Treat those as placeholder numbers, not measurements. The harness produces your own. Token accounting shifts with model, prompt, and provider, so never copy someone else's ratio.
Also compute the failure tax. Retries consume tokens on top of the attempt cost. On free plans, rate limits usually make that worse, not better.
Run it where the traffic is real
Local machines lie. Your laptop has a fast network, no rate limits, and no cold starts.
MonkeyCode is an open-source project with two claims that matter here: free model access and a free server option. The free server is useful beyond price. It puts your harness in the same network class as real users, which means cold starts and latency show up in the measurement instead of hiding behind your Wi-Fi.
Disclosure: This article was prepared as part of MonkeyCode's product outreach.
Treat those claims as things to verify, not facts to assume. Point this harness at MonkeyCode, then point the same dataset at another free tier you already have. Same prompt, same controls, different endpoint. The comparison that survives is tokens per success.
Limitations
- Twenty to thirty samples is a signal, not a guarantee.
- Free tiers change. Quotas, rate limits, and model routing are not permanent.
- Token counts vary with model and prompt version.
- Success depends on your check function. A weak check produces optimistic numbers.
Who should not use this approach
- Teams with hard production SLAs. Measure by all means, but read the contract too.
- Teams that cannot freeze a dataset. Unstable inputs mean unstable numbers.
- Teams with very little traffic. If the benchmark costs more than the risk, skip it and observe in production.
The takeaway
Free tokens are inventory. The task is the consumer. Measure the consumer price before you celebrate the inventory.
That one number changes what you build. It also removes the surprise when the free plan runs dry. Run the harness against two providers before your next Monday. MonkeyCode's free allowance is a reasonable candidate. The other free tier in your drawer is a fine second one. Let the numbers do the arguing.
Top comments (0)