# Llama 3.1 8B Instruct

> Meta's compact Llama 3.1 8B instruction-tuned model optimized for fast inference and edge deployments.

**ID**: `meta/llama-3.1-8b-instruct`  
**Creator**: meta  
**Category**: text  
**Context**: 131K tokens  
**Pricing**: $0.05 / $0.08 per 1M · billed by your provider (BYOK)  
**Released**: 2024-07-23  
**Web page**: https://anyrouter.dev/model/meta/llama-3.1-8b-instruct

**Input modalities**: text  
**Output modalities**: text  

**Tokenizer**: Llama

**Capabilities**: chat, reasoning, streaming, function-calling, coding

**Supported parameters**: max_tokens, temperature, top_p, stop, tools, tool_choice, response_format

**Aliases**: `meta-llama/llama-3.1-8b-instruct`, `meta/llama-3.1-8b-instruct-fp8`

## Usage

**Endpoint**: `POST https://anyrouter.dev/api/v1/chat/completions`

```bash
curl https://anyrouter.dev/api/v1/chat/completions \
  -H "Authorization: Bearer $ANYROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "meta/llama-3.1-8b-instruct",
  "messages": [
    {
      "role": "user",
      "content": "Say hi in 3 words."
    }
  ]
}'
```

## Providers

| Provider | Input | Output |
| --- | --- | --- |
| huggingface-byok | $0.15/M (list) | $0.29/M (list) |
| openrouter-byok | $0.05/M (list) | $0.08/M (list) |

BYOK routes are billed by your own provider key — AnyRouter charges $0. Rates marked (list) are the provider's published list price.

## Benchmarks

- **GPQA Diamond**: 0.3
- **HLE**: 0.1
- **τ²-Bench Telecom**: 0.2
- **SciCode**: 0.1
- **MATH Level 5**: 0.2
- **OTIS Mock AIME**: 0.0

Benchmark data from [Epoch AI](https://epoch.ai/benchmarks) (CC-BY 4.0).

## Source

- Upstream docs: https://developers.cloudflare.com/workers-ai/models/llama-3.1-8b-instruct/
