Meta: Llama-3.1-8B-InstructOfficial docs

Meta: Llama-3.1-8B-Instruct

byMeta
Official docs

Llama-3.1-8B-Instruct is a language model from Meta released on Jul 23, 2024. It reads text and writes text, with a 8K token context window and up to 4K tokens per reply.

Show more

It costs $0.02 per million input tokens and $0.04 per million output tokens.

It supports tool calling and structured JSON output, and its weights are open, so you can host it yourself.

15 providers serve it, including Deep Infra, Hugging Face and Novita AI.

Modalities
In / out price
$0.02 / $0.04 per 1M
Context
8K
Max output
4K
Released
Jul 23, 2024
Knowledge cutoff
Dec 2023
  • Tool calling
  • Structured output
  • Reasoning
  • Prompt caching
  • Open weights
  • Free to use

Llama-3.1-8B-Instruct pricing

USD, as listed on Nov 29, 2026. Most bills are input heavy, so the cached input rate matters as much as the headline price.

Input$0.02 / 1M tokens
Output$0.04 / 1M tokens

Llama-3.1-8B-Instruct providers

15 providers serve it, including Deep Infra, Hugging Face and Novita AI. Each host sets its own price and limits, so the cheapest one is not always the one with the longest context.

ProviderInput /MOutput /MCache read /MContextMax output
Deep Infra$0.02$0.04n/a131K4K
Hugging Face$0.02$0.04n/a131K4K
Novita AI$0.02$0.05n/a16K16K
Databricks$0.15$0.45n/a128K8K
Vercel AI Gateway$0.22$0.22n/a128K8K
Eden AI$0.02$0.05n/a131K4K
Helicone$0.02$0.05n/a16K16K
Kilo Gateway$0.02$0.04n/a131K118K
NanoGPT$0.02$0.04$0.01131K16K
Kitani$0.049$0.0765$0.02458K4K
Poe$0.10$0.10n/a128Kn/a
ZeroGPU$0.15$0.28n/a131K8K

Showing 12 of 15 providers: the lab first, then the major clouds, then the cheapest resellers.

What Llama-3.1-8B-Instruct costs per month

Pick a workload close to yours or type your own volumes.

Llama-3.1-8B-Instruct per month
$1.92
Without caching
$1.92
Per request
$0.0001

Supported request parameters

What you can set when you call Llama-3.1-8B-Instruct through an OpenAI compatible API.

  • Toolstools
  • Structured outputsstructured_outputs
  • Temperaturetemperature

Alternatives to Llama-3.1-8B-Instruct

Models that take the same inputs and call tools, closest in price, cheaper ones first.

  • Reads text. Tool calling, structured output, reasoning. Served by 3 providers.

    by inclusionaiAug 7, 2026$0.015/M input tokens$0.045/M output tokens3 providers

  • Reads text. Tool calling, structured output. Served by 2 providers.

    by meta-llamaSep 25, 2024$0.02/M input tokens$0.02/M output tokens2 providers

  • Reads text. Tool calling, structured output, reasoning. Served by 2 providers.

    by upstageNov 24, 2026$0.01/M input tokens$0.04/M output tokens2 providers

  • Reads text. Tool calling, structured output. Served by 10 providers.

    by mistralaiJul 18, 2024$0.029/M input tokens$0.03/M output tokens10 providers

  • Reads text and images. Tool calling. Served by 2 providers.

    by lightonaiJan 16, 2026$0.0238/M input tokens$0.0714/M output tokens2 providers

  • Reads text, images and video. Tool calling, structured output, reasoning. Served by 2 providers.

    by qwenMar 2, 2026$0.02/M input tokens$0.10/M output tokens2 providers

More from Meta

  • Reads text and images. Served by 4 providers.

    by meta-llamaApr 29, 2025$0.18/M input tokens$0.18/M output tokens4 providers

  • Reads text. Served by 3 providers.

    by meta-llamaApr 29, 2025$0.03/M input tokens$0.03/M output tokens3 providers

  • Reads text. Served by 3 providers.

    by meta-llamaApr 29, 2025$0.04/M input tokens$0.04/M output tokens3 providers

  • Reads text and images. Tool calling, structured output. Served by 6 providers.

    by meta-llamaApr 5, 2025128K context$0.35/M input tokens$1/M output tokens6 providers

  • Reads text and images. Tool calling, structured output. Served by 5 providers.

    by meta-llamaApr 5, 2025$0.25/M input tokens$1/M output tokens5 providers

  • Index 8.1

    Reads text and images. Tool calling, structured output. Served by 4 providers.

    by meta-llamaApr 5, 2025328K context$0.10/M input tokens$0.30/M output tokens4 providers

All Meta models

Llama-3.1-8B-Instruct questions

How much does the Llama-3.1-8B-Instruct API cost?

$0.02 per million input tokens and $0.04 per million output tokens. The estimator on this page turns that into a monthly bill for your own workload.

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

8,192 tokens of input, and it can write up to 4,096 tokens in one reply. As a rough guide, a million tokens is around 750,000 English words.

Which providers serve Llama-3.1-8B-Instruct?

15 providers serve it, including Deep Infra, Hugging Face and Novita AI. Prices differ by host, so the Providers table on this page lists each one with its input and output price.

Does Llama-3.1-8B-Instruct support tool calling?

Yes. It accepts tool definitions and can return JSON that matches a schema, which is what an agent needs to call your APIs.

Is Llama-3.1-8B-Instruct open source?

Its weights are published, so you can run it on your own hardware or a cloud of your choice. Read the license before commercial use.

When was Llama-3.1-8B-Instruct released?

Jul 23, 2024, with training data up to Dec 2023.

Catalog data from models.dev (MIT licensed), refreshed daily, last on Nov 29, 2026. The summary is written from these facts.