Llama 3.1 8B pricing

Llama 3.1 8B, Small-tier from OpenRouter, costs $0.05 per 1M input tokens and $0.08 per 1M output tokens.

verified (official api)

Input$0.05per 1M tokens
Output$0.08per 1M tokens
Context window131Ktokens
TierSmallOpenRouter

Price your own workload against Llama 3.1 8B in the calculator →

Specs and pricing

ProviderOpenRouter
TierSmall
Context window131K tokens
Max output118K tokens
Input price$0.05 / 1M tokens
Output price$0.08 / 1M tokens
Cache read$0.025 / 1M tokens
Modalitiestext

Note. OpenRouter's default route for this model.

What it costs at realistic volumes

Assuming a 4:1 input:output token ratio, a common shape for chat and RAG-style workloads:

Volume (4:1 in:out ratio)Input costOutput costTotal / month
1,000,000 in / 250,000 out$0.05$0.02$0.07
10,000,000 in / 2,500,000 out$0.50$0.20$0.70
100,000,000 in / 25,000,000 out$5.00$2.00$7.00

Cheaper alternatives

Same tier (Small), a different provider, and a lower blended cost at the 4:1 ratio used above:

ModelProvider$/1M in$/1M outAt the 4:1 ratio
Meta-Llama-3.1-8B-Instruct-TurboDeepInfra$0.02$0.0457.1% cheaper blended
schematron-v2-turboinference.net$0.03$0.153.6% cheaper blended