EN ▾
Get API key

How Much Does Llama Cost? Weights, Hardware, API

The answer depends on what you mean by Llama. The model files can be free to download, but running them costs hardware, power or per-token fees. Here is how each route adds up.

Updated

A balance scale weighing GPU hardware against small token cubes to illustrate Llama running costs.

Key points

  • Downloading open Llama weights is free under their license, but inference is not.
  • Self-hosting trades per-token fees for hardware, electricity and maintenance time.
  • Our hosted API charges $0.15 per 1M input and $0.50 per 1M output tokens.
  • A typical 2,000 in / 500 out chat turn costs $0.00055, so 1,000 turns cost $0.55.

Three different costs hiding in one question

People who ask how much does Llama cost usually mean one of three things: the price of the model itself, the price of running it, or the price of a hosted API that serves it. They are separate numbers, and mixing them up is the main reason cost estimates go wrong.

The model itself: Meta publishes Llama weights that you can download at no charge, under a license with its own terms. Read that license for your use case, since it sets conditions. The model name alone tells you nothing about price, because the weights are not what you pay for when you use it daily.

Running it is where money goes. Either you buy and operate hardware, or you pay a provider by the token. The rest of this page puts numbers on both, using the hosted pricing of this site and simple formulas for local use. For other providers, check their current pricing pages, since those change.

The cost of running it yourself

Self-hosting has four parts.

  • Hardware. The weights must fit in fast memory. A 4-bit 8B model needs roughly 5 GB plus context, which a recent laptop or a mid-range GPU handles. A 70B model needs around 40 GB, which means a large-memory workstation or several GPUs.
  • Electricity. Estimate it directly: power draw in kilowatts times hours times your local rate. A machine drawing 300 W for 2 hours uses 0.6 kWh. Multiply by your price per kWh.
  • Your time. Installing the runtime, picking a quantization, fixing out-of-memory errors, and keeping up with updates all take hours.
  • Idle capacity. A GPU you bought for peak load sits unused most of the day, and you paid for it anyway.

If you already own a capable machine and use it occasionally, the marginal cost is close to zero and local is the cheap option. If you need to buy hardware for the purpose, the upfront cost is the main number, and it only pays back with steady, heavy use.

The cost of a hosted API on this site

The hosted option is billed per token from prepaid credit. There is no subscription, and credit never expires. Failed or refused requests are not charged.

ItemPrice
Input tokens$0.15 per 1M
Output tokens$0.50 per 1M
Minimum top-up$20
Maximum top-up$500, any whole amount in between

The model ID is uncensored: one open-weight model run by an independent provider, tuned to answer without content refusals for lawful adult use. It is not Meta's own API, so this page does not tell you what Meta charges for anything. The pricing page has the current top-up details.

Worked examples

Tokens are roughly three quarters of a word in English, so 1,000 tokens is about 750 words. All figures below come from $0.15 per 1M input and $0.50 per 1M output.

A chat message

2,000 tokens in (history plus your message) and 500 tokens out:

  • Input: 2,000 x 0.15 / 1,000,000 = $0.0003
  • Output: 500 x 0.50 / 1,000,000 = $0.00025
  • Per turn: $0.00055
  • 1,000 turns: $0.55
  • 100,000 turns: $55

A long document summary

A 60,000-token report in, a 1,500-token summary out:

  • Input: 60,000 x 0.15 / 1,000,000 = $0.009
  • Output: 1,500 x 0.50 / 1,000,000 = $0.00075
  • Total: $0.00975, just under one cent

A full context window

The window is 100,000 tokens for prompt plus completion. A request that sends 98,000 tokens and gets 2,000 back:

  • Input: 98,000 x 0.15 / 1,000,000 = $0.0147
  • Output: 2,000 x 0.50 / 1,000,000 = $0.001
  • Total: $0.0157

A batch job

Classifying 50,000 short items at 300 tokens in and 40 tokens out each is 15,000,000 input tokens and 2,000,000 output tokens. That costs 15 x $0.15 = $2.25 for input plus 2 x $0.50 = $1.00 for output, so $3.25 in total.

Costs people forget to count

Estimates for self-hosting tend to stop at the price of the graphics card. A few other items belong on the sheet.

  • Cooling and noise. A GPU under sustained load needs airflow. In a small room that can mean extra fans or a different location for the machine.
  • Storage. Each model file is several gigabytes, and trying five models and three quantizations fills a disk faster than you expect.
  • Downtime. When your desktop reboots for an update, your application is down. A hosted endpoint has its own failure modes, but you are not the one restarting it.
  • Retries and wasted tokens. On the API side, a prompt that is badly written costs money each time you rerun it. Test prompts on short inputs first.
  • Currency and payment fees. If you pay in crypto, network fees apply on top of the top-up amount. Check the fee on the chain you choose before sending.

None of these items is large alone, but together they explain why a free download can end up costing more than a few dollars of tokens.

How top-ups and bonuses change the math

You can add any whole amount from $20 to $500. Larger top-ups earn a bonus on the credit you receive.

You payBonusCredit you get
$20none$20.00
$50+5%$52.50
$100+10%$110.00
$200+15%$230.00
$500+15%$575.00

At $0.00055 per chat turn, a $20 top-up covers about 36,000 turns. Payment is by crypto (USDT on TRC20, USDC on Base).

A simple monthly budget

If you know roughly how many requests you make, the monthly bill is arithmetic. Use this template: requests per month, times average input tokens, times $0.15 per 1M, plus requests per month, times average output tokens, times $0.50 per 1M.

Take a small writing tool with 3,000 requests a month, 1,500 input tokens and 600 output tokens each. Input is 4,500,000 tokens, which costs 4.5 x $0.15 = $0.675. Output is 1,800,000 tokens, which costs 1.8 x $0.50 = $0.90. The month comes to $1.575. Even at ten times that traffic, you stay under $16, so the $20 minimum top-up would last for most of a month.

Now a heavier case: a chat product with 200,000 turns a month at the 2,000-in, 500-out pattern from above. That is 200,000 x $0.00055 = $110 a month. At that level, the +10% bonus on a $100 top-up (which gives $110 of credit) covers a month almost exactly.

Trying it before you spend anything

New users can claim $0.50 of trial credit with one click on the API key page after sign-up, once per person, valid for 7 days with no card. At $0.00055 per turn, that is about 909 chat turns, enough to judge quality and speed on your own prompts. Trial keys allow 2 concurrent requests and 60 requests per minute.

Which route is cheaper for you

Use these rules as a starting point.

  • Light or irregular use (a few thousand requests a month): hosted is almost always cheaper once you count hardware and time.
  • You already own a strong GPU or Apple Silicon machine: local costs only power, and it keeps data on your machine.
  • Steady, very high volume on a fixed model: compare a dedicated machine against the token math above for your own numbers, including the hours you spend maintaining it.
  • Several users or servers calling at once: concurrency is easier to buy than to build. A full key here allows 8 concurrent requests.

The Llama API comparison covers the hosted choices side by side, and the docs show how to move an existing OpenAI client over.

Questions and answers

Is Llama free to use?

The weights can be downloaded at no charge under Meta's license terms, but running a model needs hardware or a paid API. Read the license for commercial use.

How much does it cost to run Llama on my own PC?

After the hardware you already own, the cost is electricity: kilowatts times hours times your rate. If you must buy a GPU for it, the purchase price dominates.

What does this API charge per million tokens?

$0.15 per 1M input tokens and $0.50 per 1M output tokens, billed from prepaid credit with no subscription.

Do I pay for failed requests?

No. Failed or refused requests are not charged, and credit never expires.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Get API key