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

- Page: https://models.litellm.ai/models/llama-3.1-8b-instruct
- Lab: Meta
- LiteLLM model name: `vertex_ai/meta/llama-3.1-8b-instruct-maas`
- Context window: 128,000 tokens
- Max output: 2,048 tokens
- Added to LiteLLM: July 2024
- Prices updated: October 10, 2026

## Pricing by provider

Token prices in USD per 1M tokens.

| Provider | Model name | Input | Output | Cache read | Per image | Per second | Context |
|---|---|---|---|---|---|---|---|
| Google Vertex AI | `vertex_ai/meta/llama-3.1-8b-instruct-maas` | $0 | $0 | – | – | – | 128K |
| Amazon Bedrock | `meta.llama3-1-8b-instruct-v1:0` | $0.22 | $0.22 | – | – | – | 128K |
| DeepInfra | `deepinfra/meta-llama/Meta-Llama-3.1-8B-Instruct` | $0.03 | $0.05 | – | – | – | 128K |
| Hyperbolic | `hyperbolic/meta-llama/Meta-Llama-3.1-8B-Instruct` | $0.12 | $0.30 | – | – | – | 32K |
| Lambda | `lambda_ai/llama3.1-8b-instruct` | $0.025 | $0.04 | – | – | – | 128K |
| Nebius AI Studio | `nebius/meta-llama/Meta-Llama-3.1-8B-Instruct` | $0.02 | $0.06 | – | – | – | 128K |
| Novita AI | `novita/meta-llama/llama-3.1-8b-instruct` | $0.02 | $0.05 | – | – | – | 16K |
| Nscale | `nscale/meta-llama/Llama-3.1-8B-Instruct` | $0.03 | $0.03 | – | – | – | – |
| Oracle Cloud (OCI) | `oci/meta.llama-3.1-8b-instruct` | $0.72 | $0.72 | – | – | – | 128K |
| OVHcloud | `ovhcloud/Llama-3.1-8B-Instruct` | $0.10 | $0.10 | – | – | – | 131K |
| Perplexity | `perplexity/llama-3.1-8b-instruct` | $0.20 | $0.20 | – | – | – | 128K |
| Weights & Biases | `wandb/meta-llama/Llama-3.1-8B-Instruct` | $0.22 | $0.22 | – | – | – | 131K |
| Amazon Bedrock (US cross-region) | `us.meta.llama3-1-8b-instruct-v1:0` | $0.22 | $0.22 | – | – | – | 128K |
| Cloudflare Workers AI (fp8) | `cloudflare/@cf/meta/llama-3.1-8b-instruct-fp8` | $0.152 | $0.287 | – | – | – | 32K |

## Cost examples

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

## Features

Supported: Function calling, Parallel tool calls, Structured output, Image input.

## Use it with LiteLLM

```python
from litellm import completion

response = completion(
    model="vertex_ai/meta/llama-3.1-8b-instruct-maas",
    messages=[{"role": "user", "content": "Hello!"}],
)
```

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

Source: LiteLLM model price file, https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json
