The Llama API no longer exists as a paid product sold by Meta. The company shut down api.llama.com on July 6, 2026, and every current Llama model now ships only as a free, open-weight download. Through third-party hosts, pricing today runs from $0.02 per 1 million input tokens on Llama 3.1 8B to $0.80 per 1 million output tokens on the flagship Llama 4 Maverick, which DeepInfra prices at $0.20 per 1 million input tokens.
Our team at Cabina.AI tracks pricing for Meta directly, since we give developers access to Llama 4 Maverick alongside 55+ other models through one subscription, and when a rate changes anywhere in that lineup we see it firsthand. By our observation, the path Meta took here is unlike any other model family we track. Most providers adjust a published rate gradually over time. Meta simply removed its first-party rate entirely in 2026 and left hosting to the open market.
Llama API Pricing Table
If you came here looking for one official llama api pricing page, it will not turn up, because Meta sells no Llama tokens directly anymore. Every row below comes from DeepInfra, a third-party host that keeps consistent, published per-token rates across the open Llama lineup. Other hosts price the exact same model weights differently, which the hosting section further down covers in detail. All prices are in US dollars per 1 million tokens, at the Standard service tier on DeepInfra.
| Model | Context window | Input | Output |
|---|---|---|---|
| Llama 4 Maverick (FP8) | 1,048,576 tokens | $0.20 | $0.80 |
| Llama 4 Scout | 327,680 tokens | $0.10 | $0.30 |
| Llama Guard 4 12B (safety classifier) | 160,000 tokens | $0.18 | $0.18 |
| Llama 3.3 70B Instruct Turbo | 128,000 tokens | $0.10 | $0.32 |
| Llama 3.1 70B Instruct Turbo | 128,000 tokens | $0.40 | $0.40 |
| Llama 3.1 8B Instruct Turbo | 128,000 tokens | $0.02 | $0.04 |
Llama Guard 4 12B is a safety classifier, not a chat model. It screens prompts and responses for policy violations rather than generating conversational replies, and DeepInfra bills it at one flat per-token rate in both directions.
We noticed Llama 4 Maverick pricing on DeepInfra has moved in the opposite direction from what most open-weight hosting follows: the input rate rose from roughly $0.15 to $0.20 per 1 million tokens over the months leading up to this review, rather than falling the way hosted-model prices usually do as a host’s own infrastructure costs come down. Budget for that model with a bit of headroom rather than assuming today’s rate holds for a year.
Llama 4 Scout is also worth a second look before you plan around it. The architecture behind Scout supports a 10 million-token context window, but DeepInfra caps the hosted version at 327,680 tokens in practice, a gap between the model’s theoretical capability and what you can actually send in a single request through this particular host.
Llama 3.1 405B, once the largest dense model Meta released, is no longer listed as a serverless option on DeepInfra. If a project specifically needs that model, check a host directly rather than assuming it is still generally available.
Llama API Cost Calculator
Pick a model and enter expected monthly token volume to estimate a monthly bill at DeepInfra Standard-tier pricing, the baseline used throughout this guide.
DeepInfra Flex tier applies a 0.8x multiplier across every model, for non-production or asynchronous work, in exchange for slower and less guaranteed responses.
Estimate only. Based on DeepInfra Standard-tier serverless pricing. Other hosts charge different rates for the same model weights. Excludes DeepInfra Priority tier (1.5x), fine-tuning, and dedicated-deployment pricing.
Llama API Request Example
The example below sends one authenticated request to Llama 4 Maverick through DeepInfra, using its OpenAI-compatible endpoint, the request format shown in the DeepInfra quickstart docs. Swap the model field for any model ID from the table above to price a different model.
curl https://api.deepinfra.com/v1/openai/chat/completions \
-H "Authorization: Bearer your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"model": "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8",
"messages": [{"role": "user", "content": "Summarize this in one sentence."}]
}'
The same request in Python, using the OpenAI SDK pointed at the DeepInfra base URL (no separate SDK is required):
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["DEEPINFRA_API_KEY"],
base_url="https://api.deepinfra.com/v1/openai",
)
response = client.chat.completions.create(
model="meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8",
messages=[{"role": "user", "content": "Summarize this in one sentence."}],
)
print(response.choices[0].message.content)
Model IDs to use in place of the one above: meta-llama/Llama-4-Scout-17B-16E-Instruct, meta-llama/Llama-3.3-70B-Instruct-Turbo, meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo, and meta-llama/Llama-Guard-4-12B. Because Llama has no single first-party endpoint anymore, llama api costs per model are really a function of which host and which model ID you call, not a plan you select in advance.
Where Llama Models Are Hosted, and What That Means for Llama API Cost
Since Meta stopped operating a paid Llama endpoint, llama api cost depends entirely on which third-party host serves the request. The same open weights can carry noticeably different rates, and in some cases a given model is not available at all from a host that used to offer it.
DeepInfra
DeepInfra is the host used for every price in the table above. Standard is the default tier, priced exactly as shown in that table. Two adjustments move the price away from that baseline depending on how urgent the request is: Priority schedules a request ahead of standard traffic for faster time-to-first-token, at 1.5 times the base price, set per request with a service_tier: "priority" parameter. Flex drops to 0.8 times the base price for non-production or asynchronous work, trading away speed and guaranteed availability for the discount.
Together AI
Together AI prices Llama 3.3 70B at $1.04 per 1 million tokens for both input and output, and a lighter Llama 3.1 8B Instruct variant at $0.14 per 1 million tokens for both input and output, as serverless inference. Llama 4 Maverick and Llama 4 Scout are not currently offered as serverless endpoints on Together AI; both are available only through dedicated deployment or fine-tuning, which are priced and billed differently from pay-per-token serverless access. Together AI also publishes separate fine-tuning rates for the 4-series models, billed per token of training data rather than per inference call, a genuinely separate cost from anything in the table above.
Groq
Groq is a cautionary example of how fast this landscape moves. It deprecated Llama 4 Maverick on March 9, 2026 and Llama 4 Scout on July 17, 2026, just eleven days after the first-party Llama API itself went dark. Groq still lists Llama 3.1 8B and Llama 3.3 70B today, but both now require contacting sales for a rate rather than offering a published self-serve price.
Hyperscaler clouds
The major hyperscaler clouds carry Llama too, each billing it separately from DeepInfra or Together. The first, Amazon Bedrock, prices Llama models through its own on-demand catalog, billed per 1,000 tokens rather than per 1 million. The second, Microsoft Azure AI Foundry, lists a comparable Llama catalog under its own model marketplace rates. The third, Google Vertex AI, offers Llama through its Model Garden at platform-specific pricing. None of these publish one number simple enough to drop into a single comparison row, so a budget-conscious team should pull a live quote from whichever cloud it already bills through rather than assume parity with DeepInfra.
We have noticed one detail that trips people up when they search for Meta pricing directly: Meta now also runs something called Meta Model API, serving its own closed-weight Muse Spark models, not Llama. It is easy to land on that documentation while looking for Llama pricing and assume the numbers apply to Llama; they do not.
If you would rather not manage a host yourself, Llama 4 Maverick is also available on Cabina.AI alongside ChatGPT and Mistral, under one subscription that covers 50+ other models too, useful for comparing outputs before committing to a specific host. See how Llama stacks up against Mistral in a side-by-side comparison of Llama and Mistral pricing and output quality.
Llama 4 Maverick vs Llama 3.1 8B: Which Model Should You Use?
Llama 4 Maverick is the strongest general-purpose option in the current lineup, a mixture-of-experts model that activates 17 billion parameters per token out of roughly 400 billion total, with a context window over 1 million tokens and support for function calling. At $0.20 per 1 million input tokens on DeepInfra, it costs ten times what Llama 3.1 8B charges for input, a reasonable premium for meaningfully stronger output on complex tasks, and Priority mode is available if you also need faster responses at 1.5 times that rate.
Llama 4 Scout trades a little raw capability for a much larger practical context window than the 70B-class models, at a lower price than Maverick: $0.10 input and $0.30 output per 1 million tokens on DeepInfra. For document-heavy or long-conversation workloads, Scout is usually the better starting point, since few applications actually need Maverick-level reasoning on every single request.
Llama 3.1 70B Instruct Turbo sits in an odd spot in the current lineup: at $0.40 per 1 million tokens in either direction, it costs more than Scout for a smaller, older model, mostly useful if a project is already tuned around the 3.1 architecture and switching model families is not worth the engineering time.
Llama 3.1 8B is the cheapest model in the table, at $0.02 input and $0.04 output per 1 million tokens, and it remains a solid default for simple classification or extraction work where a frontier model is overkill. From our experience running Llama models at Cabina.AI, teams consistently underestimate how much of their actual traffic is simple enough for an 8B model, and overpay by defaulting every request to the flagship tier out of habit.
Is the Llama API Free?
It depends on what you mean by “the Llama API.” The first-party version Meta used to operate at api.llama.com described itself, in its own terms of service, as free of charge during its preview period, but that offer ended when Meta retired the service on July 6, 2026. Today, calling a hosted Llama model through a provider like DeepInfra or Together AI bills per token from the first request, and the hyperscaler clouds that carry Llama bill the same way.
There is a genuinely free path left: Llama model weights are open and downloadable at no cost from Meta directly. In that scenario, how much do llama tokens cost turns into a question about your own compute bill, since there is no per-token API rate at all. Running a model like Llama 3.1 8B on rented GPU hardware can cost less than hosted API pricing at high volume, but it moves the cost into infrastructure and ops work. There is no line-item token rate to point to anymore; the GPU bill carries it.
Llama API vs DeepSeek API Pricing
Llama models api pricing and DeepSeek pricing both get cited as the budget end of the market, but the two are structured very differently. DeepSeek still runs its own first-party API with one official rate card, while Llama pricing is whatever a given third-party host decides to charge for the same open weights.
| Llama (via DeepInfra) | DeepSeek API | |
|---|---|---|
| Who sets the price | Third-party hosts, several options | DeepSeek directly, one official rate |
| Flagship model | Llama 4 Maverick | deepseek-v4-pro |
| Flagship input / output (per 1M, off-peak) | $0.20 / $0.80 | $0.66 / $1.98 |
| Flagship input / output (per 1M, peak) | $0.20 / $0.80 (no peak surcharge) | $1.32 / $3.96 |
| Cheapest model | Llama 3.1 8B | deepseek-flash |
| Cheapest input / output (per 1M, off-peak) | $0.02 / $0.04 | $0.15 / $0.60 |
DeepSeek adds a time-of-day twist that Llama hosts do not: rates roughly double during peak hours, defined as 01:00-04:00 and 06:00-10:00 UTC on weekdays. Llama pricing on DeepInfra does not vary by time of day, only by the service tier you choose. From running both model families on the same platform, the deciding factor we see most often is not the published rate at all; it is whether a team wants to manage host selection for an open-weight model or pay one vendor for a model that is only ever available one way. Use the calculator above to price a specific Llama model against your own token volume.
Llama API Pricing FAQ
Not as a hosted API. Meta retired its first-party Llama API on July 6, 2026, and every third-party host now bills Llama models per token from the first request. The one free path is self-hosting: Llama model weights remain free to download, so you only pay for your own compute.
Llama api pricing per million tokens ranges from $0.02 input on Llama 3.1 8B to $0.80 output on the flagship Llama 4 Maverick, based on current DeepInfra rates. Other hosts charge different rates for the identical model weights.
Llama 3.1 8B is the cheapest at $0.02 per 1 million input tokens and $0.04 per 1 million output tokens. Llama 4 Maverick is the most expensive at $0.80 per 1 million output tokens, on DeepInfra pricing.
No. Meta shut down api.llama.com on July 6, 2026. Requests to that endpoint no longer complete; they return a sunset response. Meta pointed developers toward third-party hosts and stopped running the service directly.
Llama 4 Maverick and Llama 4 Scout, both released in April 2025, remain the newest models in the family as of this writing. Meta has not shipped a successor; a larger model code-named Behemoth was previewed but never publicly released. On DeepInfra, Maverick costs $0.20 per 1 million input tokens and $0.80 per 1 million output tokens; Scout costs $0.10 input and $0.30 output.
On DeepInfra, a Llama 3.1 8B input token costs about one-fiftieth as much as a Claude Haiku 4.5 input token, and a Llama 4 Maverick input token costs roughly one twenty-fifth as much as a Claude Opus 5 input token. Exact ratios shift whenever any provider changes a rate, so treat this as a rough order of magnitude, not a fixed multiplier.
Yes. Llama model weights are open and free to download from Meta directly. Self-hosting removes the per-token rate entirely, but it replaces that cost with GPU rental or hardware, plus the engineering time to deploy and maintain the model yourself.