Qwen3.8 Max (0902) vs Qwen3.8 27B vs Qwen3.8 Flash vs Qwen3.7 Plus on invoice text to json
Alibaba models side by side on "Invoice text to JSON": Qwen3.8 Flash scores 10/10; Qwen3.8 Flash is the cheapest answer scoring 8+ at $0.13 per 1,000 runs. Outputs, checks, judge reasons, latency and cost.
The prompt every model received
System
You are a data extraction engine. Reply with JSON only, no prose, no code fences.
User
Extract the fields below from the invoice text and return one JSON object with exactly these keys: vendor (string), invoice_number (string), total (number), currency (ISO 4217 string), due_date (YYYY-MM-DD string).
Invoice text:
Northwind Print Co.
Invoice INV-2041
Issued: 15 September 2026
Payment due: 15 October 2026
Items: 500 x A5 flyers @ 1.20 = 600.00; 4 x roll-up banners @ 171.13 = 684.50
Total due: USD 1,284.50
Thank you for your business.
Rubric for the judge: Valid JSON with the five keys, numeric total 1284.5, ISO due date, no extra keys or commentary.
Side by side
Every cell is one OpenRouter call at temperature 0 with the prompt's token cap and reasoning effort "low" where the model supports it. Cost is usage × the catalogue rate in models.json. Quality is one judge call to anthropic/claude-haiku-4.5 against the prompt's rubric, cached per prompt version.
Qwen3.8 Max (0902)
qwen/qwen3.8-max-0902
10/10
Latency
1.1s
Cost
$0.00116
Per 1,000
$1.16
222 in · 119 out (70 reasoning) · 3 words · checks 6/6
Judge: Output is valid JSON with exactly the five required keys, correct numeric total (1284.50), proper ISO 4217 currency code (USD), correctly formatted due date (2026-10-15), no extra keys or commentary.
Qwen3.8 27B
qwen/qwen3.8-27b
10/10
Latency
450ms
Cost
$0.00046
Per 1,000
$0.46
222 in · 160 out (111 reasoning) · 3 words · checks 6/6
Judge: Output is valid JSON with exactly the five required keys, correct numeric total (1284.50), proper ISO 4217 currency code (USD), correct due date in YYYY-MM-DD format (2026-10-15), no extra keys or commentary.
Qwen3.8 Flash
qwen/qwen3.8-flash
10/10
top judge scorecheapest scoring 8+
Latency
5.1s
Cost
$0.00013
Per 1,000
$0.13
234 in · 196 out (125 reasoning) · 14 words · checks 6/6
Judge: All five required keys present with correct values: vendor, invoice_number, total (1284.50), currency (USD), and due_date (2026-10-15 in YYYY-MM-DD format); valid JSON with no extra keys or commentary.
Qwen3.7 Plus
qwen/qwen3.7-plus
10/10
Latency
2.1s
Cost
$0.00117
Per 1,000
$1.17
196 in · 861 out (791 reasoning) · 14 words · checks 6/6
Judge: Output is valid JSON with exactly the five required keys, correct numeric total (1284.5), proper ISO 4217 currency code (USD), correct ISO 8601 due date format (2026-10-15), no extra keys or commentary.
Frequently asked
▸What does this prompt test?
Extract JSON: Valid JSON with the five keys, numeric total 1284.5, ISO due date, no extra keys or commentary. The deterministic checks are json_valid, json_keys, contains, contains, contains, contains.
▸Which model should I pick for this task?
If the judge's bar of 8/10 is good enough for you, Qwen3.8 Flash at $0.13 per 1,000 runs. If you need the top score, Qwen3.8 Flash at $0.13 per 1,000 runs.
If our calculators helped you cut down on hidden AI wallet leaks, thanks for using them. A tiny fraction of your savings is what keeps our pricing indexes updated daily.
Not sure which AI is cheapest for your use case? Find out in 30 seconds — no signup required.