API pricing and cost

Llama3.1-8B-Instruct pricing

Llama3.1 8B Instruct official API pricing is $0.02 per million input tokens and $0.04 per million output tokens. Third-party provider prices are compared below.

Covers the 2024-07-23 Llama3.1-8B-Instruct release.

$0.02

Official input / 1M

Standard tier

$0.04

Official output / 1M

Standard tier

$0.024

Blended / 1M

4:1 input/output

$2.40

Example monthly cost

10K requests, 8K input + 2K output/request

Token charges only; tool calls, taxes, and other non-token fees are excluded.

Official API pricing

USD / 1M text tokens · Standard · Effective from 2026-11-13 · Last verified 2026-11-14

InputStandard text tier, per million tokens
$0.02
OutputStandard text tier, per million tokens
$0.04

API providers (2)

Published USD text API rates across hosting providers for Llama3.1-8B-Instruct. Compare listed rates, effective dates, and service-tier notes for the same model.

On the example assistant workload above (10K requests, 8K input + 2K output/request; missing cache rates billed at full input), DeepInfra lists the lowest flat-rate total at $2.40/month.

Published USD API provider rates for Llama3.1-8B-Instruct
ProviderInput / 1MCached / 1MOutput / 1MAdditional tiers & notes
DeepInfra⁠Effective from 2026-11-13$0.02Lowest input—$0.04Lowest output—
Amazon⁠Effective from 2026-11-14$0.22—$0.22Batch: $0.11/$0.11 per 1M tokens.

What Llama3.1-8B-Instruct costs to run

Four workloads costed at official standard rates. Cached-input share is an estimation assumption, not a provider guarantee; when no cached rate is published, all input is billed at the uncached rate. Non-token fees are excluded.

Estimated monthly cost of four workloads on Llama3.1-8B-Instruct
WorkloadPer requestMonthly tokensInputOutputPer month
Chatbotshort turns1,500 in · 500 out× 100,000 requests150M in · 50M out$3.00$2.00$5.00$0.00005 / request
Assistant8K context · 90% cached8,000 in · 2,000 out× 10,000 requests80M in · 20M out$1.60$0.80$2.40$0.00024 / request
RAGlong input, cached · 50% cached24,000 in · 800 out× 20,000 requests480M in · 16M out$9.60$0.64$10.24$0.000512 / request
Coding agentlong output · 70% cached15,000 in · 4,000 out× 20,000 requests300M in · 80M out$6.00$3.20$9.20$0.00046 / request
Start from

Monthly cost

$2.40

on Llama3.1-8B-Instruct

Per request

$0.00024

80M in · 20M out a month

Split

$1.60 + $0.80

input + output

Llama3.1-8B-Instruct against comparable models

Benchmark-overlap peers and price-comparable same-type models, costed on the assistant workload above. All figures use the same workload and caching rule; lower price does not imply equivalent capability or service terms.

Blended price and monthly cost of Llama3.1-8B-Instruct and comparable models
ModelBasisBlended / 1MPer monthvs Llama3.1-8B-Instruct
Gemma 4 26B A4BGoogle Deep MindLower-cost option$0.00$0.00100%cheaper
Llama3.1-8B-InstructFacebook AI Research Lab · this modelThis model$0.024$2.40—
Amazon Nova MicroAmazonSimilar price$0.056$5.60133%dearer · 2.3×
Step 3.5 FlashStepFunAISimilar price$0.082$8.24243%dearer · 3.4×
Gemma 3 - 27B (IT)Google Deep MindShared benchmark coverage$0.096$9.60300%dearer · 4×
Llama-3.2-3BFacebook AI Research LabShared benchmark coverage$0.15$15.00525%dearer · 6.3×
Qwen2.5-72BAlibabaShared benchmark coverage$0.368$36.801,433%dearer · 15.3×

Catalog price position: #7 cheapest of 252 active priced models in the LLMLearner catalog (cheaper than 98% at the 4:1 mix; official headline rates).

Llama3.1-8B-Instruct pricing questions

How much does Llama3.1-8B-Instruct cost per million tokens?
Llama3.1 8B Instruct official API pricing is $0.02 per million input tokens and $0.04 per million output tokens. At the default 4:1 input-to-output mix, that is $0.024 per million blended tokens.
What does Llama3.1-8B-Instruct cost per month, and what is included?
On the example Assistant workload (10,000 requests/month, 8,000 input and 2,000 output tokens/request), Llama3.1-8B-Instruct costs about $2.40/month ($0.00024/request). This includes token charges at the official rate only; tool calls, off-peak or batch tiers, and taxes are excluded.
Is there a cheaper alternative to Llama3.1-8B-Instruct?
Among the comparable models shown on this page, Gemma 4 26B A4B is cheaper at $0.00 per million blended tokens vs $0.024 for Llama3.1-8B-Instruct. Compare benchmarks before switching, as a lower rate does not guarantee equivalent quality or service terms. Across all 252 active priced models in the LLMLearner catalog, Llama3.1-8B-Instruct ranks 7th cheapest (cheaper than 98% at the default 4:1 mix).
Does Llama3.1-8B-Instruct charge for cached input?
Facebook AI Research Lab publishes no cached-input rate for Llama3.1-8B-Instruct here, so every input token is estimated at the full $0.02 per million.