Skip to main content

OpenRouter 1M-Context Cost Index: Ergo vs GLM-5.3-Flash vs MiniMax M4

Systems architecture analysis of Amazon Ergo, GLM-5.3-Flash, and MiniMax M4 on OpenRouter: 1M-token context pricing, KV-cache memory footprint, and runtime

FRONTIER LLMS Deep Dive
GLM-5.3-Flash Pricing Compared: OpenRouter, Z.ai, and AIHubMix | AIHubMix Blog
GLM-5.3-Flash Pricing Compared: OpenRouter, Z.ai, and AIHubMix | AIHubMix Blog Source: aihubmix.com
Field Note · The Short Version 5 min read

Amazon Ergo costs $1.00/M input and $3.00/M output on OpenRouter with no documented cache-read rate, while GLM-5.3-Flash costs $0.075/M input, $0.250/M output, and $0.015/M cache reads plus a 5.5% platform fee; MiniMax M4 pricing remains unpublished as of 2026-12-03.

Key Numbers & Verified Specs

8 metrics
Metric / Spec Verified Finding Source
Amazon Ergo input price (OpenRouter) $1.00 per million input tokens openrouter.ai
Amazon Ergo output price (OpenRouter) $3.00 per million output tokens openrouter.ai
Amazon Ergo context window 1M tokens benchlm.ai
GLM-5.3-Flash input price (OpenRouter Z.ai route) $0.075 per million input tokens aihubmix.com
GLM-5.3-Flash output price (OpenRouter Z.ai route) $0.25 per million output tokens aihubmix.com
GLM-5.3-Flash cache read price $0.015 per million cached input tokens aihubmix.com
OpenRouter platform fee 5.5% platform fee on pay-as-you-go accounts aihubmix.com
GLM-5.3-Flash context window roughly one million tokens aihubmix.com
Jump to section (5) +

This architecture analysis compares three SLMs served through OpenRouter: Amazon Ergo, GLM-5.3-Flash, and MiniMax M4. All three advertise roughly 1M-token context windows, but the economics of serving that context diverge sharply once you account for KV-cache read pricing, platform fees, and runtime memory pressure.

Benchmark Verdict & Cost Math

Amazon Ergo lists at $1.00 per million input tokens and $3.00 per million output tokens on OpenRouter, with no documented cache-read discount in the provider excerpt. GLM-5.3-Flash, the documented GLM-family analog on OpenRouter, lists at $0.075 per million input tokens and $0.25 per million output tokens, with cache reads at $0.015 per million tokens. OpenRouter adds a 5.5% platform fee on pay-as-you-go accounts, bringing effective GLM-5.3-Flash costs to roughly $0.0791/M input, $0.2638/M output, and $0.0158/M cache read when fees are allocated proportionally.

The gap is structural. At a 50% cache ratio on a 1M-token context, GLM-5.3-Flash effectively bills about half its input volume at cache-read rates. Amazon Ergo has no published cache-read rate in the OpenRouter model page excerpt, which means long-context agents reusing system prompts pay full input price on every turn. That difference compounds quickly in multi-turn coding agents where conversation history and code context repeat across requests.

MiniMax M4 pricing was not present in the provided primary sources, so I cannot state its OpenRouter input, output, or cache-read rates. Any cost model that includes MiniMax M4 must treat those figures as unavailable until OpenRouter publishes them.

Model / Runtime Quantitative Comparison Table

ModelCreatorContext WindowInput / 1M TokensOutput / 1M TokensCache Read / 1M TokensPlatform FeeEU In-RegionShared Benchmarks
Amazon ErgoAmazon1M tokens$1.00$3.00Not documented5.5%No5 covered
GLM-5.3-Flash (Z.ai route)Zhipu AI~1M tokens$0.075$0.250$0.0155.5%Not documented0 shared with Ergo
MiniMax M4MiniMaxNot documentedNot documentedNot documentedNot documentedNot documentedNot documentedNot documented

BenchLM reports zero shared sourced benchmark rows between Amazon Ergo and GLM Realtime Flash, so there is no score-level head-to-head winner. Amazon Ergo independently reports Terminal-Bench 4.0 at 46.20%, Terminal-Bench-Science 0.1 at 21.3%, DeepSWE at 74.2%, FrontierSWE v2 at 31.5%, and ProgramBench at 23.5%. GLM-family models show no public-lane scores in the provided comparison.

Context Window & Memory Bottlenecks

A 1M-token context window does not come free. At FP8 quantization, a 1M-token KV cache for a 70B-parameter model occupies roughly 140 GB of VRAM before activation memory, optimizer states, or batch overhead. At Q4_K_M, the footprint drops but attention computation still scales quadratically with sequence length in naive implementations, and linear attention variants trade memory for approximation error.

KV-cache OOM is the dominant failure mode here. When the cache exceeds device memory, the runtime must either evict entries (causing context rot and lost instructions), spill to host memory (adding PCIe transfer latency), or reject the request. Context poisoning appears when irrelevant or adversarial tokens in the prefix distract the model from later instructions, a known failure mode in long-context reasoning that gets worse as the cache fills.

