GLM 4.7 vs Llama 3.1 70B API pricing
Updated
GLM 4.7: USD 0.40 input, USD 1.75 output per 1M tokens (DeepInfra). Llama 3.1 70B: USD 0.72 input, USD 0.72 output per 1M tokens (Amazon Bedrock). At 3 input tokens per output token, GLM 4.7 costs 2.4% more than Llama 3.1 70B (USD 0.7375 vs USD 0.72 per 1M).
How do GLM 4.7 and Llama 3.1 70B differ on price?
- Cheapest input price: Llama 3.1 70B USD 0.293 against USD 0.40 per 1M tokens, so GLM 4.7 costs 1.37× as much (37% more).
- Cheapest output price: Llama 3.1 70B USD 0.72 against USD 1.75 per 1M tokens, so GLM 4.7 costs 2.4× as much.
- Among the 201 indexed models, GLM 4.7 ranks 115th cheapest and Llama 3.1 70B 113th on the 3:1 blend.
- The cheaper model changes at 3.2 input tokens per output token and 4.7 input tokens per output token.
- Only GLM 4.7 lists a cached-input discount: GLM 4.7 at 7 standard prices of 8, from USD 0.06 (Google Vertex AI, 90% below that provider's input price). Llama 3.1 70B's cached tokens bill at the input price.
- GLM 4.7 states up to 204,800 tokens of context, 6.3× the 32,768 of Llama 3.1 70B.
- GLM 4.7 has 8 providers with a standard price, 5 more than Llama 3.1 70B; 2 providers sell both (Amazon Bedrock and Featherless).
- On one account, Amazon Bedrock charges USD 1 for GLM 4.7 (1.36× its cheapest price) and USD 0.72 for Llama 3.1 70B (its cheapest price) at 3:1, the lowest combined price among the providers that sell both.
- Shopping around matters more for Llama 3.1 70B: its dearest standard price is 4× its cheapest, against 1.46× for GLM 4.7.
- Z.ai's own API charges USD 1 for GLM 4.7 at 3:1, 36% above the cheapest provider (DeepInfra).
- GLM 4.7 has no batch price on file; Llama 3.1 70B has a batch price at 1 provider, from USD 0.36 at 3:1 (Amazon Bedrock).
- For the one-developer coding agent preset, the gap is USD 4,107 a year in GLM 4.7's favour (GLM 4.7 USD 387.90 a month, Llama 3.1 70B USD 730.17).
GLM 4.7 and Llama 3.1 70B prices side by side
USD per 1M tokens, standard tier. "Cheapest" is the lowest price at 3 input tokens to 1 output token; each line can come from a different provider.
| Price | GLM 4.7 | Llama 3.1 70B |
|---|---|---|
| Model page | GLM 4.7 Z.ai · 8 providers | Llama 3.1 Instruct (70B) Meta · 3 providers |
| Cheapest standard price, blended 3:1 | USD 0.7375 USD 0.40 in / USD 1.75 out at DeepInfra DeepInfra page checked 2026-11-14 | USD 0.72 lower USD 0.72 in / USD 0.72 out at Amazon Bedrock Amazon Bedrock page checked 2026-11-14 |
| Cheapest input | USD 0.40 DeepInfra source | USD 0.293 lower Cloudflare Workers AI source |
| Cheapest cached input | USD 0.06 Google Vertex AI source | No standard price lists a cache price; cached tokens bill at the input price. |
| Cheapest output | USD 1.75 DeepInfra source | USD 0.72 lower Amazon Bedrock source |
| Maker's own API | USD 0.60 / USD 2.20 Z.ai source | Meta publishes no paid standard price on its own API that we found. |
| Median standard price | USD 0.60 / USD 2.20 input / output, 8 prices | USD 0.72 / USD 2.253 input / output, 3 prices |
| Context window | 204,800 tokens, largest stated; from 198,000 at some providers | 32,768 tokens, largest stated |
| Providers with a standard price | 8 | 3 |
- Lower marks the lower price on a line; tie, equal prices. Other tiers and free rows are on the model pages.
Report a wrong price or number (email to info@broadnet.ai, with this page's link filled in).
What do GLM 4.7 and Llama 3.1 70B cost for a real workload?
30 days at each model's cheapest standard price for the workload (presets of the cost calculator; cached input at the cached price where listed).
| Workload | GLM 4.7 | Llama 3.1 70B | Difference |
|---|---|---|---|
| Support chatbot 2,000 requests a day, 1,500 input tokens (60% cached), 300 output | USD 50.22 DeepInfra | USD 66.92 Cloudflare Workers AI | USD 16.70 GLM 4.7 lower |
| RAG over documents 1,000 requests a day, 8,000 input tokens (30% cached), 500 output | USD 99.21 DeepInfra | USD 104.11 Cloudflare Workers AI | USD 4.91 GLM 4.7 lower |
| Coding agent (one developer) 1,500 requests a day, 40,000 input tokens (85% cached), 2,000 output incl. reasoning | USD 387.90 DeepInfra | USD 730.17 Cloudflare Workers AI | USD 342.27 GLM 4.7 lower |
GLM 4.7 is cheaper on all three workloads. The widest gap is on Coding agent (one developer): the dearer model costs 88% more than the cheaper one.
Does the cheaper model change with your input:output ratio?
The cheaper model changes with the mix: below 3.2 input tokens per output token, Llama 3.1 70B is cheaper; from 3.2 to 4.7, GLM 4.7 is cheaper; above 4.7, Llama 3.1 70B is cheaper. At the site's 3:1 blend, Llama 3.1 70B is cheaper. More input per output token, as with retrieval or agents that resend long contexts, favours the lower input price; long answers favour the lower output price.
| Input : output tokens | GLM 4.7 | Llama 3.1 70B |
|---|---|---|
| 1 : 3 (long answers) | USD 1.413 DeepInfra | USD 0.72 lower Amazon Bedrock |
| 1 : 1 | USD 1.075 DeepInfra | USD 0.72 lower Amazon Bedrock |
| 3 : 1 (the site’s blend) | USD 0.7375 DeepInfra | USD 0.72 lower Amazon Bedrock |
| 10 : 1 (retrieval, long prompts) | USD 0.5227 DeepInfra | USD 0.4712 lower Cloudflare Workers AI |
| 30 : 1 (agents, big contexts) | USD 0.4435 DeepInfra | USD 0.3562 lower Cloudflare Workers AI |
USD per 1M tokens at the cheapest standard provider for each mix, before cache discounts. Thinking tokens bill as output.
What do GLM 4.7 and Llama 3.1 70B cost per character in other languages?
Not measured: the real cost by language dataset covers only tokenizers we could measure from published files, and GLM 4.7 is not among them. Count tokens on your own text with the counters below.
Check it on your own traffic
- GLM 4.7 API pricing: all 8 providers and other tiers.
- Llama 3.1 Instruct (70B) API pricing: all 3 providers and other tiers.
- Cost calculator with GLM 4.7 and Llama 3.1 70B preloaded
- GLM token counter
- Llama 3 token counter
- Prompt caching calculator
More comparisons: GLM 4.7 vs GLM 4.6 · GLM 5 vs GLM 4.7 · GLM 4.7 Flash vs GLM 4.7 · Llama 3.1 70B vs Llama 3 70B · Llama 3.3 70B vs Llama 3.1 70B · Llama 3.1 70B vs Llama 3.1 8B Instruct · every GLM 4.7 comparison · every Llama 3.1 70B comparison · all 662 price comparisons
Questions
Is GLM 4.7 cheaper than Llama 3.1 70B?
No. On a blend of 3 input tokens to 1 output token, Llama 3.1 70B costs USD 0.72 per 1M tokens and GLM 4.7 USD 0.7375, at each model's cheapest standard price. For input alone, Llama 3.1 70B is cheaper (USD 0.293 against USD 0.40 per 1M); for output alone, Llama 3.1 70B is (USD 0.72 against USD 1.75). This compares price only, not quality.
What do GLM 4.7 and Llama 3.1 70B cost per 1M tokens?
GLM 4.7: from USD 0.40 input and USD 1.75 output at DeepInfra; Z.ai's own API charges USD 0.60 / USD 2.20; median of 8 standard prices USD 0.60 / USD 2.20. Llama 3.1 70B: from USD 0.72 input and USD 0.72 output at Amazon Bedrock; median of 3 standard prices USD 0.72 / USD 2.253. Each price is read from the provider's own pricing page; the source is linked in the table.
Which providers sell both GLM 4.7 and Llama 3.1 70B?
2 providers have a standard price for both: Amazon Bedrock (USD 1 and USD 0.72 at 3:1), Featherless (USD 0.9625 and USD 2.88 at 3:1). The first is the lowest combined price. Buying each model from its own cheapest provider costs USD 0.7375 and USD 0.72.
Which is cheaper for a coding agent or a chatbot, GLM 4.7 or Llama 3.1 70B?
For a coding agent (1,500 requests a day, 40,000 input tokens (85% cached), 2,000 output incl. reasoning): USD 387.90 a month on GLM 4.7 (DeepInfra) against USD 730.17 on Llama 3.1 70B (Cloudflare Workers AI), a difference of USD 342.27. For a support chatbot (2,000 requests a day, 1,500 input tokens (60% cached), 300 output): USD 50.22 a month on GLM 4.7 (DeepInfra) against USD 66.92 on Llama 3.1 70B (Cloudflare Workers AI), a difference of USD 16.70. Each uses the cheapest standard price for that workload, cached input included. Try your own numbers.
At what input:output ratio does the cheaper of GLM 4.7 and Llama 3.1 70B change?
The cheaper model changes with the mix: below 3.2 input tokens per output token, Llama 3.1 70B is cheaper; from 3.2 to 4.7, GLM 4.7 is cheaper; above 4.7, Llama 3.1 70B is cheaper. At the site's 3:1 blend, Llama 3.1 70B is cheaper. More input per output token, as with retrieval or agents that resend long contexts, favours the lower input price; long answers favour the lower output price.
Do GLM 4.7 and Llama 3.1 70B have cached input pricing?
GLM 4.7 from USD 0.06 per 1M cached input tokens (Google Vertex AI; 7 of 8 standard prices list a discount). Llama 3.1 70B: no standard price lists a cached-input discount. Cached tokens are billed at the input price where no cache price is published.
Which has the larger context window, GLM 4.7 or Llama 3.1 70B?
GLM 4.7: up to 204,800 tokens, against 32,768 for Llama 3.1 70B, as stated on providers' pricing pages. Some providers offer less than the maximum; check the model pages before you pick the cheapest row for long prompts.
Read as MarkdownAsk ChatGPTAsk ClaudeAsk Perplexity
Sources
- DeepInfra: pricing (checked 2026-11-14)
- Google Vertex AI: pricing (checked 2026-11-14)
- Z.ai: own API pricing (checked 2026-11-14)
- Amazon Bedrock: pricing (checked 2026-11-14)
- Cloudflare Workers AI: pricing (checked 2026-11-14)
- Featherless: pricing (checked 2026-11-15)
- Featherless: pricing (checked 2026-11-15)