GuidesOneMux

Qwen4 Max API Cost Estimation: A Reproducible Evaluation Method

Estimate Qwen4 Max API costs with explicit token, caching, workload, and repetition assumptions. Includes reproducible arithmetic, a test-case plan, and a comparison of official and OneMux published rates.

AI

Summary · TL;DR

A useful Qwen4 Max cost estimate starts with a fixed evaluation workload rather than a headline price. This guide uses 100 test cases, three repetitions, 4,000 input tokens, and 800 output tokens per request to show the arithmetic at official and OneMux published rates. It also separates uncached usage from a cached-input scenario so the result can be reproduced or adjusted.

Key Takeaways

  • The supplied official rates are $1.50 per million input tokens and $4.50 per million output tokens.
  • The OneMux catalogue snapshot lists $0.429 per million input tokens and $1.287 per million output tokens for Qwen4 Max.
  • A 300-request evaluation with 1.2 million input and 240,000 output tokens costs $2.88 at the official uncached rates and approximately $0.82 at the published OneMux rates.
  • Caching can materially change the estimate, but cache-hit behavior, cache writes, and tier eligibility must be confirmed before treating a cached scenario as a forecast.
  • A repeatable evaluation should fix the test cases, repetition count, token limits, model identifier, and cost formula before comparing results.
On this page (10)

The decision to make first

If you are evaluating Qwen4 Max, estimate the cost of the exact workload you intend to repeat—not an abstract “per request” price. Define the number of test cases, repetitions, input and output limits, and cache policy. Then convert every result to the same unit: USD per million input tokens, USD per million output tokens, total workload cost, and cost per request.

OneMux is the publisher of this article and lists Qwen4 Max through its unified model routing service. The calculations below are illustrative planning examples, not a paid benchmark or a claim that OneMux integration was tested.

Published Qwen4 Max prices

The supplied pricing source reports official Qwen4 Max rates effective 2026-11-16. It lists standard text pricing of $1.50 per million input tokens, $4.50 per million output tokens, $0.075 per million cached input tokens, and $1.875 per million cache-write tokens. See the Qwen4 Max pricing source for the dated source record.

The OneMux catalogue snapshot was captured on 2026-11-24 at 19:20 UTC. The catalogue values below retain their published billing units.

Price basisInput, per 1M tokensOutput, per 1M tokensCache read, per 1MCache write, per 1M
Official standard$1.500$4.500$0.075$1.875
OneMux catalogue$0.429$1.287$0.02145$0.53625

The published OneMux price ratio for Qwen4 Max is 0.286. This is a catalogue price comparison, not a guarantee of savings for a particular workload. Tier, caching, routing, taxes, tool calls, and other non-token charges can change the final bill. Unknown values are not zero.

A fixed evaluation workload

Use this test plan as a reproducible example:

  • 100 fixed test cases
  • 3 repetitions per case
  • 300 total requests
  • 4,000 input tokens per request
  • 800 output tokens per request
  • No tools or image inputs
  • Maximum output limited to 800 tokens
  • Uncached baseline first; cached scenario calculated separately

The token totals are:

Input tokens  = 300 requests × 4,000 = 1,200,000 = 1.2M
Output tokens = 300 requests × 800    =   240,000 = 0.24M

This design makes reruns comparable. Keep the test-case text, system prompt, model name, sampling settings, repetition count, and token limits unchanged. If the API supports a seed or another reproducibility control, record it; do not assume identical outputs unless the provider documents that behavior.

Uncached cost calculation

For any provider, the basic formula is:

Cost = (input tokens ÷ 1,000,000 × input price)
     + (output tokens ÷ 1,000,000 × output price)

At official standard rates:

Input  = 1.2 × $1.50 = $1.80
Output = 0.24 × $4.50 = $1.08
Total  = $2.88
Per request = $2.88 ÷ 300 = $0.0096

At the published OneMux rates:

Input  = 1.2 × $0.429  = $0.5148
Output = 0.24 × $1.287  = $0.30888
Total  = $0.82368
Per request = $0.82368 ÷ 300 = $0.0027456

Round only for presentation. Keep full precision in a spreadsheet or script, especially when multiplying this workload across many evaluation runs.

Cached-input scenario

Caching should be an explicit scenario, not an unspoken assumption. Suppose 90% of the 1.2M input tokens are cache reads and 10% are billed as normal input. Assume the output is not cached:

