API Documentation and Quickstart

Get started with the uncensored LLM API in seconds. Paste your key, set the base URL, and send requests to the OpenAI-compatible endpoint.

Authentication and Base URL Configuration

The first step is obtaining your credentials. Sign up via Google or email on the Get API key page to receive your token immediately. No phone number is required. Use this token to authenticate every request.

Set your base URL to HTTPS://api.lamaapikey.com/v1. This ensures your calls route to our dedicated uncensored model. You do not need to manage proxies or switch endpoints for different models.

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": "Check the current latency for my key."}]
  }'

Chat Completions Endpoint (POST /v1/chat/completions)

Send text messages using the standard chat-completions endpoint. Your API key goes in the Authorization header. The model identifier is always "uncensored".

This setup works with any OpenAI-compatible client. You can use the official SDKs or HTTP libraries directly. The API returns text responses based on your prompts.

from openai import OpenAI

client = OpenAI(base_url="https://api.lamaapikey.com/v1", api_key="YOUR_KEY")

resp = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Summarise this thread without softening it."}],
)
print(resp.choices[0].message.content)

Supported Parameters: Temperature, Top-P, and Tools

Control creativity with temperature and top_p. Use temperature to adjust randomness. Higher values produce more varied outputs. Lower values make responses more deterministic.

Enable function calling with the tools parameter. Define JSON schemas for your functions. The model returns structured tool calls. You can also enforce JSON mode with response_format json_object. This ensures predictable parsing for your applications.

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.lamaapikey.com/v1", apiKey: process.env.API_KEY });

const resp = await client.chat.completions.create({
  model: "uncensored",
  messages: [{ role: "user", content: "Draft a villain monologue for my game." }],
});
console.log(resp.choices[0].message.content);

Streaming Responses and Usage Metadata

Enable streaming with the stream parameter. You receive chunks as they generate. This reduces perceived latency for long responses.

The final chunk contains usage metadata. It includes token counts for your billing. Errors and refusals do not consume credit. You only pay for successful output tokens.

stream = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Tell the story in second person."}],
    stream=True,
)
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

JSON Mode and Structured Outputs

Force structured data with response_format json_object. The model returns valid JSON only. This prevents parsing errors in your code.

Use this for consistent data extraction. Define your schema clearly in the prompt. The model adheres to your structure. This works well with function calling too.

Set top_p to 1.0 for maximum diversity. Adjust temperature for precision. Balance creativity with structure.

Limits, Errors, and Context Window

Context window: 100,000 tokens total. Max output: 16,000 tokens. Default max_tokens is 2,048 if not set. Request body limit is 8 MB.

Rate limit: 300 requests per minute. Concurrency: 8 simultaneous requests. Errors: 401 means invalid key. 402 means no credit. 429 means rate limit exceeded.

Pay $0.15 per 1M input tokens. Pay $0.50 per 1M output tokens. Crypto top-ups only.

Frequently asked questions

What is the lama API key?

It is your unique authentication token. You get it after signing up. Use it in the Authorization header.

How do I pay for the API?

Use crypto top-ups. We accept USDT (TRC20) or USDC (Base). Minimum top-up is $20. Bonus credit applies at $50, $100, and $200.

What happens if I run out of credit?

You get a 402 error. Requests stop until you add more crypto credit. Errors and refusals are free. Your credit never expires.

Get your API key in one step

Sign up, copy your key, update your base URL. Done.

Create key