Ledger v4.0 · 24 Nov 2026 · GPU Board Energy Metered by Loupe
Coding models measured in joules.
Drop-in coding API for Claude Code, Codex CLI, OpenCode, and Cline. Within 1 test of Claude Opus 5.5 across 5 brownfield Python repos at 8.9× lower cost and 433 J NVML GPU board energy per passing test.
Request received — we’ll email your $10 EcoCoder evaluation key directly.
Pick your client to preview your ready-to-paste setup:
Step 1: No-charge Evaluation Preview (provisioned by email, no card collected) · 2-min quickstart → · Already invited? Open Portal ↗
Step 2 — paste your emailed key into Claude Code, Codex CLI, OpenCode, Cline, or curl:
printf "EcoCoder API key: " >&2 && IFS= read -rs ECOCODER_API_KEY && echo && export ECOCODER_API_KEY ANTHROPIC_BASE_URL="https://api.leanlm.ai" ANTHROPIC_API_KEY="$ECOCODER_API_KEY" claude --model ecocoder
# ~/.codex/config.toml -> run: codex -c model_provider="ecocoder" -m ecocoder [model_providers.ecocoder] name = "EcoCoder" base_url = "https://api.leanlm.ai/v1" env_key = "ECOCODER_API_KEY" wire_api = "responses" supports_websockets = false
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"leanlm": {
"npm": "@ai-sdk/openai-compatible",
"name": "LeanLM EcoCoder",
"options": { "baseURL": "https://api.leanlm.ai/v1", "apiKey": "{env:ECOCODER_API_KEY}" },
"models": { "ecocoder": { "name": "EcoCoder", "limit": { "context": 128000, "output": 32768 } } }
}
},
"model": "leanlm/ecocoder"
}
# VS Code Cline -> Settings -> API Provider: OpenAI Compatible Base URL: https://api.leanlm.ai/v1 API Key: $ECOCODER_API_KEY Model ID: ecocoder Context Window: 128000 Max Output: 32768
curl -i -sS https://api.leanlm.ai/v1/messages \
-H "Content-Type: application/json" \
-H "x-api-key: $ECOCODER_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-d '{"model":"ecocoder","max_tokens":256,"messages":[{"role":"user","content":"Write a pytest check for Retry-After."}]}'
HTTP/2 200 · X-LeanLM-Cost-Usd: 0.0029 · X-LeanLM-Energy-Joules: 841.4 · 96.0% brownfield prefix-cache hit · API specs & CLI SHA · Status
97.5% (509/522)
Java 11/12 unseen OSS
JavaScript 9/12 unseen OSS
TypeScript 87/89 (61.2k LOC, v3.0)
Benchmarks · Ledger v4.0 (24 Nov 2026)
Brownfield repositories & unseen OSS PRs—including short-PR tradeoffs.
Across 5 multi-file brownfield Python repositories (522 tests), EcoCoder preserved 100% of inherited regressions (295/295) and finished within 1 test of Claude Opus 5.5 (509/522 vs. 510/522) at 8.9× lower API cost ($0.89 vs. $7.95), 1.6× shorter median wall time (271s vs. 441.5s), and 433 J of NVML GPU board energy per passing test—while beating Claude Haiku 5.5 on aggregate pass rate, cost, median speed, and GPU board energy. Across 24 unseen held-out Java & JavaScript OSS commits, EcoCoder matched Sonnet 5.5’s 20/24 total and beat Haiku 5.5 (19/24), while raw Sonnet (14.9s median), Opus (36.3s), and Haiku (42.0s) finished short PRs faster:
Opus* 3,684 · Haiku* 374–1,378 kJ
Opus $7.95 · Haiku $1.25
Opus 510 · Haiku 469 (84.7% reg)
Haiku 10/12
Opus 40.6s · Sonnet 18.8s
commons-cli 1/1commons-codec 8/9 · JSON-java 2/2Opus 10/12
Raw Sonnet 14.0s · Opus 32.6s
commander.js 7/8node-semver 2/4commander.js
Honest short-PR latency
Sonnet* 490 · Opus* 1,596 · Haiku* 240–777
Sonnet $1.74 · Opus $4.83 · Haiku $0.38
Matches Sonnet 5.5 total (20/24)
5 Multi-File Brownfield Python Repositories (522 Tests · Ledger v4.0)
| Model / Lane (5 Repos, 522 Tests) | Tests Passed | Inherited Regressions | GPU Board Energy | API Cost | Median Wall |
|---|---|---|---|---|---|
ecocoder Standard |
509 / 522 (97.5%) | 295 / 295 (100%) | 220.5 kJ NVML (433 J/pass) | $0.89 (−89% vs. Opus) | 271.0s (27.0m sum) |
claude-opus-5-5 |
510 / 522 (97.7%) | — | 3,683.5 kJ* est [1.8k–7.2k] | $7.95 (8.9× EcoCoder) | 441.5s (30.6m sum) |
claude-haiku-5-5 |
469 / 522 (89.8%) | 250 / 295 (84.7%) | ~374–1,378 kJ* est | $1.25 (>100k tier on 3/5 repos) | 352.3s (31.1m sum) |
24 Unseen Held-Out Java & JavaScript OSS Commits (Ledger v4.0)
| Model / Lane (24 Unseen OSS) | Solved (/24) | Java / JS | GPU Board Energy | API Cost (Per Solve) | Median Wall |
|---|---|---|---|---|---|
ecocoder Standard |
20 / 24 (83.3%) | 11/12 · 9/12 | 132.8 kJ NVML (1.54 Wh/task) | $1.26 ($0.063/solve) | 55.1s (26.5m sum) |
claude-opus-5-5 |
21 / 24 (87.5%) | 11/12 · 10/12 | 1,596 kJ* est [769–3,139] | $4.83 ($0.230/solve) | 36.3s (15.6m sum) |
claude-sonnet-5-5 |
20 / 24 (83.3%) | 11/12 · 9/12 | 490 kJ* est [240–933] | $1.74 ($0.087/solve) | 14.9s (7.4m sum) |
claude-haiku-5-5 |
19 / 24 (79.2%) | 10/12 · 9/12 | ~240–777 kJ* est | $0.38 ($0.020/solve; $0.32 5m) | 42.0s (23.7m sum) |
Brownfield vs. short-PR tradeoffs & boundaries: On short single-PR OSS commits below 100k context tokens, raw Claude Sonnet 5.5 (14.9s median), Opus 5.5 (36.3s), and Haiku 5.5 (42.0s) finish faster than EcoCoder (55.1s), and Haiku 5.5 costs less ($0.38 vs. $1.26) while missing an extra task (19/24 vs. 20/24) and emitting 239k output tokens across 375 turns (~240–777 kJ* modeled GPU board energy). Across all 5 multi-file brownfield Python repositories (where 3 of 5 crossed Haiku’s 100k context pricing cliff), EcoCoder beats Haiku 5.5 overall on pass rate (97.5% vs. 89.8%; 100% vs. 84.7% inherited regressions, driven by file_backup where Haiku broke 45/50 legacy tests; on the 3 >100k repos alone Haiku passed 279/287 vs. 275/287 while costing 36% more), cost ($0.89 vs. $1.25), median speed (271.0s vs. 352.3s), and GPU board energy (220.5 kJ NVML vs. ~374–1,378 kJ*). All EcoCoder energy figures measure GPU board energy only; *Claude 5.5 energy figures are modeled (assumptions → · Prior Release Archive v3.0 →).
433 J
Measured GPU board energy per passing brownfield test (220.5 kJ / 509 passed)
GPU board boundary →
8.9×
Lower API cost than Opus 5.5 on brownfield Python ($0.89 vs. $7.95; 28% cheaper than Haiku $1.25)
$0.30 / $0.03 / $1.20 per 1M →
295/295
Inherited brownfield regressions preserved (100% vs. Haiku 5.5 at 250/295 / 84.7%)
5-repo breakdown →
1.54 Wh
Mean measured GPU board energy per unseen OSS PR (5.53 kJ; 12.2 Wh per brownfield repo)
3,600 kJ = 1 kWh →
GPU Board Energy Telemetry · Powered by Loupe
Every response returns its measured GPU board joules.
Token counts hide physical compute work. Reading cached repository context, prefilling fresh files, and decoding patches draw very different power on an accelerator, so Loupe samples NVIDIA NVML board sensors on every EcoCoder turn (GPU board energy only, excluding host CPU, system DRAM, network, and facility cooling).
Direct NVML Board Sensors
Per-turn GPU board joules alongside USD spend.
Loupe integrates live GPU board watts over execution time into joules (3,600 kJ = 1 kWh) and returns X-LeanLM-Energy-Joules on every response (reconciled within 0.08% against batch energy counters on the 5-repo Python run). EcoCoder measured 220.5 kJ (61.2 Wh) across 5 brownfield Python repos and 132.8 kJ (36.9 Wh; 1.54 Wh/task) across 24 unseen OSS commits vs. modeled estimates of 3,684 kJ* and 1,596 kJ* on Opus 5.5.
Warm Prefix Reuse
96.0% KV-cache hits skip prefill watts.
Multi-turn coding agents re-send repository context dozens of times per task. Serving 96.0% of prompt tokens from warm GPU prefix cache on the 5 brownfield Python repos (14.13M cached of 14.72M prompt tokens) avoids repeated prefill compute—cutting GPU board watts and reducing effective spend ($0.03/1M cached input, $0 cache-write fee) to $0.0597/1M total blended tokens (input + output).
Code Hygiene & Follow-On Payback
Clean edits cut follow-on feature turns by 49%–63%.
Keeping multi-file structure clean reduces downstream agent work just as much as prefix caching. In a controlled single-repository sequential case study (~3,500 LOC vs. an unguided baseline), starting from an EcoCoder-maintained checkpoint cut next-feature turns by 49%–63%, cached input tokens by 60%–75%, and next-feature API spend by 35%–43% (case study →). For unattended overnight CI that can absorb queue holds, see optional --flex pricing below.
xjq brownfield session receipt
# Every non-streaming response returns measured GPU board joules + USD spend:
X-LeanLM-Energy-Joules: 841.4
X-LeanLM-Cost-Usd: 0.0029
$ ecocoder stats --run-id xjq-cp4-cp5
Session GPU board energy: 24.4 kJ (6.8 Wh) · NVIDIA NVML board sensors (excludes CPU/DRAM/cooling)
Session spend: $0.085 · 167/167 tests passed · 92.5% cached prompt tokens (xjq)
Published Token Pricing & Drop-In Setup
$0.30 in · $0.03 cached · $1.20 out / 1M.
Start with ecocoder Standard (~2s–4s/turn, ~$0.05/PR, $0.18/brownfield repo) across Anthropic (/v1/messages), OpenAI (/v1/chat/completions), and Codex (/v1/responses) wire protocols in Python, TypeScript, JavaScript, and Java. Flat across all context lengths with zero >100k tier surge and $0 cache-write fees (open the 64k cached coding preset in the calculator →).
ecocoder StandardDefault for live terminal sessions in Claude Code, Codex CLI, OpenCode, Cline, and pi on US NVML GPU nodes (~2s–4s/turn median latency). Visible output and internal reasoning/thinking tokens bill at the same $1.20/1M output rate (zero separate thinking surcharge), $0 cache-write fee, and no long-context cliff. Observed blended total cost: $0.060–$0.070/1M tokens at 92%–96% cache hit.
--flexOptional flag (--flex or header X-LeanLM-Flex: eco) for unattended overnight and background CI runs (visible output and thinking tokens both discount at $0.96/1M). Best-effort async queue: matches Standard (~2–8s/turn) when capacity is open, or holds up to ~60s/turn under load (5×–18× longer multi-turn wall time, and metered GPU board energy can rise during holds). Use ≥15–30m CI timeouts (≥60m on large repos), not interactive sessions.
| Model / Lane | Uncached Input | Cached Input | Output & Thinking | 5 Brownfield Repos | 24 Unseen OSS PRs |
|---|---|---|---|---|---|
ecocoder Standard |
$0.30 / 1M ($0 write) | $0.03 / 1M (−90%) | $1.20 / 1M | $0.89 · 220.5 kJ | $1.26 · 132.8 kJ |
ecocoder --flex (−20% CI) |
$0.24 / 1M ($0 write) | $0.024 / 1M (−90%) | $0.96 / 1M | $0.72* (0.80× repriced) | $1.00* (0.80× repriced) |
claude-haiku-5-5 (≤100k) |
$0.10 / 1M (>100k surge) | $0.01 / 1M | $0.50 / 1M | $1.25 (3/5 >100k) | $0.38 ($0.32 5m) |
claude-sonnet-5-5 |
$2.00 / 1M ($2.50 5m write) | $0.10 / 1M | $10.00 / 1M | — | $1.74 (490 kJ* est) |
claude-opus-5-5 |
$4.00 / 1M ($5 5m / $8 1h) | $0.20 / 1M | $20.00 / 1M | $7.95 (3,684 kJ* est) | $4.83 (1,596 kJ* est) |
*--flex ($0.72 / $1.00 repriced at 0.80×) is an unattended CI discount rather than a lower-energy lane: metered NVML GPU board energy can rise during ~60 s server queue holds (live A/B note →). Anthropic reference rates per anthropic.com/pricing. Unlike Claude Haiku 5.5—which jumped past its ≤100k headline rate on 3 of 5 brownfield Python repos ($1.25 total)—EcoCoder holds one flat rate across context lengths. Direct HTTPS processes prompts in memory with zero repository file staging; our optional ecocoder CLI helper stages eligible source files in an ephemeral workspace purged on exit (Privacy Policy →).
Billing Rules & Dedicated Crossover
Preview transition, non-expiring credits & when dedicated wins.
$0 collected during Evaluation Preview ($10 hard cap stops cleanly with HTTP 402 and zero overage). We send ≥30 days email notice before any preview-to-paid transition; paid prepaid credits do not expire, existing credit balances are grandfathered on rate updates, hard per-key caps prevent runaway loops, and no processing surcharge is added to token rates. Above ~60%–80% steady 24/7 GPU utilization, dedicated clusters beat serverless per-token billing (self-hosting break-even math →).
SKU Stability & Support
Versioned behavior, ZDR defaults & engineer support.
The active ecocoder endpoint is pinned to dated benchmark releases (Ledger v4.0 · 2026-11-24) with zero silent quality-degrading swaps or unannounced precision downgrades (SKU stability policy & changelog →). Zero training on customer code or prompts by default. Support goes straight to engineers at hello@leanlm.ai—no deflection bots.
printf "EcoCoder API key: " >&2 && IFS= read -rs ECOCODER_API_KEY && echo && export ECOCODER_API_KEY ANTHROPIC_BASE_URL="https://api.leanlm.ai" ANTHROPIC_API_KEY="$ECOCODER_API_KEY" claude --model ecocoder
128k context window · SSE tool streaming · Also supports Codex CLI, OpenCode, Cline, pi, and our SHA-256-verified Python 3 CLI (2-minute setup & API specs →).
Questions
Frequently asked questions
Why do you measure GPU board joules per passing test alongside API dollars?
Token counts hide physical compute work because reading cached repository context, prefilling fresh files, and generating output tokens draw very different power on a GPU—and energy without a quality floor is easy to game with tiny models that fail tests. Loupe samples NVIDIA NVML board sensors on every EcoCoder turn (GPU board energy only, excluding host CPU, DRAM, network, and cooling; 3,600 kJ = 1 kWh). Across 5 brownfield Python repos (522 tests, Ledger v4.0), EcoCoder averaged 433 J per passing test at a 97.5% pass rate with 295/295 inherited regressions preserved.
How does EcoCoder compare with Claude Opus 5.5, Sonnet 5.5, and Haiku 5.5?
On 5 brownfield Python repos (522 tests), EcoCoder passed 509/522 (97.5%, 295/295 inherited regressions) in 271.0s median wall time for $0.89 Standard ($0.72 --flex) and 220.5 kJ NVML GPU board energy—within 1 test of Opus 5.5 (510/522, $7.95, 441.5s, 3,684 kJ* est [1,789–7,191 kJ]) at 8.9× lower cost, while beating Haiku 5.5 (469/522, 89.8%, 250/295 regressions, $1.25 after exceeding 100k context pricing on 3/5 repos, 352.3s, ~374–1,378 kJ* est) on overall pass rate, cost, speed, and energy. On 24 unseen Java/JS OSS commits, EcoCoder resolved 20/24 (83.3%: 11/12 Java, 9/12 JS, 0 timeouts) for $1.26 ($0.052/task; $1.00 --flex from $1.0050) and 132.8 kJ NVML vs. Opus 21/24 ($4.83, 1,596 kJ* est [769–3,139 kJ]), Sonnet 20/24 ($1.74, 490 kJ* est [240–933 kJ]), and Haiku 19/24 ($0.38, ~240–777 kJ* est), while raw Sonnet (14.9s), Opus (36.3s), and Haiku (42.0s) finish short PRs faster than EcoCoder (55.1s; full Ledger v4.0 →).
What is EcoCoder’s token pricing, and how does --flex work?
Every Standard turn bills at $0.30 per 1M uncached input tokens, $0.03 per 1M cached input tokens (90% discount, $0 cache-write fee), and $1.20 per 1M output & reasoning tokens—flat across context lengths with zero >100k surge ($0.060–$0.070/1M blended at 92%–96% cache hits; $0.18/brownfield repo; $0.052/short PR; ~2s–4s/turn). Passing --flex (or X-LeanLM-Flex: eco) applies a flat 20% async/CI discount ($0.24 / $0.024 / $0.96 per 1M) on a best-effort async queue: it matches Standard (~2–8s/turn) when capacity is open, or holds up to ~60s/turn under load (5×–18× longer multi-turn wall time, and metered GPU board energy can rise during holds). Use --flex for unattended overnight/background CI jobs, not interactive terminal sessions.
Do you train on customer code, and what does the CLI stage?
Stellar Content Inc. (d/b/a LeanLM) never trains, fine-tunes, or distills models on customer code or prompts. Direct HTTPS connections process prompts in volatile memory without syncing repository files and log only numeric turn receipts (token counts, GPU board joules, USD cost, status, and latency) for 90 days. By contrast, the optional ecocoder CLI wrapper stages eligible tracked and untracked non-ignored source files (≤1 MiB/file, 15 MiB max; inspect locally with ecocoder sync-preview) in an ephemeral tenant workspace deleted on session exit (≤24h sweep on abnormal disconnect; Privacy Policy → · Security →).
How do evaluation keys and design-partner access work?
EcoCoder is currently offered as a no-charge Developer & Design-Partner Evaluation Preview. Enter your email below for a $10.00 hard-capped evaluation key (no credit card collected; ~55 brownfield repo runs or ~190 short OSS PRs). Commercial team onboarding is gated to our design-partner waitlist at hello@leanlm.ai.
Built by
Chris Cholette — Founder, LeanLM
Engineering executive with 15+ years leading platform and infrastructure organizations at Navan, Salesforce/MuleSoft, and Sunrun. Built Loupe and EcoCoder to measure coding models in physical GPU board joules and passing tests rather than token sticker prices (about & company facts → · LinkedIn ↗).
No-Charge Developer & Design-Partner Preview
Request a $10 evaluation key.
Enter your email and we’ll provision and email your eco_live_... evaluation key ($10.00 promotional cap, no credit card collected, zero training on your code). Interested in the commercial design-partner waitlist? Email hello@leanlm.ai.
Request received — we’ll email your $10 EcoCoder evaluation key directly.
Pick your client to preview your ready-to-paste setup:
By requesting a key, you agree to our Terms of Service and Privacy Policy. Already provisioned? Sign in at api.leanlm.ai/portal →