Llama API Key Pricing: What You Pay per Token
The key itself costs nothing. You pay for the tokens you send and receive, from prepaid credit. This page turns the per-token rates into real bills for common workloads.
Updated

Key points
Rates: $0.15 per 1M input tokens, $0.50 per 1M output tokens.
No subscription, no seat fee; credit never expires and failed requests are not charged.
Top up any whole amount from $20 to $500, with bonuses from 5% to 15%.
Read X-Balance-USD on every response to track spend in code.
Pricing at a glance
| Line | Value |
|---|---|
| Input tokens | $0.15 per 1M |
| Output tokens | $0.50 per 1M |
| Billing | Prepaid credit, pay as you go |
| Subscription | None |
| Credit expiry | Never |
| Failed or refused requests | Not charged |
| Top-up range | Any whole amount, $20 to $500 |
That is the whole price list. If you came looking for Llama API key pricing, there is no per-key fee, no monthly plan and no minimum spend beyond the first top-up. Your key is created free after sign-up, and the cost shows up only as tokens used.
One note on naming. The API behind the key serves one open-weight model, run by an independent provider and tuned to answer without content refusals for lawful adult use. You call it with the model ID uncensored. It is not Meta's official API, so nothing here describes what Meta or any other vendor charges.
How a key is created and funded
Sign up with Google, or with email and password, then open the API key page. A new key works as soon as it exists, and new users can claim $0.50 of trial credit with one click there. The trial is valid for 7 days, needs no card, and is limited to one per person.
Trial keys are capped at 2 concurrent requests and 60 requests per minute. Once you add credit, you get a full key: 8 concurrent requests and 300 requests per minute. For top-ups, see the pricing page. You can pay with crypto (USDT on TRC20, USDC on Base).
Reading the rates: input versus output
Output tokens cost 0.50 / 0.15, which is about 3.3 times as much as input tokens. That matters for how you design prompts.
- A long prompt with a short answer is cheap. Classification, extraction and retrieval answers sit here.
- A short prompt with a long answer is the expensive direction. Story writing and long-form generation sit here.
- Chat history is re-sent as input on every turn, so a long conversation grows in cost per turn even if each reply is short.
As a reference point, 1M input plus 1M output tokens costs $0.15 + $0.50 = $0.65.
Worked bills for four workloads
A roleplay or companion chat session
40 turns. History grows, so assume an average of 6,000 input tokens and 300 output tokens per turn.
- Input: 40 x 6,000 = 240,000 tokens, which is 0.24 x $0.15 = $0.036
- Output: 40 x 300 = 12,000 tokens, which is 0.012 x $0.50 = $0.006
- Session total: $0.042
A retrieval (RAG) answer
Five retrieved chunks of 800 tokens, plus a 200-token question, is 4,200 input tokens. The answer runs 400 tokens.
- Input: 4,200 x $0.15 / 1M = $0.00063
- Output: 400 x $0.50 / 1M = $0.0002
- Per query: $0.00083, so 10,000 queries cost $8.30
An agent loop with tools
12 steps, each re-sending context: 8,000 input and 250 output tokens per step.
- Input: 12 x 8,000 = 96,000 tokens, so $0.0144
- Output: 12 x 250 = 3,000 tokens, so $0.0015
- Per run: $0.0159
Bulk generation
2,000 product descriptions at 150 tokens in and 400 out each: 300,000 input tokens ($0.045) and 800,000 output tokens ($0.40), so $0.445 for the batch.
Top-ups and the bonus tiers
Bonuses apply to the credit you receive: +5% from $50, +10% from $100, +15% from $200.
| Top-up | Credit received | Roleplay sessions at $0.042 |
|---|---|---|
| $20 | $20.00 | about 476 |
| $50 | $52.50 | about 1,250 |
| $100 | $110.00 | about 2,619 |
| $200 | $230.00 | about 5,476 |
Because credit never expires, a larger top-up is not a commitment to use it quickly. It only changes how often you have to refill.
Two habits keep these numbers honest. Always compute from the usage field of real responses rather than from word counts, because tokenization varies with language and punctuation. And remember that the prompt you send includes everything: system text, history, retrieved passages and tool definitions. Many surprising bills come from a long system prompt that nobody has looked at in months, sent a hundred thousand times.
A rough sanity check helps too. If a single chat turn costs more than a tenth of a cent at the usual 2,000-token size, something in the prompt is larger than you think. At $0.00055 per turn the expected figure is a fraction of that, so a large gap points to runaway history or an oversized context.
Planning a monthly budget
Work from requests per month. Multiply by your average input tokens and by your average output tokens, then apply the two rates. A support-style assistant with 15,000 conversations a month, 3,000 tokens in and 350 out per conversation, uses 45,000,000 input tokens ($6.75) and 5,250,000 output tokens ($2.625). The month comes to $9.375.
Two checks make that estimate honest. First, measure real token counts from the usage field for a week before you trust any guess. Second, add a margin for retries and growth. Because credit never expires and failed requests are not charged, over-buying slightly has no penalty beyond having the money tied up in your balance.
Measuring your own spend in code
Every response carries usage counts, and the headers include X-Balance-USD. The snippet below computes the cost of one call and prints the remaining balance.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.uncensoredllama.top/v1",
api_key=os.environ["UNCENSORED_API_KEY"],
)
raw = client.chat.completions.with_raw_response.create(
model="uncensored",
messages=[{"role": "user", "content": "Write a four-line poem about rain."}],
)
resp = raw.parse()
u = resp.usage
cost = u.prompt_tokens * 0.15 / 1_000_000 + u.completion_tokens * 0.50 / 1_000_000
print(f"tokens in/out: {u.prompt_tokens}/{u.completion_tokens}")
print(f"cost: ${cost:.6f}")
print("balance:", raw.headers.get("X-Balance-USD"))
Log this per request and you will know your real cost per feature within a day.
If your usage is spiky, such as a launch week followed by quiet weeks, the no-expiry rule is the useful part: you do not lose unused credit at the end of a month. If it is steady, pick the top-up that matches roughly a month or two of spend and refill on a schedule. Check the balance in code through the X-Balance-USD header, and set an alert in your own app when it drops below a level you choose.
Ways to keep the bill small
- Trim chat history. Keep a short summary plus the last few turns instead of the full transcript.
- Set
max_tokensfor tasks with a known answer length. It is optional, but it caps the output side, which costs more per token. - Retrieve fewer, better chunks in RAG. Four relevant chunks usually beat ten loosely related ones, on cost and on quality.
- Keep the system prompt short, since it is re-sent every call.
- Use a lower
temperaturefor structured tasks to reduce retries.
Comparing with other APIs fairly
To compare prices across providers, check each one's current pricing page and normalise to the same mix. Multiply your expected input tokens and output tokens per month by each provider's rates; do not compare only the headline input price. Also check what each offers beyond price: context window, rate limits, and whether the model refuses lawful requests you need to make. For a related decision, see the page on an uncensored DeepSeek API. Setup details are in the docs.
What the price does not include
The rates cover text generation and nothing else. There are no image, audio or video endpoints, no embeddings, and no fine-tuning, so a project that needs those will pay a separate provider for them. Retrieval apps, for example, usually run a local embedding model next to this API.
The request size limit is 8 MB per body, and the context window is 100,000 tokens, prompt plus completion. A request that fills the window costs about 100,000 x $0.15 / 1M = $0.015 on the input side alone, so even maximum-size prompts remain cheap per call. The cost that adds up is repetition: the same large context sent hundreds of times.
Finally, prompts are not used for training, which some teams treat as part of the real price when they compare providers.
More guides
Questions and answers
Does the API key itself cost money?
No. Keys are free after sign-up. You pay only for tokens used, from prepaid credit.
Is there a monthly plan?
No. Pricing is pay as you go, with no subscription, and credit never expires.
What does 1 million tokens cost?
$0.15 for 1M input tokens and $0.50 for 1M output tokens.
What is the minimum top-up?
$20. You can add any whole amount up to $500, with bonuses of 5% from $50, 10% from $100 and 15% from $200.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.