GuidesOneMux

Qwen4 Max API Cost Guide for JSON Schema Extraction

Estimate Qwen4 Max extraction costs per document and per 100,000 documents, including retries, cache assumptions, and JSON schema validation.

AI

Summary · TL;DR

An illustrative 100,000-document extraction workload costs $435 at the supplied official Qwen4 Max input and output rates, or $124.41 at OneMux's published rates, before retries and caching. Actual cost depends on token usage, validation failures, and applicable billing terms.

Key Takeaways

  • At 2,000 input tokens and 300 output tokens per document, the illustrative cost is $4.35 per 1,000 documents at the supplied official rates and $1.2441 through OneMux.
  • A 10% full-request retry rate raises the illustrative 100,000-document totals to $478.50 and $136.851, respectively.
  • Cache savings depend on a reusable prefix, cache eligibility, and the provider's actual read and write accounting.
  • Measure cost per accepted extraction, not just cost per request: JSON that validates can still contain incorrect extracted values.
On this page (9)

The cost decision

For a structured extraction job using Qwen4 Max, start with cost per accepted document, not the input-token price alone. In the illustrative workload below, 100,000 documents at 2,000 input tokens and 300 output tokens each cost $435 at the supplied official rates or $124.41 at OneMux's published rates, before retries, caching, or other charges. OneMux is the publisher of this guide and a product included in the comparison.

These are estimates, not measured results. The right budget depends on the actual prompt and document lengths, output usage, schema-validation failure rate, and whether repeated input is billed as cached input. The supplied OrcaRouter article illustrates why cache assumptions can materially change Qwen4 Max costs; its coding-request example is not a benchmark for extraction.

Qwen4 Max price assumptions

The following snapshot was captured on November 19, 2026. Prices are in US dollars per million tokens. The official figures are the supplied catalogue's reference prices; verify the applicable provider, region, and terms before budgeting. OneMux prices are published catalogue figures, not a quote for every possible billing arrangement.

ModelOfficial inputOfficial outputOneMux inputOneMux outputPublished OneMux price ratio
Qwen4 Max$1.50$4.50$0.429$1.2870.286

The published ratio is 0.286 of the reference price, equivalent to a 71.4% reduction for these listed input and output rates. It does not establish the discount on every bill. Cache prices are different from ordinary input prices, and tier or other billing conditions may apply; check the current OneMux pricing and model page before purchasing. Unknown charges or conditions should not be assumed to be zero.

Calculate the baseline per document

Assume each document is sent once, with no cache billing and no retry. The 2,000 input tokens include the document, instructions, and any schema text sent in the request. The 300 output tokens represent all billable output for the attempt, not merely the JSON characters visible to the application. This example excludes taxes and any charges not specified in the price snapshot.

Cost componentCalculation per documentOfficial costOneMux cost
Input2,000 ÷ 1,000,000 × input price$0.003$0.000858
Output300 ÷ 1,000,000 × output price$0.00135$0.0003861
TotalInput plus output$0.00435$0.0012441

Multiply the per-document total by the number of attempts:

WorkloadOfficial estimateOneMux estimate
1,000 documents$4.35$1.2441
100,000 documents$435.00$124.41

For your own estimate, replace both token counts with observed averages from representative documents. Keep the same unit—dollars per million tokens—throughout. If the provider reports reasoning or other generated tokens as billable output, include those in the output count rather than estimating from the JSON response alone.

Add validation failures and retries

Suppose 10% of documents need exactly one full retry, and every retry has the same token counts as the first attempt. There are then 110,000 attempts for 100,000 submitted documents:

EstimateOfficialOneMux
110,000 attempts$478.50$136.851
Added cost versus baseline$43.50$12.441

If all retries succeed and every document is accepted, the costs per accepted document are $0.004785 and $0.00136851, respectively. If some documents still fail, divide total spend by the actual number accepted; do not silently treat all 100,000 as successes. Repair prompts, longer error messages, and longer outputs can also make retries more expensive than this simplified assumption.

