LiteLLMModels

Llama 3.1 8B Instruct API Pricing

As of October 10, 2026, Llama 3.1 8B Instruct is free to use from Google Vertex AI, the lowest of 13 providers. It has a 128,000-token context window and returns up to 2,048 tokens per response.

By MetaModel ID vertex_ai/meta/llama-3.1-8b-instruct-maasPrices updated Checked
Price
Free
Context window
128,000 tokens
Max output
2,048 tokens
Providers
13
Added to LiteLLM
July 2024

Llama 3.1 8B Instruct pricing by provider

14 listings across 13 providers. Token prices are in US dollars per 1M tokens. The highlighted row is the price quoted above.

ProviderModel name in LiteLLMInputOutputContext
Google Vertex AIvertex_ai/meta/llama-3.1-8b-instruct-maas$0$0128K
Amazon Bedrockmeta.llama3-1-8b-instruct-v1:0$0.22$0.22128K
DeepInfradeepinfra/meta-llama/Meta-Llama-3.1-8B-Instruct$0.03$0.05128K
Hyperbolichyperbolic/meta-llama/Meta-Llama-3.1-8B-Instruct$0.12$0.3032K
Lambdalambda_ai/llama3.1-8b-instruct$0.025$0.04128K
Nebius AI Studionebius/meta-llama/Meta-Llama-3.1-8B-Instruct$0.02$0.06128K
Novita AInovita/meta-llama/llama-3.1-8b-instruct$0.02$0.0516K
Nscalenscale/meta-llama/Llama-3.1-8B-Instruct$0.03$0.03–
Oracle Cloud (OCI)oci/meta.llama-3.1-8b-instruct$0.72$0.72128K
OVHcloudovhcloud/Llama-3.1-8B-Instruct$0.10$0.10131K
Perplexityperplexity/llama-3.1-8b-instruct$0.20$0.20128K
Weights & Biaseswandb/meta-llama/Llama-3.1-8B-Instruct$0.22$0.22131K
Amazon BedrockUS cross-regionus.meta.llama3-1-8b-instruct-v1:0$0.22$0.22128K
Cloudflare Workers AIfp8cloudflare/@cf/meta/llama-3.1-8b-instruct-fp8$0.152$0.28732K

What Llama 3.1 8B Instruct costs in practice

1,000 requests with 2,000 input and 500 output tokens each

Google Vertex AI$0
Nebius AI Studio$0.07
Novita AI$0.065
Lambda$0.07

100 long-document requests with 100,000 input and 2,000 output tokens each

Google Vertex AI$0
Nebius AI Studio$0.212
Novita AI$0.21
Lambda$0.258

Llama 3.1 8B Instruct features

Use Llama 3.1 8B Instruct with LiteLLM

Call Llama 3.1 8B Instruct through the LiteLLM Python SDK, or put it behind the LiteLLM proxy and send OpenAI-format requests to /v1/chat/completions. LiteLLM tracks the cost of every request at these prices.

Python SDK
from litellm import completion

response = completion(
    model="vertex_ai/meta/llama-3.1-8b-instruct-maas",
    messages=[{"role": "user", "content": "Hello!"}],
)
Proxy config.yaml
model_list:
  - model_name: llama-3.1-8b-instruct
    litellm_params:
      model: vertex_ai/meta/llama-3.1-8b-instruct-maas
      vertex_project: os.environ/VERTEX_PROJECT
      vertex_location: os.environ/VERTEX_LOCATION
Call the proxy
curl http://0.0.0.0:4000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-1234" \
  -d '{
    "model": "llama-3.1-8b-instruct",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Llama 3.1 8B Instruct FAQ

How much does Llama 3.1 8B Instruct cost?

Llama 3.1 8B Instruct is free to use from Google Vertex AI, the lowest of 13 providers.

What is the context window of Llama 3.1 8B Instruct?

Llama 3.1 8B Instruct has a 128,000-token context window and returns up to 2,048 tokens per response.

Which providers offer Llama 3.1 8B Instruct?

Llama 3.1 8B Instruct is available from 13 providers through LiteLLM: Google Vertex AI, Amazon Bedrock, DeepInfra, Hyperbolic, Lambda, Nebius AI Studio, Novita AI, Nscale, Oracle Cloud (OCI), OVHcloud, Perplexity and Weights & Biases and 1 more. The lowest price is on Google Vertex AI.

How do I call Llama 3.1 8B Instruct with an OpenAI-compatible API?

Use the LiteLLM Python SDK with model="vertex_ai/meta/llama-3.1-8b-instruct-maas", or add the model to the LiteLLM proxy's config.yaml and send requests to /v1/chat/completions from any OpenAI client. LiteLLM tracks the cost of every request at the prices on this page.

What features does Llama 3.1 8B Instruct support?

Llama 3.1 8B Instruct supports function calling, parallel tool calls, structured output and image input.

When did LiteLLM add Llama 3.1 8B Instruct?

Llama 3.1 8B Instruct was added to LiteLLM's model price file in July 2024.

Sources

Prices come from LiteLLM's open-source model_prices_and_context_window.json, which LiteLLM uses to calculate the cost of every request. Provider pricing pages:

LiteLLM docs: Google Vertex AI, Amazon Bedrock, DeepInfra, Hyperbolic, Lambda, Nebius AI Studio.

Provider pages: Google Vertex AI, Amazon Bedrock, DeepInfra, Hyperbolic, Lambda, Nebius AI Studio, Novita AI, Nscale, Oracle Cloud (OCI), OVHcloud, Perplexity, Weights & Biases.