Llama 3 API Key: Where to Get One and How to Use It
Last updated
Llama 3 is an open-weight model family, so no one company hands out a master key for it. A key comes from whichever host serves the model, and this page shows how to tell the options apart and how to use one.

The short answer: there is no one Llama 3 key
People searching for a llama 3 api key usually expect a dashboard somewhere that hands out a single credential, the way OpenAI or Anthropic do. For Llama that dashboard does not exist. Meta publishes model weights under a license, and anyone can download them and run them. A key only appears when a company runs the model for you and bills you for it.
So the useful question is not "where is the official key" but which host should run this for you. Each host has its own sign-up, its own key format, its own prices and its own rules about what the model may answer. A key from one host will not work on another.
Three routes to a working key
| Route | Where the key comes from | Good for | Trade-off |
|---|---|---|---|
| Self-host the weights | You make one yourself, or run with no key at all | Full control, private data | You pay for GPUs and handle upgrades and scaling |
| Large cloud platform | Account and IAM credentials from that cloud | Teams already living in that cloud | Setup is heavier, and policies are set by the platform |
| Independent hosted API | One click on the host's key page | Prototypes, apps, quick tests | You depend on that provider's model choice and limits |
None of these is wrong. If your data cannot leave your own network, self-hosting is the honest answer. If you want to be sending requests in five minutes, a hosted API is faster. Check each host's current pricing and model list before you commit, because both change.
How to choose between the routes
Work through four questions in order. The first one that gives a firm answer usually settles it.
- Must the model be a specific Llama 3 checkpoint? If yes, pick a host that lists that exact model by name, or self-host. A generic hosted API cannot promise it.
- Can the prompts leave your network? If not, self-host. A hosted key always means your text travels to someone else's servers. Ours does not use prompts for training, but that is still a transfer you have to be allowed to make.
- How much traffic do you expect? A few hundred requests a day rarely justifies renting GPUs. A steady high volume might.
- Do refusals get in the way? Fiction tools, roleplay apps and research on sensitive subject matter often hit refusals on mainstream hosted models. That is the case an uncensored endpoint exists for, always within lawful adult use. Sexual content involving minors is not allowed, and that limit is fixed.
Many teams end up using two: a general-purpose host for ordinary tasks and an uncensored endpoint for the traffic that gets refused elsewhere. Because both speak the OpenAI protocol, switching is a matter of changing the base URL and key in one config file.
What our key gives you (and what it does not)
Here is the part to read before you sign up. This service is not Meta's API and it does not resell Llama 3 under a Llama 3 label. It runs one open-weight model, operated by an independent provider, and tuned to answer without content refusals for lawful adult use. The model ID you send is uncensored.
If your project needs the exact Llama 3 weights, for a benchmark reproduction or a license-bound deployment, use a host that names that model. If you mostly need a capable chat model behind a standard OpenAI-style endpoint, with fewer refusals, the key from our API key page will do the job.
It is text only. There are no images, audio, embeddings or fine-tuning. The context window is 100,000 tokens, prompt plus completion.
Get a key and make your first call
- Sign up with Google, or with an email and password.
- Open the API key page. New accounts can claim $0.50 of trial credit with one click. It lasts 7 days and needs no card.
- Copy the key and store it as an environment variable.
- Point any OpenAI client at the base URL below.
curl
export API_KEY="paste-your-key-here"
curl https://api.lamaapikey.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Say hello in one sentence."}]
}'
Python
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.lamaapikey.com/v1",
api_key=os.environ["API_KEY"],
)
reply = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": "Say hello in one sentence."}],
)
print(reply.choices[0].message.content)
Node
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.lamaapikey.com/v1",
apiKey: process.env.API_KEY,
});
const reply = await client.chat.completions.create({
model: "uncensored",
messages: [{ role: "user", content: "Say hello in one sentence." }],
});
console.log(reply.choices[0].message.content);
Streaming, tool calling and JSON mode (response_format with json_object) work the same way they do with other OpenAI-style endpoints. The documentation lists every parameter that is passed through.
Streaming with a system prompt
Most real apps stream tokens as they arrive. Set stream to true and read the chunks. Usage is reported at the end of the stream.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.lamaapikey.com/v1",
api_key=os.environ["API_KEY"],
)
stream = client.chat.completions.create(
model="uncensored",
stream=True,
messages=[
{"role": "system", "content": "You are a concise assistant."},
{"role": "user", "content": "List three uses of an open-weight model."},
],
)
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)
The system message sets tone and rules for the whole conversation. Keep it short and specific, since every token in it is billed as input on each request.
Keeping the key safe
A leaked key spends your credit. Keep it out of source control, out of front-end code and out of screenshots. Load it from an environment variable on the server, as in the examples above. For the common slips that get keys exposed, see our notes on API key mistakes, which apply to any provider.
If a key does leak, open the key page and regenerate it. The old key stops working at once and you do not need to contact support. Once you have topped up, you can hold up to 5 keys, label them per project and revoke any of them on its own.
What it costs and what the limits are
Billing is prepaid credit, with no subscription. Input tokens cost $0.15 per 1M and output tokens cost $0.50 per 1M. A request with 2,000 input tokens and 500 output tokens costs $0.0003 plus $0.00025, which is $0.00055, so the $0.50 trial credit covers roughly 900 requests of that size. Failed or refused requests are not charged, and credit never expires.
Top-ups are any whole amount from $20 to $500, paid in crypto (USDT on TRC20 or USDC on Base). Larger top-ups add a bonus: 5% from $50, 10% from $100, 15% from $200. See the pricing page for the current table.
A full key allows 8 concurrent requests and 300 requests per minute. A trial key allows 2 concurrent requests and 60 per minute. Go over and you get HTTP 429 with the error code rate_limited or concurrency, so add a short retry with backoff in your client.
When the call fails
- 401: the key is missing, mistyped or was regenerated. Check the
Authorization: Bearerheader and that the variable is actually set in the shell that runs your code. - 404 or HTML back: the base URL is wrong. It must end in
/v1and the SDK adds/chat/completionsitself. - Model not found: use
uncensored, not a Llama name. - 429: read the error code.
concurrencymeans too many requests at once, and a streamed request holds its slot until the stream ends.
More guides
Frequently asked questions
Is there an official Meta Llama 3 API key?
Meta releases the weights, not a general key. Keys come from the companies that host the model, and each one is valid only on that host.
Is your key a Llama 3 key?
No. Our API serves one open-weight model from an independent provider under the ID uncensored. It is not Meta's API.
Do I need a credit card to try it?
No. The $0.50 trial credit is claimed with one click after sign-up, needs no card, and is valid for 7 days. Paid top-ups are by crypto.
Can I use the OpenAI Python library with it?
Yes. Set base_url to https://api.lamaapikey.com/v1, use your key, and send model uncensored.