A schema-valid response is not necessarily an accurate extraction. A date may have the right format but the wrong value. Track schema validity separately from field-level accuracy on a reviewed sample. The supplied material does not establish Qwen4 Max's extraction accuracy or its schema-validation pass rate, so both are unknown for this workload.

Model cache reads and writes separately

The supplied snapshot lists these cache prices, again per million tokens:

Cache operationOfficial priceOneMux price
Read$0.075$0.02145
Write$1.875$0.53625

Consider a hypothetical, not tested, batch of 100 documents. Each attempt contains a stable 1,000-token instruction-and-schema prefix, 1,000 fresh document tokens, and 300 output tokens. Assume the prefix is billed once as a cache write and 99 times as a cache read; fresh document tokens and output are billed on all 100 attempts. There are no retries.

Component for 100 documentsOfficial estimateOneMux estimate
Fresh input: 100,000 tokens$0.15$0.0429
Cache write: 1,000 tokens$0.001875$0.00053625
Cache reads: 99,000 tokens$0.007425$0.00212355
Output: 30,000 tokens$0.135$0.03861
Total$0.2943$0.0841698

Under those same assumptions, 1,000 such batches cover 100,000 documents and cost $294.30 or $84.1698. This is not a guaranteed cache saving: confirm that the endpoint supports caching for your request shape, that the prefix qualifies, and how writes and reads appear in usage records. If a changed schema or instruction invalidates the prefix, additional writes or fresh-input charges can change the result. The external source's cache discussion concerns OpenCode's coding workload and pricing, not a measurement of this extraction example.

Run a useful extraction pilot

  1. Select representative documents. Include short and long inputs, missing fields, ambiguous values, and documents that should produce an empty result.
  2. Define the contract. Specify required fields, types, allowed values, and how missing information should be represented. Confirm whether your chosen endpoint supports provider-enforced JSON schema output; support is unknown from the supplied catalogue. Otherwise, validate the returned JSON in your application.
  3. Validate in two stages. Parse the response as JSON, then validate it against your schema. Record malformed JSON, schema failures, timeouts, and truncated responses separately.
  4. Set a bounded retry policy. Decide which failures are retryable and how many attempts are allowed. Send persistent failures to a review queue rather than retrying indefinitely.
  5. Record usage and outcomes. For each attempt, capture reported input, output, cache-read and cache-write usage where available, the applicable rates, validation outcome, and whether the final document was accepted. Review a sample for factual extraction errors.
  6. Recalculate before scaling. Divide total observed spend by accepted documents, then project using your expected volume. Keep provider and OneMux estimates separate if their rates or accounting differ.

OneMux provides access to models through an OpenAI-compatible API, but compatibility with a particular structured-output parameter or cache behavior depends on the documented endpoint and parameter support. No integration or paid evaluation is claimed here.

Conclusion

The baseline is useful for an initial budget; the pilot determines whether it survives contact with real documents. For Qwen4 Max extraction, measure billable tokens and accepted results together, and treat cache reuse and retries as explicit scenarios rather than assumptions hidden in a single price estimate.

Sources

Published price snapshot

Captured 2026-11-19T16:00:06.298Z from the OneMux published catalogue. Prices retain website billing units; this is not a live benchmark. Tiered, cached or time-based billing may differ. Unknown values are not zero.

ModelOfficial inputOfficial outputOneMux inputOneMux outputPublished price ratio
Qwen4 Max$1.5$4.5$0.429$1.2870.286

Current OneMux prices. Compare workload costs only when input/output and billing units match; see each model page for tier conditions.

FAQ

How much does Qwen4 Max cost for 100,000 extraction requests?

With 2,000 input tokens and 300 output tokens per request, no caching, and no retries, the illustrative total is $435 at the supplied official rates or $124.41 at the OneMux snapshot rates. Actual usage and billing conditions can change the result.

Does JSON schema validation guarantee accurate extraction?

No. Validation checks whether a response conforms to a schema; a correctly typed and formatted field can still contain the wrong value. Review a representative sample for field-level accuracy.

Should cache reads be included in an extraction cost estimate?

Yes, if the endpoint supports caching and your stable prompt or schema qualifies. Model cache writes, reads, and ordinary input separately, and verify actual usage records before projecting savings.

Related articles