BroadRouter

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).

Picked by the same-tier rule: both are in the third quarter of the indexed models by price (USD 0.4512 to USD 1.40 per 1M tokens at 3:1) and in the same size class, mid-size (no tier word, 40B to 200B parameters or no size in the name). Llama 3.1 70B is the 2nd-closest-priced model from another maker to GLM 4.7 in that bucket. Price only: every number is computed from prices read from each provider's own pricing page (linked per cell, newest check 2026-11-15), with no claim about quality, speed or accuracy.

How do GLM 4.7 and Llama 3.1 70B differ on price?

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.

GLM 4.7 and Llama 3.1 70B API prices compared
PriceGLM 4.7Llama 3.1 70B
Model pageGLM 4.7
Z.ai · 8 providers
Llama 3.1 Instruct (70B)
Meta · 3 providers
Cheapest standard price, blended 3:1USD 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 inputUSD 0.40
DeepInfra source
USD 0.293 lower
Cloudflare Workers AI source
Cheapest cached inputUSD 0.06
Google Vertex AI source
No standard price lists a cache price; cached tokens bill at the input price.
Cheapest outputUSD 1.75
DeepInfra source
USD 0.72 lower
Amazon Bedrock source
Maker's own APIUSD 0.60 / USD 2.20
Z.ai source
Meta publishes no paid standard price on its own API that we found.
Median standard priceUSD 0.60 / USD 2.20
input / output, 8 prices
USD 0.72 / USD 2.253
input / output, 3 prices
Context window204,800 tokens, largest stated; from 198,000 at some providers32,768 tokens, largest stated
Providers with a standard price83

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).

Monthly cost of three workloads on GLM 4.7 and Llama 3.1 70B
WorkloadGLM 4.7Llama 3.1 70BDifference
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.

Price per 1M tokens of GLM 4.7 and Llama 3.1 70B at different input:output mixes
Input : output tokensGLM 4.7Llama 3.1 70B
1 : 3 (long answers)USD 1.413
DeepInfra
USD 0.72 lower
Amazon Bedrock
1 : 1USD 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

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