Cached input   = 1.2M × 90% = 1.08M
Uncached input = 1.2M × 10% = 0.12M

Using the supplied official cache-read price:

Official cached input = 1.08 × $0.075 + 0.12 × $1.50 = $0.261
Official output       = 0.24 × $4.50 = $1.08
Estimated total       = $1.341

Using the published OneMux cache-read value:

OneMux cached input = 1.08 × $0.02145 + 0.12 × $0.429 = $0.074646
OneMux output       = 0.24 × $1.287 = $0.30888
Estimated total     = $0.383526

These figures exclude cache-write charges. If the full 1.08M cached tokens incur one cache write, add $2.025 at the official cache-write price or $0.57915 at the published OneMux cache-write price. Whether that event occurs, and when, depends on the provider’s documented cache rules. Confirm cache eligibility and write semantics before using this scenario for budgeting.

A small evaluation harness

The following Python example calculates the uncached baseline. It does not call an API and has not been presented as a tested OneMux integration.

from decimal import Decimal

requests = 100 * 3
input_tokens_per_request = 4_000
output_tokens_per_request = 800
input_price_per_million = Decimal("0.429")
output_price_per_million = Decimal("1.287")

input_millions = Decimal(requests * input_tokens_per_request) / Decimal(1_000_000)
output_millions = Decimal(requests * output_tokens_per_request) / Decimal(1_000_000)

total = (input_millions * input_price_per_million
         + output_millions * output_price_per_million)

print(f"requests: {requests}")
print(f"input tokens: {input_millions}M")
print(f"output tokens: {output_millions}M")
print(f"estimated token cost: ${total:.6f}")

For an actual OpenAI-compatible client, use the endpoint, authentication method, model identifier, and supported parameters documented by the selected service. Compatibility is conditional on those details; do not copy an endpoint or parameter name without checking current documentation. Capture usage fields from each response when available, because estimated tokens and billed tokens may differ.

Failure cases to catch

  • Unbounded output: A model may use fewer than the limit, but a high limit can make worst-case budgeting unclear. Record both the limit and actual usage.
  • Changing prompts: Adding retrieved documents or timestamps changes input-token totals and can invalidate comparisons.
  • Mixed units: Do not compare a per-request estimate with a per-million-token price.
  • Assumed cache hits: A repeated prompt is not proof that a provider billed it as a cache read.
  • Unrecorded retries: Rate-limit or transport retries can increase cost unless they are counted separately.
  • Capability conclusions from price: The supplied pricing material does not provide accuracy, latency, or quality measurements for Qwen4 Max. Those remain unknown here.

Conclusion

For the defined 300-request evaluation, Qwen4 Max costs $2.88 at the supplied official uncached rates and $0.82368 at the published OneMux rates, before non-token charges. The estimate becomes different under caching, so report cache assumptions and possible write charges separately. A fixed test set, explicit token limits, recorded usage, and unrounded arithmetic give you a cost number that can be repeated rather than guessed.

Sources

Published price snapshot

Captured 2026-11-24T19:20:09.810Z 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 a repeatable Qwen4 Max evaluation cost?

Under the defined example—100 test cases, three repetitions, 4,000 input tokens, and 800 output tokens per request—the total is $2.88 at the supplied official uncached rates. At the published OneMux rates, the same token workload is $0.82368 before non-token charges.

What are Qwen4 Max's official input and output prices?

The supplied source lists $1.50 per million input tokens and $4.50 per million output tokens for the official standard tier, effective 2026-11-16.

Does caching reduce the Qwen4 Max estimate?

It can, if the provider actually bills eligible tokens as cache reads. In the example, assuming 90% of input tokens are cache reads produces an estimated official total of $1.341 and an estimated OneMux total of $0.383526, excluding cache writes. These are assumptions, not guaranteed billing outcomes.

What should be recorded for a repeatable model evaluation?

Record the exact test cases, system prompt, model identifier, repetition count, input and output limits, generation settings, API response usage, retries, cache assumptions, and prices used in the calculation.

Was the OneMux API integration tested in this article?

No. The code is a local cost-calculation example. Actual integration depends on the documented OpenAI-compatible endpoint, authentication, model identifier, supported parameters, and usage fields.

Related articles