impulse

Llama 3.1 8B

Open weights
API id llama-3.1-8b
Input / 1M
$0.03
at LlamaGate
Output / 1M
$0.05
at LlamaGate
Context window
131K
tokens
Max output
8K
tokens per reply
Hosts
3
3 listings
Released
-
date not published

Pricing

List prices at LlamaGate, in US dollars per million tokens.

TierInput / 1MOutput / 1M
Standard$0.03$0.05

What it costs a month

At LlamaGate list prices, 30 days.

  • Chat assistant5,000 requests a day, 2K in / 0.5K out$12.75
  • RAG over documents2,000 requests a day, 8K in / 0.6K out$16.20
  • Coding agent1,000 requests a day, 40K in / 2K out$39.00
  • Overnight batch20,000 requests a day, 4K in / 0.4K out$84.00
Use your own numbers

Where to run it

3 hosts serve Llama 3.1 8B. The comparison is on blended price, 3 parts input to 1 part output.

HostIn / out per 1M
LlamaGateGateway
llama-3.1-8b
$0.03 / $0.05
llama-3.1-8b
$0.05 / $0.08
+64% vs headline
CerebrasInference
llama-3.1-8b
$0.10 / $0.10
+186% vs headline

Capabilities

Core

  • Streaming
  • Function calling
  • JSON mode
  • Structured outputs

Multimodal

  • Vision
  • Image input
  • Audio
  • Image generation
  • Video

Advanced

  • Reasoning
  • Tool calling
  • MCP
  • Prompt caching
  • Batch API
  • Embeddings
Takes in
Text
Produces
Text
Open weights
License: Llama Community License
Runtimes: Ollama, TGI, llama.cpp, vLLM

Cheaper alternatives

Current models that cost less and keep most of what this one can do: tools, vision, reasoning, structured output, caching and enough context.

Same model, cheaper host

No host sells it for less than LlamaGate.

Smaller Meta models

No cheaper Meta model keeps its key capabilities.

Other frontier labs

No cheaper match from another frontier lab.

Open-weight picks

Model line

Newer and older versions, at each lab's own price.

  1. UndatedLlama 3.1 8BLatest$0.03 / $0.05
  2. UndatedLlama3.1 8B$0.10 / $0.10
  3. UndatedLlama 3 8B$0.05 / $0.08
  4. UndatedLlama3 8BNot listed

Call it

Using LlamaGate's API.

Python
from litellm import completion

response = completion(
    model="llamagate/llama-3.1-8b",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)

Quick answers

How much does Llama 3.1 8B cost?

On LlamaGate, Llama 3.1 8B costs $0.03 per million input tokens and $0.05 per million output tokens.

Which APIs offer Llama 3.1 8B?

Llama 3.1 8B runs on 3 APIs: LlamaGate, Vercel AI Gateway and Cerebras.

What is Llama 3.1 8B's context window?

131K tokens, with up to 8K tokens in one reply.

Is Llama 3.1 8B being retired?

No retirement date is scheduled for it on any API we track.

Is there a newer version of Llama 3.1 8B?

No. Llama 3.1 8B is the newest model in its line.

What are cheaper alternatives to Llama 3.1 8B?

Models that cost less and keep most of what it can do: Meta Llama 3.1 8B Instruct on Nebius AI Studio (14% less). Savings are on a mix of 3 input tokens to 1 output token.

What is Llama 3.1 8B's API model id?

Use llama-3.1-8b with LlamaGate.

Sources

Raw catalog entry for llama-3.1-8b on LlamaGate
{
  "max_input_tokens": 131072,
  "max_output_tokens": 8192,
  "input_cost_per_token": 3e-8,
  "output_cost_per_token": 5e-8,
  "litellm_provider": "llamagate",
  "mode": "chat",
  "supports_function_calling": true,
  "supports_response_schema": true
}