OpenRouter acts as a routing layer, not a runtime. The actual KV-cache memory lives on the provider's inference stack—vLLM, SGLang, or llama.cpp depending on the provider. That means cache eviction policy, prefix caching behavior, and prefill chunking are provider-specific, not OpenRouter settings. You cannot tune KV-cache quantization from the OpenRouter API.

Reproducible Inference / Routing Config

The OpenRouter Chat Completions endpoint accepts standard sampling parameters for Amazon Ergo, including temperature, top_p, max_tokens, frequency_penalty, presence_penalty, repetition_penalty, seed, stop, logprobs, top_logprobs, logit_bias, min_p, top_k, response_format, tool_choice, tools, parallel_tool_calls, reasoning, and seed. The endpoint is POST https://openrouter.ai/api/v1/chat/completions with Authorization: Bearer $OPENROUTER_API_KEY.

Bash11 lines
curl https://openrouter.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "amazon/ergo-1.0",
    "messages": [{"role": "user", "content": "Summarize the attached codebase."}],
    "max_tokens": 4096,
    "temperature": 0.2,
    "top_p": 0.9,
    "stream": true
  }'

For cached-context workloads, set stream to false when you need deterministic cache-hit measurement, and monitor the usage object in the response to distinguish input tokens from cache-read tokens. OpenRouter does not expose a cache-ratio knob; cache behavior depends on the provider's implementation of automatic context caching.

For provider routing with fallback behavior, use a JSON object like this:

JSON10 lines
{
  "model": "amazon/ergo-1.0",
  "provider": {
    "order": ["Amazon Bedrock", "Chutes", "inference.net"],
    "allow_fallbacks": true,
    "require_parameters": true
  },
  "max_tokens": 4096,
  "temperature": 0.2
}

Capture TTFT by timing the first token arrival with curl -w "%{time_starttransfer}" and verify cache hits by inspecting usage.prompt_tokens_details.cached_tokens in the response body.

Selection Rubric by Workload

Choose Amazon Ergo only when you need its documented reasoning benchmarks (Terminal-Bench, DeepSWE, FrontierSWE, ProgramBench) and can absorb the $1.00/$3.00 pricing without cache-read discounts. It suits agentic workloads where benchmark coverage matters more than per-token cost, and where EU in-region routing is not required.

Choose GLM-family models on OpenRouter when cached-context economics dominate. The $0.075/$0.250 base rates with $0.015 cache reads make repeated system prompts and multi-turn coding sessions substantially cheaper than Ergo, provided the 5.5% platform fee fits your budget. The lack of shared benchmark rows with Ergo means you should run your own evals before committing.

MiniMax M4 cannot be recommended or ruled out on cost grounds from the available data. Treat it as an unknown until OpenRouter publishes its pricing table.

When NOT to use this architecture: do not route 1M-context requests through OpenRouter if you need deterministic KV-cache residency, sub-50ms TTFT at full context, or EU data residency. OpenRouter is a broker, not a runtime, and provider-side cache eviction can evict your prefix mid-session. For latency-sensitive long-context workloads, deploy vLLM or SGLang directly on dedicated GPU infrastructure and manage the KV cache yourself.

GLM-5.3-Flash pricing comparison showing OpenRouter's 5.5% platform fee and cache-ratio cost examples
GLM-5.3-Flash pricing comparison showing OpenRouter's 5.5% platform fee and cache-ratio cost examples

Primary sources: OpenRouter Amazon Ergo model page, AIHubMix GLM-5.3-Flash pricing comparison, BenchLM Amazon Ergo vs GLM Realtime Flash.

Visual Evidence

Figures from Cited Sources

GLM-5.5? Zhipu Released GLM-5.4: Vision, Quotas and API Pricing
GLM-5.4 announcement context from AIHubMix blog; note that sourced pricing data applies to GLM-5.3-Flash, not GLM-5.4. aihubmix.com

Reader Q&A

Frequently Asked Questions

Does OpenRouter mark up provider prices for Amazon Ergo?
No. OpenRouter states it does not mark up provider prices shown in its model catalog; the listed inference price remains $1.00/M input and $3.00/M output, though a 5.5% platform fee applies to pay-as-you-go accounts.
Can Amazon Ergo and GLM Realtime Flash be compared on BenchLM yet?
Not fully yet. BenchLM reports no shared sourced benchmark row between Amazon Ergo and GLM Realtime Flash, so there is no score-level head-to-head winner.
Is Amazon Ergo available through EU in-region routing on OpenRouter?
No. Amazon Ergo is not currently available through EU in-region routing on OpenRouter.

Bibliography & Verification

Primary Sources & References

4 cited sources
  1. [01] openrouter.ai amazon / ergo-1.0
  2. [02] aihubmix.com blog / glm-5-3-flash-pricing-compared-openrouter-z-ai-and-aihubmix
  3. [03] benchlm.ai compare / amazon-ergo-vs-glm-realtime-flash
  4. [04] openrouter.ai models

Human × Agent Co-Work

Hamdi Soudani · in collaboration with Pyvren

Systems engineer & technical writer exploring AI infrastructure, security, and edge craft in daily collaboration with Pyvren.

Hamdi Soudani × Pyvren

Honest engineering stories — co-crafted with primary benchmarks & real code

Every dispatch blends hands-on engineering judgment with verified primary sources, reproducible configs, and clear tradeoffs.