Skip to content

Use Reducto’s reported usage for Extract cost - #166

Merged
xujustinj merged 7 commits into
mainfrom
codex/reducto-extract-cost
Nov 21, 2026
Merged

xujustinj merged 7 commits into
mainfrom
codex/reducto-extract-cost

Conversation

@xujustinj

@xujustinj xujustinj commented Nov 19, 2026 •

Copy link
Copy Markdown

What changed

Remove the legacy Deep Extract formula that can override Reducto’s reported credits. Apply this fallback order:

  1. Use returned usage.credits, including zero, at Reducto’s published $0.01 per credit. Reducto announcement
  2. Estimate from usage.usage_breakdown.extract_pages using the reported Extract product and tier. List rates
  3. Fall back to Reducto’s usage.num_pages when the Extract mode is known. Usage export units

Both page paths produce list-price estimates even for dense jobs or missing field counts. The pricing helper retains a finite field limit, and ExtractBench passes infinity. Two dense Deep Extract jobs totaled $0.24 over six pages in Reducto’s dashboard, which matched the $0.04/page base rate. Spot check · Surcharge policy

Why

The old public adapter calculated Deep Extract cost as:

credits = max(30, 4 × pages + 0.1 × extracted_fields) + pages
cost_usd = credits × $0.015

The 30-credit minimum applied to extraction, and the final + pages added one parse credit per page. A two-page job with zero extracted fields came to (30 + 2) × $0.015 = $0.48, even if Reducto returned a different credit total. Old adapter

Reducto announced the switch to per-product pricing on August 25, 2026, effective September 1. The migration guide lists Deep Extract at $40 per 1,000 pages with parsing included. The announcement sets the new list credit value at $0.01. The migration guide says contracted credit-based pricing remains in place until renewal. Responses on per-product pricing carry usage_breakdown with credits: null, so the new page-rate path uses no credit conversion. The $0.015 figure in the formula above is the historical benchmark conversion. Reducto announcement · Pricing migration and API response shapes

Testing

70 local tests passed across Reducto pricing, deadline handling, and attempt accounting. Coverage includes both page fallbacks, dense and missing field counts, and the finite-limit policy. Ruff and diff checks passed.

@boyang-zhang1

Copy link
Copy Markdown
Member

We checked whether Reducto actually applies the dense-field surcharge. We ran 2 short Deep Extract docs, both well over 100 fields/page (192 and ~250). Reducto billed $0.24 for 6 pages, a flat $0.04/page, with no surcharge.

So we price Deep Extract at the flat page rate.

One gap on Reducto's side: their pricing docs say dense extractions "may incur a per-field surcharge", but the API no longer returns credits or cost per job (usage.credits is null). So we can't verify per-job charges, only dashboard totals.

@xujustinj

Copy link
Copy Markdown
Author

lol ok, then I'm gonna put back the 4-cent fallbacks

I'm sure Reducto won't mind us making them look cheaper if that's wrong

@xujustinj
xujustinj merged commit 2c9008b into main Nov 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants